changeset 9148:4cf4c36b9d3e

Fix ccc: float args should go to stack after first double allocated there Contributed-by: akozlov@azul.com
author snazarki
date Thu, 11 Jul 2019 17:45:47 +0300
parents 96ceee89c086
children 5182412b5b80
files src/cpu/aarch32/vm/interpreterRT_aarch32.cpp src/cpu/aarch32/vm/sharedRuntime_aarch32.cpp
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/aarch32/vm/interpreterRT_aarch32.cpp	Thu Jul 11 17:45:01 2019 +0300
+++ b/src/cpu/aarch32/vm/interpreterRT_aarch32.cpp	Thu Jul 11 17:45:47 2019 +0300
@@ -123,6 +123,9 @@
         _fp_arg_mask &= ~((3 << _next_double_dex*2) | ((1 << _next_double_dex+16)));
         __ vldr_f64(as_DoubleFloatRegister(_next_double_dex++), src);
     } else {
+        // make future floats allocate on stack too
+        _fp_arg_mask &= ~((1 << Argument::n_float_register_parameters_c*2)-1);
+
         __ ldrd(r0, temp(), src);
         _stack_offset = (_stack_offset + 7) & ~7;
         __ strd(r0, temp(), Address(to(), _stack_offset));
@@ -295,6 +298,7 @@
       _fp_args[index*2] = low_obj;
       _fp_args[index*2 + 1] = high_obj;
     } else {
+      *_fp_identifiers &= ~0xffff; // make future floats allocate on stack too
       _to = (intptr_t*)(((intptr_t)_to + 7) & ~7); // Align to eight bytes
       *_to++ = low_obj;
       *_to++ = high_obj;
--- a/src/cpu/aarch32/vm/sharedRuntime_aarch32.cpp	Thu Jul 11 17:45:01 2019 +0300
+++ b/src/cpu/aarch32/vm/sharedRuntime_aarch32.cpp	Thu Jul 11 17:45:47 2019 +0300
@@ -837,6 +837,7 @@
           regs[i].set2(FP_ArgReg[fp_args]->as_VMReg());
           fp_args += 2;
         } else {
+          fp_free_mask = 0; // make future float allocations on stack too
           regs[i].set2(VMRegImpl::stack2reg(stk_args));
           stk_args += 2;
         }