From 0a5466d8d53bc8045ff56ff76cc1880aa85761c2 Mon Sep 17 00:00:00 2001 From: "ustcymgu@gmail.com" Date: Sat, 19 Nov 2022 14:02:55 +0000 Subject: RISC-V 32-bit support Added 32-bit RISC-V support. I have managed to get 32-bit RISC-V No-MMU Linux running based on mainstream buildroot. It's nice to have uclibc support this 32-bit No-MMU target. There's no substantial code change except definations and config options. Signed-off-by: Yimin Gu --- libc/sysdeps/linux/riscv64/sys/asm.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libc/sysdeps/linux/riscv64/sys/asm.h') diff --git a/libc/sysdeps/linux/riscv64/sys/asm.h b/libc/sysdeps/linux/riscv64/sys/asm.h index ddb84b683..3c94c9a70 100644 --- a/libc/sysdeps/linux/riscv64/sys/asm.h +++ b/libc/sysdeps/linux/riscv64/sys/asm.h @@ -26,7 +26,11 @@ # define REG_S sd # define REG_L ld #elif __riscv_xlen == 32 -# error "rv32i-based targets are not supported" +# define PTRLOG 2 +# define SZREG 4 +# define REG_S sw +# define REG_L lw +// # warning "rv32i-based targets are experimental" #else # error __riscv_xlen must equal 32 or 64 #endif -- cgit v1.2.3