summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/interpreter/mterp/arm64ng/main.S19
1 files changed, 4 insertions, 15 deletions
diff --git a/runtime/interpreter/mterp/arm64ng/main.S b/runtime/interpreter/mterp/arm64ng/main.S
index cab9d00ab0..3ba175d73f 100644
--- a/runtime/interpreter/mterp/arm64ng/main.S
+++ b/runtime/interpreter/mterp/arm64ng/main.S
@@ -140,17 +140,6 @@
.endm
/*
- * Fetch the next instruction from an offset specified by "reg" and advance xPC.
- * xPC to point to the next instruction. "reg" must specify the distance
- * in bytes, *not* 16-bit code units, and may be a signed value.
- *
- */
-.macro FETCH_ADVANCE_INST_RB reg
- add xPC, xPC, \reg, sxtw
- ldrh wINST, [xPC]
-.endm
-
-/*
* Fetch a half-word code unit from an offset past the current PC. The
* "count" value is in 16-bit code units. Does not advance xPC.
*
@@ -304,8 +293,8 @@ END \name
// Update method counter and do a suspend check if the branch is negative.
tbnz wINST, #31, 2f
1:
- add w2, wINST, wINST // w2<- byte offset
- FETCH_ADVANCE_INST_RB w2 // update xPC, load wINST
+ 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
2:
@@ -1637,8 +1626,8 @@ NterpHandleHotnessOverflow:
mov x2, xFP
bl nterp_hot_method
cbnz x0, 1f
- add w2, wINST, wINST // w2<- byte offset
- FETCH_ADVANCE_INST_RB w2 // update xPC, load wINST
+ 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
1: