diff options
-rw-r--r-- | runtime/interpreter/mterp/arm64ng/main.S | 5 | ||||
-rw-r--r-- | runtime/interpreter/mterp/armng/main.S | 9 | ||||
-rw-r--r-- | runtime/interpreter/mterp/x86_64ng/main.S | 5 | ||||
-rw-r--r-- | runtime/interpreter/mterp/x86ng/main.S | 5 |
4 files changed, 10 insertions, 14 deletions
diff --git a/runtime/interpreter/mterp/arm64ng/main.S b/runtime/interpreter/mterp/arm64ng/main.S index b83e859c07..6d077d5839 100644 --- a/runtime/interpreter/mterp/arm64ng/main.S +++ b/runtime/interpreter/mterp/arm64ng/main.S @@ -290,11 +290,11 @@ END \name .endm .macro BRANCH + add xPC, xPC, wINST, sxtw #1 // update xPC // Update method counter and do a suspend check if the branch is negative or zero. cmp wINST, #0 b.le 2f 1: - add xPC, xPC, wINST, sxtw #1 // update xPC FETCH wINST, 0 // load wINST GET_INST_OPCODE ip // extract opcode from wINST GOTO_OPCODE ip // jump to next instruction @@ -1783,11 +1783,10 @@ NterpNewArray: b 1b NterpHandleHotnessOverflow: - add x1, xPC, xINST, lsl #1 + mov x1, xPC mov x2, xFP bl nterp_hot_method cbnz x0, 1f - add xPC, xPC, wINST, sxtw #1 // update xPC FETCH wINST, 0 // load wINST GET_INST_OPCODE ip // extract opcode from wINST GOTO_OPCODE ip // jump to next instruction diff --git a/runtime/interpreter/mterp/armng/main.S b/runtime/interpreter/mterp/armng/main.S index e26d9222fa..ac1a6b050e 100644 --- a/runtime/interpreter/mterp/armng/main.S +++ b/runtime/interpreter/mterp/armng/main.S @@ -301,12 +301,12 @@ END \name .endm .macro BRANCH + add rPC, rPC, rINST, lsl #1 // Update method counter and do a suspend check if the branch is negative or zero. cmp rINST, #0 ble 2f 1: - add r2, rINST, rINST // r2<- byte offset - FETCH_ADVANCE_INST_RB r2 // update xPC, load rINST + FETCH_INST // load rINST GET_INST_OPCODE ip // extract opcode from rINST GOTO_OPCODE ip // jump to next instruction 2: @@ -1799,13 +1799,12 @@ NterpNewArray: NterpHandleHotnessOverflow: - add r1, rPC, rINST, lsl #1 + mov r1, rPC mov r2, rFP bl nterp_hot_method cmp r0, #0 bne 1f - add r2, rINST, rINST // w2<- byte offset - FETCH_ADVANCE_INST_RB r2 // update rPC, load rINST + FETCH_INST // load rINST GET_INST_OPCODE ip // extract opcode from rINST GOTO_OPCODE ip // jump to next instruction 1: diff --git a/runtime/interpreter/mterp/x86_64ng/main.S b/runtime/interpreter/mterp/x86_64ng/main.S index 8ba3e3d71f..88e028507b 100644 --- a/runtime/interpreter/mterp/x86_64ng/main.S +++ b/runtime/interpreter/mterp/x86_64ng/main.S @@ -251,11 +251,11 @@ END_FUNCTION \name .macro BRANCH + leaq (rPC, rINSTq, 2), rPC // Update method counter and do a suspend check if the branch is negative or zero. testq rINSTq, rINSTq jle 3f 2: - leaq (rPC, rINSTq, 2), rPC FETCH_INST GOTO_NEXT 3: @@ -2171,12 +2171,11 @@ NterpGetInstanceField: OP_IGET load="movl", wide=0 NterpHandleHotnessOverflow: - leaq (rPC, rINSTq, 2), %rsi + movq rPC, %rsi movq rFP, %rdx call nterp_hot_method testq %rax, %rax jne 1f - leaq (rPC, rINSTq, 2), rPC FETCH_INST GOTO_NEXT 1: diff --git a/runtime/interpreter/mterp/x86ng/main.S b/runtime/interpreter/mterp/x86ng/main.S index b785f24bb4..9130dd1637 100644 --- a/runtime/interpreter/mterp/x86ng/main.S +++ b/runtime/interpreter/mterp/x86ng/main.S @@ -293,11 +293,11 @@ END_FUNCTION \name .macro BRANCH + leal (rPC, rINST, 2), rPC // Update method counter and do a suspend check if the branch is negative or zero. testl rINST, rINST jle 3f 2: - leal (rPC, rINST, 2), rPC FETCH_INST GOTO_NEXT 3: @@ -2240,12 +2240,11 @@ NterpCallSuspend: call SYMBOL(art_quick_test_suspend) RESTORE_IBASE movl LOCAL0(%esp), rINST - leal (rPC, rINST, 2), rPC FETCH_INST GOTO_NEXT NterpHandleHotnessOverflow: - leal (rPC, rINST, 2), %ecx + movl rPC, %ecx movl rFP, ARG2 // Save next PC. movl %ecx, LOCAL0(%esp) |