Mercurial > hg > graal-compiler
comparison src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp @ 10997:46c544b8fbfc
8008407: remove SPARC V8 support
Summary: Removed most of the SPARC V8 instructions
Reviewed-by: kvn, twisti
author | morris |
---|---|
date | Fri, 07 Jun 2013 16:46:37 -0700 |
parents | 8e47bac5643a |
children | 7944aba7ba41 |
comparison
equal
deleted
inserted
replaced
10996:ea60d1de6735 | 10997:46c544b8fbfc |
---|---|
106 // save unlocked object header into the displaced header location on the stack | 106 // save unlocked object header into the displaced header location on the stack |
107 st_ptr(Rmark, Rbox, BasicLock::displaced_header_offset_in_bytes()); | 107 st_ptr(Rmark, Rbox, BasicLock::displaced_header_offset_in_bytes()); |
108 | 108 |
109 // compare object markOop with Rmark and if equal exchange Rscratch with object markOop | 109 // compare object markOop with Rmark and if equal exchange Rscratch with object markOop |
110 assert(mark_addr.disp() == 0, "cas must take a zero displacement"); | 110 assert(mark_addr.disp() == 0, "cas must take a zero displacement"); |
111 casx_under_lock(mark_addr.base(), Rmark, Rscratch, (address)StubRoutines::Sparc::atomic_memory_operation_lock_addr()); | 111 cas_ptr(mark_addr.base(), Rmark, Rscratch); |
112 // if compare/exchange succeeded we found an unlocked object and we now have locked it | 112 // if compare/exchange succeeded we found an unlocked object and we now have locked it |
113 // hence we are done | 113 // hence we are done |
114 cmp(Rmark, Rscratch); | 114 cmp(Rmark, Rscratch); |
115 brx(Assembler::equal, false, Assembler::pt, done); | 115 brx(Assembler::equal, false, Assembler::pt, done); |
116 delayed()->sub(Rscratch, SP, Rscratch); //pull next instruction into delay slot | 116 delayed()->sub(Rscratch, SP, Rscratch); //pull next instruction into delay slot |
147 verify_oop(Roop); | 147 verify_oop(Roop); |
148 } | 148 } |
149 | 149 |
150 // Check if it is still a light weight lock, this is is true if we see | 150 // Check if it is still a light weight lock, this is is true if we see |
151 // the stack address of the basicLock in the markOop of the object | 151 // the stack address of the basicLock in the markOop of the object |
152 casx_under_lock(mark_addr.base(), Rbox, Rmark, (address)StubRoutines::Sparc::atomic_memory_operation_lock_addr()); | 152 cas_ptr(mark_addr.base(), Rbox, Rmark); |
153 cmp(Rbox, Rmark); | 153 cmp(Rbox, Rmark); |
154 | 154 |
155 brx(Assembler::notEqual, false, Assembler::pn, slow_case); | 155 brx(Assembler::notEqual, false, Assembler::pn, slow_case); |
156 delayed()->nop(); | 156 delayed()->nop(); |
157 // Done | 157 // Done |
274 // use a loop | 274 // use a loop |
275 add(obj, hdr_size_in_bytes, t1); // compute address of first element | 275 add(obj, hdr_size_in_bytes, t1); // compute address of first element |
276 sub(var_size_in_bytes, hdr_size_in_bytes, t2); // compute size of body | 276 sub(var_size_in_bytes, hdr_size_in_bytes, t2); // compute size of body |
277 initialize_body(t1, t2); | 277 initialize_body(t1, t2); |
278 #ifndef _LP64 | 278 #ifndef _LP64 |
279 } else if (VM_Version::v9_instructions_work() && con_size_in_bytes < threshold * 2) { | 279 } else if (con_size_in_bytes < threshold * 2) { |
280 // on v9 we can do double word stores to fill twice as much space. | 280 // on v9 we can do double word stores to fill twice as much space. |
281 assert(hdr_size_in_bytes % 8 == 0, "double word aligned"); | 281 assert(hdr_size_in_bytes % 8 == 0, "double word aligned"); |
282 assert(con_size_in_bytes % 8 == 0, "double word aligned"); | 282 assert(con_size_in_bytes % 8 == 0, "double word aligned"); |
283 for (int i = hdr_size_in_bytes; i < con_size_in_bytes; i += 2 * HeapWordSize) stx(G0, obj, i); | 283 for (int i = hdr_size_in_bytes; i < con_size_in_bytes; i += 2 * HeapWordSize) stx(G0, obj, i); |
284 #endif | 284 #endif |