Skip to content

Commit 2662e1b

Browse files
authored
jit: Remove duplicate LSX macro definitions (#815)
1 parent 0ee6302 commit 2662e1b

File tree

1 file changed

+17
-20
lines changed

1 file changed

+17
-20
lines changed

src/pcre2_jit_simd_inc.h

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1865,21 +1865,18 @@ typedef sljit_ins sljit_u32;
18651865
#define IMM_UI2(imm) (((sljit_ins)(imm) << 10) & UI2_IMM_MASK)
18661866

18671867
// LSX OPCODES:
1868-
#define VLD 0x2c000000
1869-
#define VOR_V 0x71268000
1870-
#define VAND_V 0x71260000
18711868
#define VBSLL_V 0x728e0000
18721869
#define VMSKLTZ_B 0x729c4000
18731870
#define VPICKVE2GR_WU 0x72f3e000
18741871

18751872
#if PCRE2_CODE_UNIT_WIDTH == 8
1876-
#define VREPLGR2VR 0x729f0000
1873+
#define VREPLGR2VR_X 0x729f0000
18771874
#define VSEQ 0x70000000
18781875
#elif PCRE2_CODE_UNIT_WIDTH == 16
1879-
#define VREPLGR2VR 0x729f0400
1876+
#define VREPLGR2VR_X 0x729f0400
18801877
#define VSEQ 0x70008000
18811878
#else
1882-
#define VREPLGR2VR 0x729f0800
1879+
#define VREPLGR2VR_X 0x729f0800
18831880
#define VSEQ 0x70010000
18841881
#endif
18851882

@@ -1956,14 +1953,14 @@ if (common->mode == PCRE2_JIT_COMPLETE)
19561953
OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, char1 | bit);
19571954

19581955
/* VREPLGR2VR.B/H/W vd, rj */
1959-
push_inst(compiler, VREPLGR2VR | VD(cmp1_ind) | RJ_V(tmp1_reg_ind));
1956+
push_inst(compiler, VREPLGR2VR_X | VD(cmp1_ind) | RJ_V(tmp1_reg_ind));
19601957

19611958
if (char1 != char2)
19621959
{
19631960
OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, bit != 0 ? bit : char2);
19641961

19651962
/* VREPLGR2VR.B/H/W vd, rj */
1966-
push_inst(compiler, VREPLGR2VR | VD(cmp2_ind) | RJ_V(tmp1_reg_ind));
1963+
push_inst(compiler, VREPLGR2VR_X | VD(cmp2_ind) | RJ_V(tmp1_reg_ind));
19671964
}
19681965

19691966
OP1(SLJIT_MOV, TMP2, 0, STR_PTR, 0);
@@ -2086,14 +2083,14 @@ OP1(SLJIT_MOV, TMP3, 0, STR_PTR, 0);
20862083

20872084
OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, char1 | bit);
20882085

2089-
/* VREPLGR2VR vd, rj */
2090-
push_inst(compiler, VREPLGR2VR | VD(cmp1_ind) | RJ_V(tmp1_reg_ind));
2086+
/* VREPLGR2VR.B/H/W vd, rj */
2087+
push_inst(compiler, VREPLGR2VR_X | VD(cmp1_ind) | RJ_V(tmp1_reg_ind));
20912088

20922089
if (char1 != char2)
20932090
{
20942091
OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, bit != 0 ? bit : char2);
2095-
/* VREPLGR2VR vd, rj */
2096-
push_inst(compiler, VREPLGR2VR | VD(cmp2_ind) | RJ_V(tmp1_reg_ind));
2092+
/* VREPLGR2VR.B/H/W vd, rj */
2093+
push_inst(compiler, VREPLGR2VR_X | VD(cmp2_ind) | RJ_V(tmp1_reg_ind));
20972094
}
20982095

20992096
OP1(SLJIT_MOV, STR_PTR, 0, TMP2, 0);
@@ -2213,13 +2210,13 @@ else
22132210
}
22142211
}
22152212

2216-
/* VREPLGR2VR vd, rj */
2217-
push_inst(compiler, VREPLGR2VR | VD(cmp1a_ind) | RJ_V(tmp1_reg_ind));
2213+
/* VREPLGR2VR.B/H/W vd, rj */
2214+
push_inst(compiler, VREPLGR2VR_X | VD(cmp1a_ind) | RJ_V(tmp1_reg_ind));
22182215

22192216
if (char1a != char1b)
22202217
{
2221-
/* VREPLGR2VR vd, rj */
2222-
push_inst(compiler, VREPLGR2VR | VD(cmp1b_ind) | RJ_V(tmp2_reg_ind));
2218+
/* VREPLGR2VR.B/H/W vd, rj */
2219+
push_inst(compiler, VREPLGR2VR_X | VD(cmp1b_ind) | RJ_V(tmp2_reg_ind));
22232220
}
22242221

22252222
if (char2a == char2b)
@@ -2242,13 +2239,13 @@ else
22422239
}
22432240
}
22442241

2245-
/* VREPLGR2VR vd, rj */
2246-
push_inst(compiler, VREPLGR2VR | VD(cmp2a_ind) | RJ_V(tmp1_reg_ind));
2242+
/* VREPLGR2VR.B/H/W vd, rj */
2243+
push_inst(compiler, VREPLGR2VR_X | VD(cmp2a_ind) | RJ_V(tmp1_reg_ind));
22472244

22482245
if (char2a != char2b)
22492246
{
2250-
/* VREPLGR2VR vd, rj */
2251-
push_inst(compiler, VREPLGR2VR | VD(cmp2b_ind) | RJ_V(tmp2_reg_ind));
2247+
/* VREPLGR2VR.B/H/W vd, rj */
2248+
push_inst(compiler, VREPLGR2VR_X | VD(cmp2b_ind) | RJ_V(tmp2_reg_ind));
22522249
}
22532250

22542251
#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32

0 commit comments

Comments
 (0)