Mercurial > hg > graal-compiler
diff src/cpu/x86/vm/assembler_x86.cpp @ 1583:02e771df338e
6958254: -XX:+VerifyOops is broken on x86
Summary: save and restore r10 in verify_oop().
Reviewed-by: never
author | kvn |
---|---|
date | Thu, 03 Jun 2010 14:20:27 -0700 |
parents | e9ff18c4ace7 |
children | 66c5dadb4d61 |
line wrap: on
line diff
--- a/src/cpu/x86/vm/assembler_x86.cpp Wed Jun 02 22:45:42 2010 -0700 +++ b/src/cpu/x86/vm/assembler_x86.cpp Thu Jun 03 14:20:27 2010 -0700 @@ -7643,6 +7643,9 @@ // Pass register number to verify_oop_subroutine char* b = new char[strlen(s) + 50]; sprintf(b, "verify_oop: %s: %s", reg->name(), s); +#ifdef _LP64 + push(rscratch1); // save r10, trashed by movptr() +#endif push(rax); // save rax, push(reg); // pass register argument ExternalAddress buffer((address) b); @@ -7653,6 +7656,7 @@ // call indirectly to solve generation ordering problem movptr(rax, ExternalAddress(StubRoutines::verify_oop_subroutine_entry_address())); call(rax); + // Caller pops the arguments (oop, message) and restores rax, r10 } @@ -7767,6 +7771,9 @@ char* b = new char[strlen(s) + 50]; sprintf(b, "verify_oop_addr: %s", s); +#ifdef _LP64 + push(rscratch1); // save r10, trashed by movptr() +#endif push(rax); // save rax, // addr may contain rsp so we will have to adjust it based on the push // we just did @@ -7789,7 +7796,7 @@ // call indirectly to solve generation ordering problem movptr(rax, ExternalAddress(StubRoutines::verify_oop_subroutine_entry_address())); call(rax); - // Caller pops the arguments and restores rax, from the stack + // Caller pops the arguments (addr, message) and restores rax, r10. } void MacroAssembler::verify_tlab() {