Skip to content

Commit ea70e16

Browse files
Pengzhou0810yinshiyou
authored andcommitted
loongarch64: Refine rot optimization.
1 parent 116aee7 commit ea70e16

File tree

8 files changed

+2532
-2896
lines changed

8 files changed

+2532
-2896
lines changed

common_loongarch64.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ static inline int WhereAmI(void){
129129
#define CMPLE fcmp.cle.d
130130
#define CMPLT fcmp.clt.d
131131
#define NEG fneg.d
132+
#define FFINT ffint.d.l
132133

133134
#define XVFSUB xvfsub.d
134135
#define XVFADD xvfadd.d
@@ -139,6 +140,8 @@ static inline int WhereAmI(void){
139140
#define XVFMAXA xvfmaxa.d
140141
#define XVCMPEQ xvfcmp.ceq.d
141142
#define XVCMPLT xvfcmp.clt.d
143+
#define XVMUL xvfmul.d
144+
#define XVMSUB xvfmsub.d
142145

143146
#define VFSUB vfsub.d
144147
#define VFADD vfadd.d
@@ -149,6 +152,8 @@ static inline int WhereAmI(void){
149152
#define VFMAXA vfmaxa.d
150153
#define VCMPEQ vfcmp.ceq.d
151154
#define VCMPLT vfcmp.clt.d
155+
#define VMUL vfmul.d
156+
#define VMSUB vfmsub.d
152157

153158
#else
154159

@@ -174,6 +179,7 @@ static inline int WhereAmI(void){
174179
#define CMPLE fcmp.cle.s
175180
#define CMPLT fcmp.clt.s
176181
#define NEG fneg.s
182+
#define FFINT ffint.s.l
177183

178184
#define XVFSUB xvfsub.s
179185
#define XVFADD xvfadd.s
@@ -184,6 +190,8 @@ static inline int WhereAmI(void){
184190
#define XVFMAXA xvfmaxa.s
185191
#define XVCMPEQ xvfcmp.ceq.s
186192
#define XVCMPLT xvfcmp.clt.s
193+
#define XVMUL xvfmul.s
194+
#define XVMSUB xvfmsub.s
187195

188196
#define VFSUB vfsub.s
189197
#define VFADD vfadd.s
@@ -194,6 +202,8 @@ static inline int WhereAmI(void){
194202
#define VFMAXA vfmaxa.s
195203
#define VCMPEQ vfcmp.ceq.s
196204
#define VCMPLT vfcmp.clt.s
205+
#define VMUL vfmul.s
206+
#define VMSUB vfmsub.s
197207

198208
#endif /* defined(DOUBLE) */
199209

kernel/loongarch64/KERNEL.LOONGSON2K1000

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ DSUMKERNEL = sum_lsx.S
4949
SASUMKERNEL = sasum_lsx.S
5050
DASUMKERNEL = dasum_lsx.S
5151

52-
SROTKERNEL = srot_lsx.S
53-
DROTKERNEL = drot_lsx.S
52+
SROTKERNEL = rot_lsx.S
53+
DROTKERNEL = rot_lsx.S
5454

5555
SNRM2KERNEL = snrm2_lsx.S
5656
DNRM2KERNEL = dnrm2_lsx.S

kernel/loongarch64/KERNEL.LOONGSON3R5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ DSUMKERNEL = sum_lasx.S
4949
SASUMKERNEL = sasum_lasx.S
5050
DASUMKERNEL = dasum_lasx.S
5151

52-
SROTKERNEL = srot_lasx.S
53-
DROTKERNEL = drot_lasx.S
52+
SROTKERNEL = rot_lasx.S
53+
DROTKERNEL = rot_lasx.S
5454

5555
SNRM2KERNEL = snrm2_lasx.S
5656
DNRM2KERNEL = dnrm2_lasx.S

0 commit comments

Comments
 (0)