Text file
src/math/big/arith_riscv64.s
1 // Copyright 2020 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 //go:build !math_big_pure_go && riscv64
6 // +build !math_big_pure_go,riscv64
7
8 #include "textflag.h"
9
10 // This file provides fast assembly versions for the elementary
11 // arithmetic operations on vectors implemented in arith.go.
12
13 // func mulWW(x, y Word) (z1, z0 Word)
14 TEXT ·mulWW(SB),NOSPLIT,$0
15 MOV x+0(FP), X5
16 MOV y+8(FP), X6
17 MULHU X5, X6, X7
18 MUL X5, X6, X8
19 MOV X7, z1+16(FP)
20 MOV X8, z0+24(FP)
21 RET
22
23
24 TEXT ·addVV(SB),NOSPLIT,$0
25 JMP ·addVV_g(SB)
26
27 TEXT ·subVV(SB),NOSPLIT,$0
28 JMP ·subVV_g(SB)
29
30 TEXT ·addVW(SB),NOSPLIT,$0
31 JMP ·addVW_g(SB)
32
33 TEXT ·subVW(SB),NOSPLIT,$0
34 JMP ·subVW_g(SB)
35
36 TEXT ·shlVU(SB),NOSPLIT,$0
37 JMP ·shlVU_g(SB)
38
39 TEXT ·shrVU(SB),NOSPLIT,$0
40 JMP ·shrVU_g(SB)
41
42 TEXT ·mulAddVWW(SB),NOSPLIT,$0
43 JMP ·mulAddVWW_g(SB)
44
45 TEXT ·addMulVVW(SB),NOSPLIT,$0
46 JMP ·addMulVVW_g(SB)
47
48
View as plain text