@@ -38,7 +38,7 @@ class NativeNMethodBarrier: public NativeInstruction {
3838
3939 NativeMovRegMem* get_patchable_instruction_handle () const {
4040 // Endianness is handled by NativeMovRegMem
41- return reinterpret_cast <NativeMovRegMem*>(get_barrier_start_address () + 3 * 4 );
41+ return reinterpret_cast <NativeMovRegMem*>(get_barrier_start_address ());
4242 }
4343
4444public:
@@ -95,12 +95,6 @@ class NativeNMethodBarrier: public NativeInstruction {
9595
9696 uint* current_instruction = reinterpret_cast <uint*>(get_barrier_start_address ());
9797
98- // calculate_address_from_global_toc (compound instruction)
99- verify_op_code_manually (current_instruction, MacroAssembler::is_addis (*current_instruction));
100- verify_op_code_manually (current_instruction, MacroAssembler::is_addi (*current_instruction));
101-
102- verify_op_code_manually (current_instruction, MacroAssembler::is_mtctr (*current_instruction));
103-
10498 get_patchable_instruction_handle ()->verify ();
10599 current_instruction += 2 ;
106100
@@ -109,6 +103,12 @@ class NativeNMethodBarrier: public NativeInstruction {
109103 // cmpw (mnemonic)
110104 verify_op_code (current_instruction, Assembler::CMP_OPCODE);
111105
106+ // calculate_address_from_global_toc (compound instruction)
107+ verify_op_code_manually (current_instruction, MacroAssembler::is_addis (*current_instruction));
108+ verify_op_code_manually (current_instruction, MacroAssembler::is_addi (*current_instruction));
109+
110+ verify_op_code_manually (current_instruction, MacroAssembler::is_mtctr (*current_instruction));
111+
112112 // bnectrl (mnemonic) (weak check; not checking the exact type)
113113 verify_op_code (current_instruction, Assembler::BCCTR_OPCODE);
114114
0 commit comments