diff options
| author | Mirek Kratochvil <exa.exa@gmail.com> | 2023-08-06 00:25:53 +0200 |
|---|---|---|
| committer | Mirek Kratochvil <exa.exa@gmail.com> | 2023-08-06 00:25:53 +0200 |
| commit | 74cad993376dc269e8389fbf150be9ecc36890c7 (patch) | |
| tree | 32a2dbb382836ee0f1853fe5e63036d044fea77d /include/intops.s | |
| parent | 46d84e91ebe48ade19bd3f5e18360bf853b53968 (diff) | |
| download | uskel-74cad993376dc269e8389fbf150be9ecc36890c7.tar.gz uskel-74cad993376dc269e8389fbf150be9ecc36890c7.tar.bz2 | |
fibs work
Diffstat (limited to 'include/intops.s')
| -rw-r--r-- | include/intops.s | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/intops.s b/include/intops.s new file mode 100644 index 0000000..dbadb37 --- /dev/null +++ b/include/intops.s @@ -0,0 +1,25 @@ + +.ifndef _intops_s_file +_intops_s_file: + +.include "include/primops.s" + +.primop2 plus + mov 010(%rsi), %rax # arg 2 + mov 020(%rbp), %rsi # location of arg1 + add 010(%rsi), %rax # arg 1 + primop2_ret_int %rax + +.primop2 mul + mov 010(%rsi), %rax # arg 2 + mov 020(%rbp), %rsi # location of arg1 + mulq 010(%rsi) # arg 1 (goes to %rax and %rdx) + primop2_ret_int %rax + +.primop2 sub + mov 020(%rbp), %rdi # location of arg1 + mov 010(%rdx), %rax # arg 1 + sub 010(%rsi), %rax # arg 2 + primop2_ret_int %rax + +.endif # _intops_s_file |
