Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoongArch64: fixed cscal and zscal #5078

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions kernel/loongarch64/cscal_lasx.S
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bne INCX, TEMP, .L22

.L11:
bge $r0, I, .L997
CMPEQ $fcc0, ALPHAR, a1
CMPEQ $fcc1, ALPHAI, a1
bge $r0, I, .L997
bceqz $fcc0, .L13
b .L14
.align 3
Expand Down Expand Up @@ -182,10 +182,10 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.align 3

.L22:
bge $r0, I, .L997
move XX, X
CMPEQ $fcc0, ALPHAR, a1
CMPEQ $fcc1, ALPHAI, a1
bge $r0, I, .L997
move XX, X
bceqz $fcc0, .L23
b .L24
.align 3
Expand Down Expand Up @@ -477,6 +477,16 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif
bge $r0, I, .L999
.align 3
bceqz $fcc0, .L998
bceqz $fcc1, .L998

.L996:
addi.d I, I, -1
ST a1, X, 0 * SIZE
ST a1, X, 1 * SIZE
add.d X, X, INCX
blt $r0, I, .L996
b .L999

.L998:
LD a1, X, 0 * SIZE
Expand Down
16 changes: 12 additions & 4 deletions kernel/loongarch64/cscal_lsx.S
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bne INCX, TEMP, .L22

.L11:
bge $r0, I, .L997
CMPEQ $fcc0, ALPHAR, a1
CMPEQ $fcc1, ALPHAI, a1
bge $r0, I, .L997
bceqz $fcc0, .L13
b .L14
.align 3
Expand Down Expand Up @@ -201,10 +201,10 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.align 3

.L22:
bge $r0, I, .L997
move XX, X
CMPEQ $fcc0, ALPHAR, a1
CMPEQ $fcc1, ALPHAI, a1
bge $r0, I, .L997
move XX, X
bceqz $fcc0, .L23
b .L24
.align 3
Expand Down Expand Up @@ -422,7 +422,15 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
andi I, N, 3
bge $r0, I, .L999
.align 3

bceqz $fcc0, .L998
bceqz $fcc1, .L998
.L996:
addi.d I, I, -1
ST a1, X, 0 * SIZE
ST a1, X, 1 * SIZE
add.d X, X, INCX
blt $r0, I, .L996
b .L999
.L998:
LD a1, X, 0 * SIZE
LD a2, X, 1 * SIZE
Expand Down
Loading