| /freebsd/sys/riscv/vmm/ |
| H A D | vmm_switch.S | 2 * SPDX-License-Identifier: BSD-2-Clause 16 * 2. Redistributions in binary form must reproduce the above copyright 39 * a0 == hypctx * 42 sd ra, (HYP_H_RA)(a0) 43 sd sp, (HYP_H_SP)(a0) 44 sd tp, (HYP_H_TP)(a0) 45 sd gp, (HYP_H_GP)(a0) 46 sd s0, (HYP_H_S + 0 * 8)(a0) 47 sd s1, (HYP_H_S + 1 * 8)(a0) 48 sd s2, (HYP_H_S + 2 * 8)(a0) [all …]
|
| /freebsd/lib/libc/riscv/gen/ |
| H A D | setjmp.S | 18 * 2. Redistributions in binary form must reproduce the above copyright 39 addi sp, sp, -(2 * 8) 40 sd a0, 0(sp) 44 addi a2, a0, (_JB_SIGMASK * 8) /* oset */ 46 li a0, 1 /* SIG_BLOCK */ 49 ld a0, 0(sp) 51 addi sp, sp, (2 * 8) 55 sd t0, (0 * 8)(a0) 56 sd sp, (1 * 8)(a0) 57 addi a0, a0, (2 * 8) [all …]
|
| H A D | _setjmp.S | 18 * 2. Redistributions in binary form must reproduce the above copyright 41 sd t0, (0 * 8)(a0) 42 sd sp, (1 * 8)(a0) 43 addi a0, a0, (2 * 8) 46 sd s0, (0 * 8)(a0) 47 sd s1, (1 * 8)(a0) 48 sd s2, (2 * 8)(a0) 49 sd s3, (3 * 8)(a0) 50 sd s4, (4 * 8)(a0) 51 sd s5, (5 * 8)(a0) [all …]
|
| /freebsd/sys/contrib/libsodium/src/libsodium/crypto_pwhash/argon2/ |
| H A D | blamka-round-avx512f.h | 17 #define G1_AVX512F(A0, B0, C0, D0, A1, B1, C1, D1) \ argument 19 A0 = muladd(A0, B0); \ 22 D0 = _mm512_xor_si512(D0, A0); \ 38 #define G2_AVX512F(A0, B0, C0, D0, A1, B1, C1, D1) \ argument 40 A0 = muladd(A0, B0); \ 43 D0 = _mm512_xor_si512(D0, A0); \ 59 #define DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \ argument 61 B0 = _mm512_permutex_epi64(B0, _MM_SHUFFLE(0, 3, 2, 1)); \ 62 B1 = _mm512_permutex_epi64(B1, _MM_SHUFFLE(0, 3, 2, 1)); \ 64 C0 = _mm512_permutex_epi64(C0, _MM_SHUFFLE(1, 0, 3, 2)); \ [all …]
|
| H A D | blamka-round-avx2.h | 7 #define rotr32(x) _mm256_shuffle_epi32(x, _MM_SHUFFLE(2, 3, 0, 1)) 8 …le_epi8(x, _mm256_setr_epi8(3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10, 3, 4, 5, 6, 7, 0… 9 …otr16(x) _mm256_shuffle_epi8(x, _mm256_setr_epi8(2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8… 12 #define G1_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ argument 14 __m256i ml = _mm256_mul_epu32(A0, B0); \ 16 A0 = _mm256_add_epi64(A0, _mm256_add_epi64(B0, ml)); \ 17 D0 = _mm256_xor_si256(D0, A0); \ 41 #define G2_AVX2(A0, A1, B0, B1, C0, C1, D0, D1) \ argument 43 __m256i ml = _mm256_mul_epu32(A0, B0); \ 45 A0 = _mm256_add_epi64(A0, _mm256_add_epi64(B0, ml)); \ [all …]
|
| H A D | blamka-round-ssse3.h | 8 (_mm_setr_epi8(2, 3, 4, 5, 6, 7, 0, 1, 10, 11, 12, 13, 14, 15, 8, 9)) 10 (_mm_setr_epi8(3, 4, 5, 6, 7, 0, 1, 2, 11, 12, 13, 14, 15, 8, 9, 10)) 13 ? _mm_shuffle_epi32((x), _MM_SHUFFLE(2, 3, 0, 1)) \ 31 #define G1(A0, B0, C0, D0, A1, B1, C1, D1) \ argument 33 A0 = fBlaMka(A0, B0); \ 36 D0 = _mm_xor_si128(D0, A0); \ 52 #define G2(A0, B0, C0, D0, A1, B1, C1, D1) \ argument 54 A0 = fBlaMka(A0, B0); \ 57 D0 = _mm_xor_si128(D0, A0); \ 73 #define DIAGONALIZE(A0, B0, C0, D0, A1, B1, C1, D1) \ argument [all …]
|
| /freebsd/sys/riscv/riscv/ |
| H A D | support.S | 18 * 2. Redistributions in binary form must reproduce the above copyright 48 li a0, -1 57 bgeu a0, a4, fsu_fault_nopcb 61 lr.w a4, 0(a0) /* Load-exclusive the data */ 63 sc.w a5, a3, 0(a0) /* Store the new data */ 64 beqz a5, 2f /* Success */ 66 2: EXIT_USER_ACCESS(a6) 69 mv a0, a5 /* Success indicator */ 78 bgeu a0, a4, fsu_fault_nopcb 82 lr.d a4, 0(a0) /* Load-exclusive the data */ [all …]
|
| H A D | copyinout.S | 19 * 2. Redistributions in binary form must reproduce the above copyright 49 li a0, EFAULT 56 * a0 - Source address 72 andi t0, a0, (XLEN_BYTES-1) /* Low bits of src */ 75 beqz t0, 2f /* Already word-aligned, skip ahead */ 78 1: lb a4, 0(a0) /* Load byte from src */ 79 addi a0, a0, 1 83 andi t0, a0, (XLEN_BYTES-1) 88 2: ld a4, 0(a0) /* Load word from src */ 89 addi a0, a0, XLEN_BYTES [all …]
|
| /freebsd/sys/contrib/openzfs/module/lua/setjmp/ |
| H A D | setjmp_rv64g.S | 1 // SPDX-License-Identifier: BSD-2-Clause 19 * 2. Redistributions in binary form must reproduce the above copyright 43 sd sp, (0 * 8)(a0) 44 addi a0, a0, (1 * 8) 47 sd s0, (0 * 8)(a0) 48 sd s1, (1 * 8)(a0) 49 sd s2, (2 * 8)(a0) 50 sd s3, (3 * 8)(a0) 51 sd s4, (4 * 8)(a0) 52 sd s5, (5 * 8)(a0) [all …]
|
| H A D | setjmp_loongarch64.S | 1 // SPDX-License-Identifier: BSD-2-Clause 11 * 2. Redistributions in binary form must reproduce the above copyright 41 st.d $ra, $a0, 0*8 42 st.d $sp, $a0, 1*8 43 st.d $r21, $a0, 2*8 44 st.d $fp, $a0, 3*8 45 st.d $s0, $a0, 4*8 46 st.d $s1, $a0, 5*8 47 st.d $s2, $a0, 6*8 48 st.d $s3, $a0, 7*8 [all …]
|
| H A D | setjmp_mips.S | 12 * 2. Redistributions in binary form must reproduce the above copyright 52 * jmp_buf is in a0. We need to save s0-s8, sp, gp, and ra in it. 56 REG_S sp, 0(a0) /* save registers */ 57 REG_S ra, 1*SZREG(a0) 58 REG_S gp, 2*SZREG(a0) 59 REG_S s0, 3*SZREG(a0) 60 REG_S s1, 4*SZREG(a0) 61 REG_S s2, 5*SZREG(a0) 62 REG_S s3, 6*SZREG(a0) 63 REG_S s4, 7*SZREG(a0) [all …]
|
| /freebsd/sys/cddl/dev/dtrace/riscv/ |
| H A D | dtrace_asm.S | 58 csrrci a0, sstatus, (SSTATUS_SIE) 59 andi a0, a0, (SSTATUS_SIE) 67 csrs sstatus, a0 76 lb a0, 0(a0) 87 lh a0, 0(a0) 98 lw a0, 0(a0) 109 ld a0, 0(a0) 119 beqz a2, 2f /* If len == 0 then skip loop */ 122 lb a4, 0(a0) /* Load from uaddr */ 123 addi a0, a0, 1 [all …]
|
| /freebsd/sys/dev/enic/ |
| H A D | vnic_devcmd.h | 12 #define _CMD_DIRBITS 2 29 #define _CMD_DIR_READ 2U 43 #define _CMD_VTYPE_FC 2U 74 * (u64)a0=paddr to struct vnic_devcmd_fw_info 85 * (u64)a0=paddr to struct vnic_devcmd_fw_info 101 * in: (u16)a0=offset,(u8)a1=size 102 * out: a0=value 104 CMD_DEV_SPEC = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_ALL, 2), 109 /* stats dump in mem: (u64)a0=paddr to stats area, 113 /* set Rx packet filter: (u32)a0=filters (see CMD_PFILTER_*) */ [all …]
|
| H A D | vnic_dev.c | 197 ENIC_BUS_WRITE_REGION_4(devcmd, DEVCMD_ARGS(0), (void *)&vdev->args[0], VNIC_DEVCMD_NARGS * 2); in _vnic_dev_cmd() 228 …ENIC_BUS_READ_REGION_4(devcmd, bar, DEVCMD_ARGS(0), (void *)&vdev->args[0], VNIC_DEVCMD_NARGS * 2); in _vnic_dev_cmd() 322 * Proxy command consumes 2 arguments. One for proxy index, in vnic_dev_cmd_proxy() 325 if (nargs > VNIC_DEVCMD_NARGS - 2) { in vnic_dev_cmd_proxy() 333 memcpy(&vdev->args[2], args, nargs * sizeof(args[0])); in vnic_dev_cmd_proxy() 373 u64 *a0, u64 *a1, int wait) in vnic_dev_cmd() argument 375 u64 args[2]; in vnic_dev_cmd() 378 args[0] = *a0; in vnic_dev_cmd() 393 err = vnic_dev_cmd_no_proxy(vdev, cmd, args, 2, wait); in vnic_dev_cmd() 398 *a0 = args[0]; in vnic_dev_cmd() [all …]
|
| /freebsd/crypto/openssl/crypto/ec/asm/ |
| H A D | x25519-ppc64.pl | 20 # Base 2^64 is faster than base 2^51 on pre-POWER8, most notably ~15% 22 # shoelaces when handling longer carry chains. As base 2^51 has just 23 # single-carry pairs, it's 25% faster than base 2^64. Since PPC970 is 24 # pretty old, base 2^64 implementation is not engaged. Comparison to 27 # this module delivers more than 2x improvement, and when it does, 47 ####################################################### base 2^64 49 my ($bi,$a0,$a1,$a2,$a3,$t0,$t1, $t2,$t3, 71 std r30,`$FRAME-8*2`($sp) 75 ld $a0,0($ap) 81 mulld $acc0,$a0,$bi # a[0]*b[0] [all …]
|
| /freebsd/crypto/openssl/crypto/bn/asm/ |
| H A D | bn-c64xplus.asm | 18 ;; SPLOOPs spin at ... 2*n cycles [plus epilogue]. 62 SPLOOP 2 ; 2*n+10 68 NOP 3 ; [2,0] in epilogue 72 SPKERNEL 2,1 ; leave slot for "return value" 90 SPLOOP 2 ; 2*n+10 95 NOP 4 ; [2,0] in epiloque 98 SPKERNEL 2,1 ; leave slot for "return value" 117 SPLOOP 2 ; 2*n+10 122 NOP 3 ; [2,0] in epilogue 123 STW B0,*B2++(8) ; rp[2*i] [all …]
|
| /freebsd/lib/libc/softfloat/bits64/ |
| H A D | softfloat-macros | 7 Arithmetic Package, Release 2a. 26 (1) they include prominent notice that the work is derivative, and (2) they 89 Shifts the 128-bit value formed by concatenating `a0' and `a1' right by 64 97 (This routine makes more sense if `a0' and `a1' are considered to form a 98 fixed-point value with binary point between `a0' and `a1'. This fixed-point 107 bits64 a0, bits64 a1, int16 count, bits64 *z0Ptr, bits64 *z1Ptr ) 114 z0 = a0; 117 z1 = ( a0<<negCount ) | ( a1 != 0 ); 118 z0 = a0>>count; 122 z1 = a0 | ( a1 != 0 ); [all …]
|
| /freebsd/crypto/openssl/crypto/chacha/asm/ |
| H A D | chacha-c64xplus.pl | 39 # yes, overlaps with @DAT, used only in 2x interleave code path... 61 MV $LEN,A0 ; reassign 62 [!A0] BNOP RA ; no data 63 || [A0] STW FP,*SP--(40+64) ; save frame pointer and alloca(40+64) 64 || [A0] MV SP,FP 65 [A0] STDW B13:B12,*SP[4+8] ; ABI says so 66 || [A0] MV $KEYB,$KEYA 67 || [A0] MV $COUNTERA,$COUNTERB 68 [A0] STDW B11:B10,*SP[3+8] 69 || [A0] STDW A13:A12,*FP[-3] [all …]
|
| /freebsd/lib/libc/softfloat/bits32/ |
| H A D | softfloat-macros | 6 Arithmetic Package, Release 2a. 25 (1) they include prominent notice that the work is derivative, and (2) they 61 Shifts the 64-bit value formed by concatenating `a0' and `a1' right by the 70 bits32 a0, bits32 a1, int16 count, bits32 *z0Ptr, bits32 *z1Ptr ) 77 z0 = a0; 80 z1 = ( a0<<negCount ) | ( a1>>count ); 81 z0 = a0>>count; 84 z1 = ( count < 64 ) ? ( a0>>( count & 31 ) ) : 0; 94 Shifts the 64-bit value formed by concatenating `a0' and `a1' right by the 99 or 1, depending on whether the concatenation of `a0' and `a1' is zero or [all …]
|
| /freebsd/sys/dev/psci/ |
| H A D | smccc.h | 2 * SPDX-License-Identifier: BSD-2-Clause 15 * 2. Redistributions in binary form must reproduce the above copyright 53 #define SMCCC_SIP_SERVICE_CALLS 2 60 register_t a0; member 82 #define SMCCC_RET_NOT_REQUIRED -2 95 #define arm_smccc_invoke_1(func, a0, res) \ argument 96 func(a0, 0, 0, 0, 0, 0, 0, 0, res) 97 #define arm_smccc_invoke_2(func, a0, a1, res) \ argument 98 func(a0, a1, 0, 0, 0, 0, 0, 0, res) 99 #define arm_smccc_invoke_3(func, a0, a1, a2, res) \ argument [all …]
|
| /freebsd/contrib/bearssl/src/symcipher/ |
| H A D | poly1305_ctmulq.c | 55 * If the current accumulator is a = a0 + a1*W + a2*W^2 (where W = 2^44) 56 * and r = r0 + r1*W + r2*W^2, then: 58 * a*r = (a0*r0) 59 * + (a0*r1 + a1*r0) * W 60 * + (a0*r2 + a1*r1 + a2*r0) * W^2 64 * We want to reduce that value modulo p = 2^130-5, so W^3 = 20 mod p, 68 * b0 = a0*r0 + a1*u2 + a2*u1 69 * b1 = a0*r1 + a1*r0 + a2*u2 70 * b2 = a0*r2 + a1*r1 + a2*r0 75 * b0 = a0*r0 + a1*u2 + a2*t1 [all …]
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
| H A D | sanitizer_syscall_linux_riscv64.inc | 20 // (http://man7.org/linux/man-pages/man2/syscall.2.html) results are return in 21 // a0 and a1 (http://man7.org/linux/man-pages/man2/syscall.2.html) arguments 22 // are passed in: a0-a7 (see below) 35 register u64 a0 asm("a0"); 37 : "=r"(a0) 40 return a0; 46 register u64 a0 asm("a0") = arg1; 48 : "+r"(a0) 51 return a0; 57 register u64 a0 asm("a0") = arg1; [all …]
|
| /freebsd/crypto/openssl/crypto/sha/asm/ |
| H A D | sha512-c64xplus.pl | 23 # -o2 -DOPENSSL_SMALL_FOOTPRINT it's almost 7x faster and 2x smaller. 80 MV $NUM,A0 ; reassign $NUM 82 [!A0] BNOP RA ; if ($NUM==0) return; 83 || [A0] STW FP,*SP--(40) ; save frame pointer 84 || [A0] MV SP,FP 85 [A0] STDW B13:B12,*SP[4] 86 || [A0] MVK 0x00404,B1 87 [A0] STDW B11:B10,*SP[3] 88 || [A0] STDW A13:A12,*FP[-3] 89 || [A0] MVKH 0x60000,B1 [all …]
|
| H A D | sha512-ppc.pl | 51 $LRSAVE=2*$SIZE_T; 92 @Sigma0=( 2,13,22); 108 $ctx="r3"; # zapped by $a0 113 $a0 ="r3"; 137 $ROR $a0,$e,$Sigma1[0] 140 xor $a0,$a0,$a1 143 $ROR $a1,$a1,`$Sigma1[2]-$Sigma1[1]` 146 xor $a0,$a0,$a1 ; Sigma1(e) 148 add $h,$h,$a0 150 $ROR $a0,$a,$Sigma0[0] [all …]
|
| /freebsd/lib/libc/riscv/string/ |
| H A D | strchrnul.S | 2 * SPDX-License-Identifier: BSD-2-Clause 13 * a0 - const char *str 18 * a0 - const char *ptr; 39 andi t2, a0, 0b111 42 andi a0, a0, ~0b111 47 ld a2, (a0) 73 addi a0, a0, 8 78 ld a2, (a0) 94 addi a0, a0, 8 98 addi a0, a0, -8 [all …]
|