1
0
mirror of https://gitlab.os-k.eu/os-k-team/kvisc.git synced 2023-08-25 14:05:46 +02:00
kvisc/ka/crt/lib/arith128.k

60 lines
869 B
Plaintext
Raw Normal View History

2019-07-18 22:49:31 +02:00
; The OS/K Team licenses this file to you under the MIT license.
; See the LICENSE file in the project root for more information.
;
; int:int add_lq_q(int:int x, int y)
;
add_lq_q:
addf rax, ax0, ax2
adcx rdx, ax1, zero
ret
;
; int:int add_lq_lq(int:int x, int:int y)
;
add_lq_lq:
addf rax, ax0, ax2
adcx rdx, ax1, ax3
ret
;
; int:int sub_lq_q(int:int x, int y)
;
sub_lq_q:
subf rax, ax0, ax2
sbbx rdx, ax1, zero
ret
;
; int:int sub_q_lq(int x, int:int y)
;
sub_q_lq:
subf rax, ax0, ax1
sbbx rdx, zero, ax2
ret
;
; int:int sub_lq_lq(int:int x, int:int y)
;
sub_lq_lq:
subf rax, ax0, ax2
sbbx rdx, ax1, ax3
ret
;
2019-07-22 14:41:50 +02:00
; int:int mul_q_q(int x, int y)
2019-07-18 22:49:31 +02:00
;
mul_q_q:
mov rax, ax0
mulhi rdx, rax, ax1
ret
;
2019-07-22 14:41:50 +02:00
; int:int imul_q_q(int x, int y)
2019-07-18 22:49:31 +02:00
;
imul_q_q:
mov rax, ax0
imulhi rdx, rax, ax1
ret