RFR: 8178500: Replace usages of round_to and round_down with align_up and align_down
Thomas Schatzl
thomas.schatzl at oracle.com
Tue Jul 4 11:03:39 UTC 2017
Hi Stefan,
On Fri, 2017-06-30 at 18:12 +0200, Stefan Karlsson wrote:
> Hi all,
>
> Please review this patch to remove round_to and round_down and
> replace
> their usages with align_up and align_down.
>
> http://cr.openjdk.java.net/~stefank/8178500/webrev.00/
> https://bugs.openjdk.java.net/browse/JDK-8178500
>
> The round_to and round_down functions asserted that alignment was a
> power-of-2. I've added asserts to the corresponding align functions.
>
> This patch builds upon all the patches referred to in:
> http://mail.openjdk.java.net/pipermail/hotspot-dev/2017-June/027329
> .html
I think the following hunk should be reverted:
--- old/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp 2017
-06-30 18:03:19.892762780 +0200
+++ new/src/cpu/ppc/vm/templateInterpreterGenerator_ppc.cpp 2017
-06-30 18:03:19.704756404 +0200
@@ -1032,8 +1032,8 @@
// Cut back area between esp and max_stack.
__ addi(parent_frame_resize, parent_frame_resize,
frame::abi_minframe_size - Interpreter::stackElementSize);
- __ round_to(top_frame_size, frame::alignment_in_bytes);
- __ round_to(parent_frame_resize, frame::alignment_in_bytes);
+ __ align_up(top_frame_size, frame::alignment_in_bytes);
+ __ align_up(parent_frame_resize, frame::alignment_in_bytes);
// parent_frame_resize = (locals-parameters) - (ESP-SP-ABI48)
Rounded to frame alignment size.
// Enlarge by locals-parameters (not in case of native_call), shrink
by ESP-SP-ABI48.
It does not have anything to do with the C++ round_to() methods, but
some code generation function that by chance has the same name. Also I
believe it will cause errors in compilation of the ppc target. :)
I do not need a re-review if you just reverted that change.
Thanks,
Thomas
More information about the hotspot-dev
mailing list