Skip to content

Commit b61697e

Browse files
committed
Remove unused TMP4. Use intra-precedure call scratch registers for TMP2 and TMP3.
1 parent f6df3b0 commit b61697e

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed

ext/opcache/jit/zend_jit_arm64.dasc

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,18 @@
6969
|.define ZREG_FPR1, ZREG_V1
7070

7171
// Temporaries, not preserved across calls
72-
|.define TMP1, x11
73-
|.define TMP1w, w11
74-
|.define TMP2, x12
75-
|.define TMP2w, w12
76-
|.define TMP3, x13
77-
|.define TMP3w, w13
78-
|.define TMP4, x14
79-
|.define TMP4w, w14
72+
|.define TMP1, x15
73+
|.define TMP1w, w15
74+
|.define TMP2, x16
75+
|.define TMP2w, w16
76+
|.define TMP3, x17
77+
|.define TMP3w, w17
8078
|.define FPTMP, v16
8179
|.define FPTMPd, d16
8280

83-
|.define ZREG_TMP1, ZREG_X11
84-
|.define ZREG_TMP2, ZREG_X12
85-
|.define ZREG_TMP3, ZREG_X13
86-
|.define ZREG_TMP4, ZREG_X14
81+
|.define ZREG_TMP1, ZREG_X15
82+
|.define ZREG_TMP2, ZREG_X16
83+
|.define ZREG_TMP3, ZREG_X17
8784
|.define ZREG_FPTMP, ZREG_V16
8885

8986
|.define HYBRID_SPAD, #32 // padding for stack alignment

ext/opcache/jit/zend_jit_arm64.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,9 @@ typedef struct _zend_jit_registers_buf {
125125
#define ZREG_FPR0 ZREG_V0
126126
#define ZREG_FPR1 ZREG_V1
127127

128-
#define ZREG_TMP1 ZREG_X11
129-
#define ZREG_TMP2 ZREG_X12
130-
#define ZREG_TMP3 ZREG_X13
131-
#define ZREG_TMP4 ZREG_X14
128+
#define ZREG_TMP1 ZREG_X15
129+
#define ZREG_TMP2 ZREG_X16
130+
#define ZREG_TMP3 ZREG_X17
132131
#define ZREG_FPTMP ZREG_V16
133132

134133
#define ZREG_COPY ZREG_REG0
@@ -141,7 +140,7 @@ typedef uint64_t zend_regset;
141140
# define ZEND_REGSET_FIXED \
142141
(ZEND_REGSET(ZREG_RSP) | ZEND_REGSET(ZREG_RLR) | ZEND_REGSET(ZREG_RFP) | \
143142
ZEND_REGSET(ZREG_RPR) | ZEND_REGSET(ZREG_FP) | ZEND_REGSET(ZREG_IP) | \
144-
ZEND_REGSET_INTERVAL(ZREG_TMP1, ZREG_TMP4) | ZEND_REGSET(ZREG_FPTMP))
143+
ZEND_REGSET_INTERVAL(ZREG_TMP1, ZREG_TMP3) | ZEND_REGSET(ZREG_FPTMP))
145144
# define ZEND_REGSET_GP \
146145
ZEND_REGSET_DIFFERENCE(ZEND_REGSET_INTERVAL(ZREG_X0, ZREG_X30), ZEND_REGSET_FIXED)
147146
# define ZEND_REGSET_FP \

0 commit comments

Comments
 (0)