--- a/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp Wed Jun 08 17:04:06 2011 -0700
+++ b/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp Tue Jun 14 14:41:33 2011 -0700
@@ -1644,14 +1644,16 @@
// rax = src_addr + swap_bytes
// rbx = dest_addr
// while (rax <= rbx) *(rax - swap_bytes) = *(rax + 0), rax++;
- __ addptr(rbx_destslot, wordSize);
+ // dest_slot denotes an exclusive upper limit
+ int limit_bias = OP_ROT_ARGS_DOWN_LIMIT_BIAS;
+ if (limit_bias != 0)
+ __ addptr(rbx_destslot, - limit_bias * wordSize);
move_arg_slots_down(_masm,
Address(rax_argslot, swap_slots * wordSize),
rbx_destslot,
-swap_slots,
rax_argslot, rdx_temp);
-
- __ subptr(rbx_destslot, wordSize);
+ __ subptr(rbx_destslot, swap_slots * wordSize);
}
// pop the original first chunk into the destination slot, now free
for (int i = 0; i < swap_slots; i++) {