Skip to content

Commit

Permalink
ports/qemu-riscv: Use -msave-restore to save code space
Browse files Browse the repository at this point in the history
This is a RISC-V specific compiler switch which replaces explicit
push/pop register save/restore sequences with calls to functions which
do the same thing. The result is a nice savings of ROM space.

Signed-off-by: Keith Packard <keithp@keithp.com>
  • Loading branch information
keith-packard committed Apr 18, 2020
1 parent f1d4c6e commit b537b2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ports/qemu-riscv/Makefile
Expand Up @@ -17,7 +17,7 @@ SNEK_ROOT = ../..
SNEK_QEMU = $(SNEK_ROOT)/chips/qemu

ARCH = riscv64-unknown-elf
ARCH_CFLAGS = -march=rv32imac -mabi=ilp32
ARCH_CFLAGS = -march=rv32imac -mabi=ilp32 -msave-restore
PROGNAME = snek-qemu-riscv

include $(SNEK_QEMU)/snek-qemu.defs
Expand Down

0 comments on commit b537b2f

Please sign in to comment.