-rw-r--r-- 2964 high-ctidh-20210504/uintbig1024.S
/* DO NOT EDIT! generated by ./autogen */
.intel_syntax noprefix
#include "uintbig_namespace.h"
.section .rodata
.global uintbig_1
uintbig_1:
.quad 1, 0, 0, 0
.quad 0, 0, 0, 0
.quad 0, 0, 0, 0
.quad 0, 0, 0, 0
.global uintbig_p
uintbig_p:
.quad 0xdbe34c5460e36453, 0xa1d81eebbc3d344d, 0x514ba72cb8d89fd3, 0xc2cab6a0e287f1bd
.quad 0x642aca4d5a313709, 0x6b317c5431541f40, 0xb97c56d1de81ede5, 0x0978dbeed90a2b58
.quad 0x7611ad4f90441c80, 0xf811d9c419ec8329, 0x4d6c594a8ad82d2d, 0xf06de2471cf9386e
.quad 0x0683cf25db31ad5b, 0x216c22bc86f21a08, 0xd89dec879007ebd7, 0x0ece55ed427012a9
.global uintbig_four_sqrt_p
uintbig_four_sqrt_p:
.quad 0xeba75c5815bb0d57, 0xfec8564a9ae457c6, 0xe362e1c2334bd738, 0x56f74a246ef0a30e
.quad 0x4a598c9571aeb858, 0xc5617b211ccad355, 0x4fb69e4928ccc442, 0xf643475c7915859c
.quad 0, 0, 0, 0
.quad 0, 0, 0, 0
.section .text
.global uintbig_set
uintbig_set:
cld
mov rax, rsi
stosq
xor rax, rax
mov rcx, 15
rep stosq
ret
.global uintbig_bit
uintbig_bit:
mov rcx, rsi
and rcx, 0x3f
shr rsi, 6
mov rax, [rdi + 8*rsi]
shr rax, cl
and rax, 1
ret
.global uintbig_add3
uintbig_add3:
mov rax, [rsi + 0]
add rax, [rdx + 0]
mov [rdi + 0], rax
.set k, 1
.rept 15
mov rax, [rsi + 8*k]
adc rax, [rdx + 8*k]
mov [rdi + 8*k], rax
.set k, k+1
.endr
setc al
movzx rax, al
ret
.global uintbig_sub3
uintbig_sub3:
mov rax, [rsi + 0]
sub rax, [rdx + 0]
mov [rdi + 0], rax
.set k, 1
.rept 15
mov rax, [rsi + 8*k]
sbb rax, [rdx + 8*k]
mov [rdi + 8*k], rax
.set k, k+1
.endr
setc al
movzx rax, al
ret
.global uintbig_mul3_64
uintbig_mul3_64:
mulx r10, rax, [rsi + 0]
mov [rdi + 0], rax
mulx r11, rax, [rsi + 8]
add rax, r10
mov [rdi + 8], rax
mulx r10, rax, [rsi + 16]
adcx rax, r11
mov [rdi + 16], rax
mulx r11, rax, [rsi + 24]
adcx rax, r10
mov [rdi + 24], rax
mulx r10, rax, [rsi + 32]
adcx rax, r11
mov [rdi + 32], rax
mulx r11, rax, [rsi + 40]
adcx rax, r10
mov [rdi + 40], rax
mulx r10, rax, [rsi + 48]
adcx rax, r11
mov [rdi + 48], rax
mulx r11, rax, [rsi + 56]
adcx rax, r10
mov [rdi + 56], rax
mulx r10, rax, [rsi + 64]
adcx rax, r11
mov [rdi + 64], rax
mulx r11, rax, [rsi + 72]
adcx rax, r10
mov [rdi + 72], rax
mulx r10, rax, [rsi + 80]
adcx rax, r11
mov [rdi + 80], rax
mulx r11, rax, [rsi + 88]
adcx rax, r10
mov [rdi + 88], rax
mulx r10, rax, [rsi + 96]
adcx rax, r11
mov [rdi + 96], rax
mulx r11, rax, [rsi + 104]
adcx rax, r10
mov [rdi + 104], rax
mulx r10, rax, [rsi + 112]
adcx rax, r11
mov [rdi + 112], rax
mulx r11, rax, [rsi + 120]
adcx rax, r10
mov [rdi + 120], rax
ret