Mercurial > hg > graal-compiler
comparison src/cpu/sparc/vm/assembler_sparc.cpp @ 3898:a64d352d1118
7085137: -XX:+VerifyOops is broken
Summary: Replace set() with patchable_set() to generate 8 instructions always.
Reviewed-by: iveresov, never, roland
author | kvn |
---|---|
date | Wed, 31 Aug 2011 09:48:21 -0700 |
parents | baf763f388e6 |
children | d968f546734e |
comparison
equal
deleted
inserted
replaced
3897:de847cac9235 | 3898:a64d352d1118 |
---|---|
1792 stx(O0,SP,frame::register_save_words*wordSize+STACK_BIAS+0*8); | 1792 stx(O0,SP,frame::register_save_words*wordSize+STACK_BIAS+0*8); |
1793 stx(O1,SP,frame::register_save_words*wordSize+STACK_BIAS+1*8); | 1793 stx(O1,SP,frame::register_save_words*wordSize+STACK_BIAS+1*8); |
1794 mov(reg,O0); // Move arg into O0; arg might be in O7 which is about to be crushed | 1794 mov(reg,O0); // Move arg into O0; arg might be in O7 which is about to be crushed |
1795 stx(O7,SP,frame::register_save_words*wordSize+STACK_BIAS+7*8); | 1795 stx(O7,SP,frame::register_save_words*wordSize+STACK_BIAS+7*8); |
1796 | 1796 |
1797 set((intptr_t)real_msg, O1); | 1797 // Size of set() should stay the same |
1798 patchable_set((intptr_t)real_msg, O1); | |
1798 // Load address to call to into O7 | 1799 // Load address to call to into O7 |
1799 load_ptr_contents(a, O7); | 1800 load_ptr_contents(a, O7); |
1800 // Register call to verify_oop_subroutine | 1801 // Register call to verify_oop_subroutine |
1801 callr(O7, G0); | 1802 callr(O7, G0); |
1802 delayed()->nop(); | 1803 delayed()->nop(); |
1829 stx(O0,SP,frame::register_save_words*wordSize+STACK_BIAS+0*8); | 1830 stx(O0,SP,frame::register_save_words*wordSize+STACK_BIAS+0*8); |
1830 stx(O1,SP,frame::register_save_words*wordSize+STACK_BIAS+1*8); | 1831 stx(O1,SP,frame::register_save_words*wordSize+STACK_BIAS+1*8); |
1831 ld_ptr(addr.base(), addr.disp() + 8*8, O0); // Load arg into O0; arg might be in O7 which is about to be crushed | 1832 ld_ptr(addr.base(), addr.disp() + 8*8, O0); // Load arg into O0; arg might be in O7 which is about to be crushed |
1832 stx(O7,SP,frame::register_save_words*wordSize+STACK_BIAS+7*8); | 1833 stx(O7,SP,frame::register_save_words*wordSize+STACK_BIAS+7*8); |
1833 | 1834 |
1834 set((intptr_t)real_msg, O1); | 1835 // Size of set() should stay the same |
1836 patchable_set((intptr_t)real_msg, O1); | |
1835 // Load address to call to into O7 | 1837 // Load address to call to into O7 |
1836 load_ptr_contents(a, O7); | 1838 load_ptr_contents(a, O7); |
1837 // Register call to verify_oop_subroutine | 1839 // Register call to verify_oop_subroutine |
1838 callr(O7, G0); | 1840 callr(O7, G0); |
1839 delayed()->nop(); | 1841 delayed()->nop(); |
1974 // It must be doubleword-aligned for storing doubles into it. | 1976 // It must be doubleword-aligned for storing doubles into it. |
1975 | 1977 |
1976 save_frame(::round_to(sizeof(RegistersForDebugging) / BytesPerWord, 2)); | 1978 save_frame(::round_to(sizeof(RegistersForDebugging) / BytesPerWord, 2)); |
1977 | 1979 |
1978 // stop_subroutine expects message pointer in I1. | 1980 // stop_subroutine expects message pointer in I1. |
1979 set((intptr_t)msg, O1); | 1981 // Size of set() should stay the same |
1982 patchable_set((intptr_t)msg, O1); | |
1980 | 1983 |
1981 // factor long stop-sequence into subroutine to save space | 1984 // factor long stop-sequence into subroutine to save space |
1982 assert(StubRoutines::Sparc::stop_subroutine_entry_address(), "hasn't been generated yet"); | 1985 assert(StubRoutines::Sparc::stop_subroutine_entry_address(), "hasn't been generated yet"); |
1983 | 1986 |
1984 // call indirectly to solve generation ordering problem | 1987 // call indirectly to solve generation ordering problem |
1996 | 1999 |
1997 void MacroAssembler::warn(const char* msg) { | 2000 void MacroAssembler::warn(const char* msg) { |
1998 save_frame(::round_to(sizeof(RegistersForDebugging) / BytesPerWord, 2)); | 2001 save_frame(::round_to(sizeof(RegistersForDebugging) / BytesPerWord, 2)); |
1999 RegistersForDebugging::save_registers(this); | 2002 RegistersForDebugging::save_registers(this); |
2000 mov(O0, L0); | 2003 mov(O0, L0); |
2001 set((intptr_t)msg, O0); | 2004 // Size of set() should stay the same |
2005 patchable_set((intptr_t)msg, O0); | |
2002 call( CAST_FROM_FN_PTR(address, warning) ); | 2006 call( CAST_FROM_FN_PTR(address, warning) ); |
2003 delayed()->nop(); | 2007 delayed()->nop(); |
2004 // ret(); | 2008 // ret(); |
2005 // delayed()->restore(); | 2009 // delayed()->restore(); |
2006 RegistersForDebugging::restore_registers(this, L0); | 2010 RegistersForDebugging::restore_registers(this, L0); |