comparison src/cpu/ppc/vm/nativeInst_ppc.hpp @ 14445:67fa91961822

8029940: PPC64 (part 122): C2 compiler port Reviewed-by: kvn
author goetz
date Wed, 11 Dec 2013 00:06:11 +0100
parents 41b780b43b74
children b858620b0081
comparison
equal deleted inserted replaced
14444:492e67693373 14445:67fa91961822
130 // sequence `load_const, mtctr, bctrl' or the sequence 'ld_from_toc, 130 // sequence `load_const, mtctr, bctrl' or the sequence 'ld_from_toc,
131 // mtctr, bctrl'. 131 // mtctr, bctrl'.
132 class NativeCall: public NativeInstruction { 132 class NativeCall: public NativeInstruction {
133 public: 133 public:
134 134
135 enum specific_constants { 135 enum ppc_specific_constants {
136 load_const_instruction_size = 28, 136 load_const_instruction_size = 28,
137 load_const_from_method_toc_instruction_size = 16, 137 load_const_from_method_toc_instruction_size = 16,
138 instruction_size = 16 // Used in shared code for calls with reloc_info. 138 instruction_size = 16 // Used in shared code for calls with reloc_info.
139 }; 139 };
140 140
238 // An interface for accessing/manipulating native set_oop imm, reg instructions. 238 // An interface for accessing/manipulating native set_oop imm, reg instructions.
239 // (used to manipulate inlined data references, etc.) 239 // (used to manipulate inlined data references, etc.)
240 class NativeMovConstReg: public NativeInstruction { 240 class NativeMovConstReg: public NativeInstruction {
241 public: 241 public:
242 242
243 enum specific_constants { 243 enum ppc_specific_constants {
244 load_const_instruction_size = 20, 244 load_const_instruction_size = 20,
245 load_const_from_method_toc_instruction_size = 8, 245 load_const_from_method_toc_instruction_size = 8,
246 instruction_size = 8 // Used in shared code for calls with reloc_info. 246 instruction_size = 8 // Used in shared code for calls with reloc_info.
247 }; 247 };
248 248
277 class NativeJump: public NativeInstruction { 277 class NativeJump: public NativeInstruction {
278 public: 278 public:
279 // We use MacroAssembler::b64_patchable() for implementing a 279 // We use MacroAssembler::b64_patchable() for implementing a
280 // jump-anywhere instruction. 280 // jump-anywhere instruction.
281 281
282 enum specific_constants { 282 enum ppc_specific_constants {
283 instruction_size = MacroAssembler::b64_patchable_size 283 instruction_size = MacroAssembler::b64_patchable_size
284 }; 284 };
285 285
286 // Checks whether instr points at a NativeJump instruction. 286 // Checks whether instr points at a NativeJump instruction.
287 static bool is_jump_at(address instr) { 287 static bool is_jump_at(address instr) {
382 int destination_toc_offset() const; 382 int destination_toc_offset() const;
383 383
384 void set_destination(address new_destination); 384 void set_destination(address new_destination);
385 }; 385 };
386 386
387
388 inline bool is_NativeCallTrampolineStub_at(address address) { 387 inline bool is_NativeCallTrampolineStub_at(address address) {
389 int first_instr = *(int*)address; 388 int first_instr = *(int*)address;
390 return Assembler::is_addis(first_instr) && 389 return Assembler::is_addis(first_instr) &&
391 (Register)(intptr_t)Assembler::inv_rt_field(first_instr) == R12_scratch2; 390 (Register)(intptr_t)Assembler::inv_rt_field(first_instr) == R12_scratch2;
392 } 391 }