src/cpu/x86/vm/c1_Runtime1_x86.cpp
Print this page
@@ -1579,11 +1579,10 @@
__ movptr(rax, (int)id);
__ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, unimplemented_entry), rax);
__ should_not_reach_here();
break;
}
-
__ push(rax);
__ push(rdx);
const Register pre_val = rax;
const Register thread = NOT_LP64(rax) LP64_ONLY(r15_thread);
@@ -1603,12 +1602,12 @@
Label done;
Label runtime;
// Can we store original value in the thread's buffer?
- LP64_ONLY(__ movslq(tmp, queue_index);)
#ifdef _LP64
+ __ movslq(tmp, queue_index);
__ cmpq(tmp, 0);
#else
__ cmpl(queue_index, 0);
#endif
__ jcc(Assembler::equal, runtime);
@@ -1626,17 +1625,37 @@
f.load_argument(0, pre_val);
__ movptr(Address(tmp, 0), pre_val);
__ jmp(done);
__ bind(runtime);
- // load the pre-value
__ push(rcx);
+#ifdef _LP64
+ __ push(r8);
+ __ push(r9);
+ __ push(r10);
+ __ push(r11);
+# ifndef _WIN64
+ __ push(rdi);
+ __ push(rsi);
+# endif
+#endif
+ // load the pre-value
f.load_argument(0, rcx);
__ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), rcx, thread);
+#ifdef _LP64
+# ifndef _WIN64
+ __ pop(rsi);
+ __ pop(rdi);
+# endif
+ __ pop(r11);
+ __ pop(r10);
+ __ pop(r9);
+ __ pop(r8);
+#endif
__ pop(rcx);
-
__ bind(done);
+
__ pop(rdx);
__ pop(rax);
}
break;
@@ -1662,26 +1681,26 @@
PtrQueue::byte_offset_of_index()));
Address buffer(thread, in_bytes(JavaThread::dirty_card_queue_offset() +
PtrQueue::byte_offset_of_buf()));
__ push(rax);
- __ push(rdx);
+ __ push(rcx);
NOT_LP64(__ get_thread(thread);)
ExternalAddress cardtable((address)ct->byte_map_base);
assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code");
- const Register card_addr = rdx;
+ const Register card_addr = rcx;
#ifdef _LP64
const Register tmp = rscratch1;
f.load_argument(0, card_addr);
__ shrq(card_addr, CardTableModRefBS::card_shift);
__ lea(tmp, cardtable);
// get the address of the card
__ addq(card_addr, tmp);
#else
- const Register card_index = rdx;
+ const Register card_index = rcx;
f.load_argument(0, card_index);
__ shrl(card_index, CardTableModRefBS::card_shift);
Address index(noreg, card_index, Address::times_1);
__ leal(card_addr, __ as_Address(ArrayAddress(cardtable, index)));
@@ -1714,16 +1733,36 @@
__ pop(rbx);
__ jmp(done);
__ bind(runtime);
- NOT_LP64(__ push(rcx);)
+ __ push(rdx);
+#ifdef _LP64
+ __ push(r8);
+ __ push(r9);
+ __ push(r10);
+ __ push(r11);
+# ifndef _WIN64
+ __ push(rdi);
+ __ push(rsi);
+# endif
+#endif
__ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), card_addr, thread);
- NOT_LP64(__ pop(rcx);)
-
- __ bind(done);
+#ifdef _LP64
+# ifndef _WIN64
+ __ pop(rsi);
+ __ pop(rdi);
+# endif
+ __ pop(r11);
+ __ pop(r10);
+ __ pop(r9);
+ __ pop(r8);
+#endif
__ pop(rdx);
+ __ bind(done);
+
+ __ pop(rcx);
__ pop(rax);
}
break;
#endif // !SERIALGC