From 320514ce119f8c8943d0a98a8de616ee58500744 Mon Sep 17 00:00:00 2001 From: "lj.k" <31593848+lj-k@users.noreply.github.com> Date: Fri, 10 Apr 2026 17:47:26 +0800 Subject: [PATCH] FIX: Fix the AUIPC case in ISA_IMAC to be compatible with Xuantie-900-gcc-elf-newlib-x86_64-V3.3.0 In the newer compiler, like Xuantie-900-gcc-elf-newlib-x86_64-V3.3.0, the instruction "li" will be compiled as two compressed instructions, which leads to a wrong PC gap between the two AUIPC instructions in this case. We can simply move the "li" instruction ahead of the AUIPC instruction to solve this problem and make the test more robust against compiler optimizations. --- smart_run/tests/cases/ISA/ISA_IMAC/ct_imac_smoke.s | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smart_run/tests/cases/ISA/ISA_IMAC/ct_imac_smoke.s b/smart_run/tests/cases/ISA/ISA_IMAC/ct_imac_smoke.s index 8df8c53d..4c12dd7e 100644 --- a/smart_run/tests/cases/ISA/ISA_IMAC/ct_imac_smoke.s +++ b/smart_run/tests/cases/ISA/ISA_IMAC/ct_imac_smoke.s @@ -249,13 +249,13 @@ LUI: .option rvc .global AUIPC AUIPC: + li x3, 0xa006 auipc x2, 0x0 - li x3, 0xa00e c.add x2, x3 auipc x4, 0xa bne x2, x4, TEST_FAIL + li x3, 0x80000008 auipc x2, 0x0 - li x3, 0x80000014 addw x2, x3, x2 auipc x4, 0x80000 bne x2, x4, TEST_FAIL