Skip to content

Commit 154baad

Browse files
Pengzhou0810yinshiyou
authored andcommitted
loongarch64: Refine iamin optimization.
1 parent 36c12c4 commit 154baad

8 files changed

Lines changed: 649 additions & 863 deletions

File tree

common_loongarch64.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ static inline int WhereAmI(void){
119119
#define MOV fmov.d
120120
#define CMOVT fsel
121121
#define MTC movgr2fr.d
122+
#define MTG movfr2gr.d
122123
#define FABS fabs.d
123124
#define FMIN fmin.d
124125
#define FMINA fmina.d
@@ -136,6 +137,8 @@ static inline int WhereAmI(void){
136137
#define XVFMINA xvfmina.d
137138
#define XVFMAX xvfmax.d
138139
#define XVFMAXA xvfmaxa.d
140+
#define XVCMPEQ xvfcmp.ceq.d
141+
#define XVCMPLT xvfcmp.clt.d
139142

140143
#define VFSUB vfsub.d
141144
#define VFADD vfadd.d
@@ -144,6 +147,8 @@ static inline int WhereAmI(void){
144147
#define VFMINA vfmina.d
145148
#define VFMAX vfmax.d
146149
#define VFMAXA vfmaxa.d
150+
#define VCMPEQ vfcmp.ceq.d
151+
#define VCMPLT vfcmp.clt.d
147152

148153
#else
149154

@@ -159,6 +164,7 @@ static inline int WhereAmI(void){
159164
#define MOV fmov.s
160165
#define CMOVT fsel
161166
#define MTC movgr2fr.w
167+
#define MTG movfr2gr.s
162168
#define FABS fabs.s
163169
#define FMIN fmin.s
164170
#define FMINA fmina.s
@@ -176,6 +182,8 @@ static inline int WhereAmI(void){
176182
#define XVFMINA xvfmina.s
177183
#define XVFMAX xvfmax.s
178184
#define XVFMAXA xvfmaxa.s
185+
#define XVCMPEQ xvfcmp.ceq.s
186+
#define XVCMPLT xvfcmp.clt.s
179187

180188
#define VFSUB vfsub.s
181189
#define VFADD vfadd.s
@@ -184,6 +192,8 @@ static inline int WhereAmI(void){
184192
#define VFMINA vfmina.s
185193
#define VFMAX vfmax.s
186194
#define VFMAXA vfmaxa.s
195+
#define VCMPEQ vfcmp.ceq.s
196+
#define VCMPLT vfcmp.clt.s
187197

188198
#endif /* defined(DOUBLE) */
189199

kernel/loongarch64/KERNEL.LOONGSON2K1000

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ IDMINKERNEL = idmin_lsx.S
2828
ISAMAXKERNEL = isamax_lsx.S
2929
IDAMAXKERNEL = idamax_lsx.S
3030

31-
ISAMINKERNEL = isamin_lsx.S
32-
IDAMINKERNEL = idamin_lsx.S
31+
ISAMINKERNEL = iamin_lsx.S
32+
IDAMINKERNEL = iamin_lsx.S
3333

3434
SCOPYKERNEL = copy_lsx.S
3535
DCOPYKERNEL = copy_lsx.S

kernel/loongarch64/KERNEL.LOONGSON3R5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ IDMINKERNEL = idmin_lasx.S
2828
ISAMAXKERNEL = isamax_lasx.S
2929
IDAMAXKERNEL = idamax_lasx.S
3030

31-
ISAMINKERNEL = isamin_lasx.S
32-
IDAMINKERNEL = idamin_lasx.S
31+
ISAMINKERNEL = iamin_lasx.S
32+
IDAMINKERNEL = iamin_lasx.S
3333

3434
SCOPYKERNEL = copy_lasx.S
3535
DCOPYKERNEL = copy_lasx.S

0 commit comments

Comments
 (0)