running the first c code

This commit is contained in:
inixyz
2023-10-17 23:24:36 +03:00
parent 8920adc805
commit b79efd608a
6 changed files with 24 additions and 1 deletions

BIN
tests/1.bin Executable file

Binary file not shown.

BIN
tests/a.out Executable file

Binary file not shown.

3
tests/main.c Normal file
View File

@@ -0,0 +1,3 @@
int main(){
}

20
tests/main.s Normal file
View 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"

Binary file not shown.