1.1 --- a/src/cpu/x86/vm/assembler_x86.inline.hpp Fri Nov 30 11:44:05 2012 -0800 1.2 +++ b/src/cpu/x86/vm/assembler_x86.inline.hpp Fri Nov 30 15:23:16 2012 -0800 1.3 @@ -28,48 +28,6 @@ 1.4 #include "asm/assembler.inline.hpp" 1.5 #include "asm/codeBuffer.hpp" 1.6 #include "code/codeCache.hpp" 1.7 -#include "runtime/handles.inline.hpp" 1.8 - 1.9 -inline void MacroAssembler::pd_patch_instruction(address branch, address target) { 1.10 - unsigned char op = branch[0]; 1.11 - assert(op == 0xE8 /* call */ || 1.12 - op == 0xE9 /* jmp */ || 1.13 - op == 0xEB /* short jmp */ || 1.14 - (op & 0xF0) == 0x70 /* short jcc */ || 1.15 - op == 0x0F && (branch[1] & 0xF0) == 0x80 /* jcc */, 1.16 - "Invalid opcode at patch point"); 1.17 - 1.18 - if (op == 0xEB || (op & 0xF0) == 0x70) { 1.19 - // short offset operators (jmp and jcc) 1.20 - char* disp = (char*) &branch[1]; 1.21 - int imm8 = target - (address) &disp[1]; 1.22 - guarantee(this->is8bit(imm8), "Short forward jump exceeds 8-bit offset"); 1.23 - *disp = imm8; 1.24 - } else { 1.25 - int* disp = (int*) &branch[(op == 0x0F)? 2: 1]; 1.26 - int imm32 = target - (address) &disp[1]; 1.27 - *disp = imm32; 1.28 - } 1.29 -} 1.30 - 1.31 -#ifndef PRODUCT 1.32 -inline void MacroAssembler::pd_print_patched_instruction(address branch) { 1.33 - const char* s; 1.34 - unsigned char op = branch[0]; 1.35 - if (op == 0xE8) { 1.36 - s = "call"; 1.37 - } else if (op == 0xE9 || op == 0xEB) { 1.38 - s = "jmp"; 1.39 - } else if ((op & 0xF0) == 0x70) { 1.40 - s = "jcc"; 1.41 - } else if (op == 0x0F) { 1.42 - s = "jcc"; 1.43 - } else { 1.44 - s = "????"; 1.45 - } 1.46 - tty->print("%s (unresolved)", s); 1.47 -} 1.48 -#endif // ndef PRODUCT 1.49 1.50 #ifndef _LP64 1.51 inline int Assembler::prefix_and_encode(int reg_enc, bool byteinst) { return reg_enc; }