hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

syscall+x86_64.s (1103B)


      1 .section .text
      2 error:
      3 	neg %rax
      4 	ret
      5 
      6 .section .text.rt.syscall0
      7 .global rt.syscall0
      8 rt.syscall0:
      9 	movq %rdi, %rax
     10 	syscall
     11 	jc error
     12 	ret
     13 
     14 .section .text.rt.syscall1
     15 .global rt.syscall1
     16 rt.syscall1:
     17 	movq %rdi, %rax
     18 	movq %rsi, %rdi
     19 	syscall
     20 	jc error
     21 	ret
     22 
     23 .section .text.rt.syscall2
     24 .global rt.syscall2
     25 rt.syscall2:
     26 	movq %rdi, %rax
     27 	movq %rsi, %rdi
     28 	movq %rdx, %rsi
     29 	syscall
     30 	jc error
     31 	ret
     32 
     33 .section .text.rt.syscall3
     34 .global rt.syscall3
     35 rt.syscall3:
     36 	movq %rdi, %rax
     37 	movq %rsi, %rdi
     38 	movq %rdx, %rsi
     39 	movq %rcx, %rdx
     40 	syscall
     41 	jc error
     42 	ret
     43 
     44 .section .text.rt.syscall4
     45 .global rt.syscall4
     46 rt.syscall4:
     47 	movq %rdi, %rax
     48 	movq %r8, %r10
     49 	movq %rsi, %rdi
     50 	movq %rdx, %rsi
     51 	movq %rcx, %rdx
     52 	syscall
     53 	jc error
     54 	ret
     55 
     56 .section .text.rt.syscall5
     57 .global rt.syscall5
     58 rt.syscall5:
     59 	movq %rdi, %rax
     60 	movq %r8, %r10
     61 	movq %rsi, %rdi
     62 	movq %r9, %r8
     63 	movq %rdx, %rsi
     64 	movq %rcx, %rdx
     65 	syscall
     66 	jc error
     67 	ret
     68 
     69 .section .text.rt.syscall6
     70 .global rt.syscall6
     71 rt.syscall6:
     72 	movq %rdi, %rax
     73 	movq %r8, %r10
     74 	movq %rsi, %rdi
     75 	movq %r9, %r8
     76 	movq %rdx, %rsi
     77 	movq 8(%rsp), %r9
     78 	movq %rcx, %rdx
     79 	syscall
     80 	jc error
     81 	ret