github.com/geraldss/go/src@v0.0.0-20210511222824-ac7d0ebfc235/math/big/arith_riscv64.s (about)

     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  // +build !math_big_pure_go,riscv64
     6  
     7  #include "textflag.h"
     8  
     9  // This file provides fast assembly versions for the elementary
    10  // arithmetic operations on vectors implemented in arith.go.
    11  
    12  // func mulWW(x, y Word) (z1, z0 Word)
    13  TEXT ·mulWW(SB),NOSPLIT,$0
    14  	MOV	x+0(FP), X5
    15  	MOV	y+8(FP), X6
    16  	MULHU	X5, X6, X7
    17  	MUL	X5, X6, X8
    18  	MOV	X7, z1+16(FP)
    19  	MOV	X8, z0+24(FP)
    20  	RET
    21  
    22  
    23  TEXT ·addVV(SB),NOSPLIT,$0
    24  	JMP ·addVV_g(SB)
    25  
    26  TEXT ·subVV(SB),NOSPLIT,$0
    27  	JMP ·subVV_g(SB)
    28  
    29  TEXT ·addVW(SB),NOSPLIT,$0
    30  	JMP ·addVW_g(SB)
    31  
    32  TEXT ·subVW(SB),NOSPLIT,$0
    33  	JMP ·subVW_g(SB)
    34  
    35  TEXT ·shlVU(SB),NOSPLIT,$0
    36  	JMP ·shlVU_g(SB)
    37  
    38  TEXT ·shrVU(SB),NOSPLIT,$0
    39  	JMP ·shrVU_g(SB)
    40  
    41  TEXT ·mulAddVWW(SB),NOSPLIT,$0
    42  	JMP ·mulAddVWW_g(SB)
    43  
    44  TEXT ·addMulVVW(SB),NOSPLIT,$0
    45  	JMP ·addMulVVW_g(SB)
    46