Compare commits

..

No commits in common. "b65b33da2553751a7c31873a198666e12bd7806f" and "005ad4e9871310ba125623b2a7112695c0497bc4" have entirely different histories.

5 changed files with 3 additions and 20 deletions

View file

@ -5,7 +5,7 @@ MEMORY {
SECTIONS { SECTIONS {
.text : { .text : {
*(.text) main.o(.text.*)
*(.text) *(.text)
. = ALIGN(4); . = ALIGN(4);
} > DRAM } > DRAM

View file

@ -24,7 +24,6 @@ CFLAGS += -fno-common# # Do not use common sections
CFLAGS += -march=rv64i# # Use RV64I ISA, i.e., integer only CFLAGS += -march=rv64i# # Use RV64I ISA, i.e., integer only
CFLAGS += -mabi=lp64# # Use LP64 ABI, i.e., 64-bit longs and pointers, 32-bit ints CFLAGS += -mabi=lp64# # Use LP64 ABI, i.e., 64-bit longs and pointers, 32-bit ints
CFLAGS += -Os# # Optimize for size CFLAGS += -Os# # Optimize for size
CFLAGS += -Wall -Wunused -O2
LDFLAGS += -T link.ld # Use the linker script LDFLAGS += -T link.ld # Use the linker script
LDFLAGS += --no-dynamic-linker LDFLAGS += --no-dynamic-linker

View file

@ -1 +0,0 @@
int square(int, int);

View file

@ -1,15 +0,0 @@
square:
addi sp,sp,-32
sd ra,24(sp)
sd s0,16(sp)
addi s0,sp,32
mv a5,a0
sw a5,-20(s0)
lw a5,-20(s0)
mulw a5,a5,a5
sext.w a5,a5
mv a0,a5
ld ra,24(sp)
ld s0,16(sp)
addi sp,sp,32
jr ra