running the first c code
This commit is contained in:
BIN
tests/1.bin
Executable file
BIN
tests/1.bin
Executable file
Binary file not shown.
BIN
tests/a.out
Executable file
BIN
tests/a.out
Executable file
Binary file not shown.
3
tests/main.c
Normal file
3
tests/main.c
Normal file
@@ -0,0 +1,3 @@
|
||||
int main(){
|
||||
|
||||
}
|
||||
20
tests/main.s
Normal file
20
tests/main.s
Normal file
@@ -0,0 +1,20 @@
|
||||
.file "main.c"
|
||||
.option nopic
|
||||
.attribute arch, "rv32i2p1"
|
||||
.attribute unaligned_access, 0
|
||||
.attribute stack_align, 16
|
||||
.text
|
||||
.align 2
|
||||
.globl main
|
||||
.type main, @function
|
||||
main:
|
||||
addi sp,sp,-16
|
||||
sw s0,12(sp)
|
||||
addi s0,sp,16
|
||||
li a5,0
|
||||
mv a0,a5
|
||||
lw s0,12(sp)
|
||||
addi sp,sp,16
|
||||
jr ra
|
||||
.size main, .-main
|
||||
.ident "GCC: () 13.2.0"
|
||||
BIN
tests/test.bin
BIN
tests/test.bin
Binary file not shown.
Reference in New Issue
Block a user