From aa22fbe8d4d94b25897676568faf15f303e542c9 Mon Sep 17 00:00:00 2001 From: Gijs Burghoorn Date: Thu, 21 Sep 2023 11:18:51 +0200 Subject: [PATCH] Fix: update `asm.rs` for use with RV{32,64}E --- src/asm.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/asm.rs b/src/asm.rs index c29d918..885bcd4 100644 --- a/src/asm.rs +++ b/src/asm.rs @@ -64,8 +64,11 @@ _abs_start: // a0..a2 (x10..x12) skipped li x13, 0 li x14, 0 - li x15, 0 - li x16, 0 + li x15, 0", + + // Since RV{32, 64}E only has registers x0 to x15, do not reset registers x16 .. x31 on RV{32, 64}E platforms. + #[cfg(not(target_feature = "e"))] + "li x16, 0 li x17, 0 li x18, 0 li x19, 0 @@ -80,9 +83,9 @@ _abs_start: li x28, 0 li x29, 0 li x30, 0 - li x31, 0 + li x31, 0", - .option push + ".option push .option norelax la gp, __global_pointer$ .option pop",