[aarch64-port-dev ] C1: Fix save/restore native result
Andrew Haley
aph at redhat.com
Wed Aug 21 08:33:41 PDT 2013
If we ever detect a safepoint in progress in a native
transition, we die.
Fixed thusly.
Andrew.
# HG changeset patch
# User aph
# Date 1377096180 -3600
# Node ID 5011c5a7feecc9abccfa2e3962195bc2af04b07f
# Parent 6ca74c561b2e3af452a8ceb78245581d8214269f
Correct save/restore native result
diff -r 6ca74c561b2e -r 5011c5a7feec src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp
--- a/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp Wed Aug 21 12:08:20 2013 +0100
+++ b/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp Wed Aug 21 15:43:00 2013 +0100
@@ -1024,6 +1024,23 @@
// which by this time is free to use
switch (ret_type) {
case T_FLOAT:
+ __ strs(v0, Address(rfp, -wordSize));
+ break;
+ case T_DOUBLE:
+ __ strd(v0, Address(rfp, -wordSize));
+ break;
+ case T_VOID: break;
+ default: {
+ __ str(r0, Address(rfp, -wordSize));
+ }
+ }
+}
+
+void SharedRuntime::restore_native_result(MacroAssembler *masm, BasicType ret_type, int frame_slots) {
+ // We always ignore the frame_slots arg and just use the space just below frame pointer
+ // which by this time is free to use
+ switch (ret_type) {
+ case T_FLOAT:
__ ldrs(v0, Address(rfp, -wordSize));
break;
case T_DOUBLE:
@@ -1035,23 +1052,6 @@
}
}
}
-
-void SharedRuntime::restore_native_result(MacroAssembler *masm, BasicType ret_type, int frame_slots) {
- // We always ignore the frame_slots arg and just use the space just below frame pointer
- // which by this time is free to use
- switch (ret_type) {
- case T_FLOAT:
- __ strs(v0, Address(rfp, -wordSize));
- break;
- case T_DOUBLE:
- __ strd(v0, Address(rfp, -wordSize));
- break;
- case T_VOID: break;
- default: {
- __ str(r0, Address(rfp, -wordSize));
- }
- }
-}
static void save_args(MacroAssembler *masm, int arg_count, int first_arg, VMRegPair *args) {
unsigned long x = 0; // Register bit vector
for ( int i = first_arg ; i < arg_count ; i++ ) {
More information about the aarch64-port-dev
mailing list