Mercurial > hg > truffle
comparison src/cpu/sparc/vm/nativeInst_sparc.cpp @ 2375:d673ef06fe96
7028374: race in fix_oop_relocations for scavengeable nmethods
Reviewed-by: kvn
author | never |
---|---|
date | Fri, 18 Mar 2011 15:52:42 -0700 |
parents | f95d63e2154a |
children | 1d1603768966 |
comparison
equal
deleted
inserted
replaced
2370:048f98400b8e | 2375:d673ef06fe96 |
---|---|
48 | 48 |
49 destreg = inv_rd(*(unsigned int *)instaddr); | 49 destreg = inv_rd(*(unsigned int *)instaddr); |
50 // Generate a the new sequence | 50 // Generate a the new sequence |
51 _masm->patchable_sethi(x, destreg); | 51 _masm->patchable_sethi(x, destreg); |
52 ICache::invalidate_range(instaddr, 7 * BytesPerInstWord); | 52 ICache::invalidate_range(instaddr, 7 * BytesPerInstWord); |
53 } | |
54 | |
55 void NativeInstruction::verify_data64_sethi(address instaddr, intptr_t x) { | |
56 ResourceMark rm; | |
57 unsigned char buffer[10 * BytesPerInstWord]; | |
58 CodeBuffer buf(buffer, 10 * BytesPerInstWord); | |
59 MacroAssembler masm(&buf); | |
60 | |
61 Register destreg = inv_rd(*(unsigned int *)instaddr); | |
62 // Generate the proper sequence into a temporary buffer and compare | |
63 // it with the original sequence. | |
64 masm.patchable_sethi(x, destreg); | |
65 int len = buffer - masm.pc(); | |
66 for (int i = 0; i < len; i++) { | |
67 assert(instaddr[i] == buffer[i], "instructions must match"); | |
68 } | |
53 } | 69 } |
54 | 70 |
55 void NativeInstruction::verify() { | 71 void NativeInstruction::verify() { |
56 // make sure code pattern is actually an instruction address | 72 // make sure code pattern is actually an instruction address |
57 address addr = addr_at(0); | 73 address addr = addr_at(0); |