hotspot/src/cpu/sparc/vm/nativeInst_sparc.cpp
changeset 8724 693c6b883b54
parent 7397 5b173b4ca846
child 8921 14bfe81f2a9d
equal deleted inserted replaced
8689:1d9c2c94ce9b 8724:693c6b883b54
    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);