--- a/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp Tue Sep 27 09:26:30 2016 +0200
+++ b/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp Tue Sep 27 09:25:26 2016 +0100
@@ -989,7 +989,16 @@
// A float arg may have to do float reg int reg conversion
static void float_move(MacroAssembler* masm, VMRegPair src, VMRegPair dst) {
- if (src.first() != dst.first()) {
+ assert(src.first()->is_stack() && dst.first()->is_stack() ||
+ src.first()->is_reg() && dst.first()->is_reg(), "Unexpected error");
+ if (src.first()->is_stack()) {
+ if (dst.first()->is_stack()) {
+ __ ldrw(rscratch1, Address(rfp, reg2offset_in(src.first())));
+ __ strw(rscratch1, Address(sp, reg2offset_out(dst.first())));
+ } else {
+ ShouldNotReachHere();
+ }
+ } else if (src.first() != dst.first()) {
if (src.is_single_phys_reg() && dst.is_single_phys_reg())
__ fmovs(dst.first()->as_FloatRegister(), src.first()->as_FloatRegister());
else
@@ -1023,7 +1032,16 @@
// A double move
static void double_move(MacroAssembler* masm, VMRegPair src, VMRegPair dst) {
- if (src.first() != dst.first()) {
+ assert(src.first()->is_stack() && dst.first()->is_stack() ||
+ src.first()->is_reg() && dst.first()->is_reg(), "Unexpected error");
+ if (src.first()->is_stack()) {
+ if (dst.first()->is_stack()) {
+ __ ldr(rscratch1, Address(rfp, reg2offset_in(src.first())));
+ __ str(rscratch1, Address(sp, reg2offset_out(dst.first())));
+ } else {
+ ShouldNotReachHere();
+ }
+ } else if (src.first() != dst.first()) {
if (src.is_single_phys_reg() && dst.is_single_phys_reg())
__ fmovd(dst.first()->as_FloatRegister(), src.first()->as_FloatRegister());
else