Skip to content

Commit

Permalink
create verifiable assembly for hello world
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-johnson-4 committed Aug 9, 2024
1 parent 515e55a commit 1dfb5b8
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/regress/hello_world.s.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.global _start
.text
_start:
push %rbp
mov %rsp, %rbp
call main
mov %rbp, %rsp
pop %rbp
mov $60, %rax
mov $0, %rdi
syscall
main:
#Call Fragment mov : Arrow<Cons<Constant+Literal+Sized<8>,Constant+Reg64>,Nil>
mov $1, %RAX
#Call Fragment mov : Arrow<Cons<Constant+Literal+Sized<8>,Constant+Reg64>,Nil>
mov $1, %RDI
#Call Fragment mov : Arrow<Cons<Constant+Literal+Sized<8>,Constant+Reg64>,Nil>
mov $uuid_0000000000007838, %RSI
#Call Fragment mov : Arrow<Cons<Constant+Literal+Sized<8>,Constant+Reg64>,Nil>
mov $11, %RDX
#Call Fragment syscall : Arrow<Nil,Nil>
syscall
mov %rbp, %rsp
sub $8, %rsp
ret
.data
uuid_0000000000007838:
.ascii "hello_world"
.zero 1

0 comments on commit 1dfb5b8

Please sign in to comment.