在测试我的 RISC-V 工具链时,我收到“未对齐的指令访问”异常。hello.c 的内容与 README 文件中提供的示例相匹配。
有没有人遇到过这个问题?
$ riscv-gcc -o hello hello.c
$ spike pk hello
z 0000000000000000 ra 0000000000000000 sp 0000000000000000 gp 0000000000000000
tp 0000000000000000 t0 0000000000000000 t1 0000000000000017 t2 0000000000003514
s0 0000000000000000 s1 000000007f800000 a0 0000000000000000 a1 0000000000000032
a2 ffffffffffffffff a3 0000000080000000 a4 000000007f800000 a5 00000000000037c0
a6 0000000000000017 a7 0000000000003514 s2 0000000000000000 s3 0000000000000000
s4 0000000000000000 s5 0000000000000000 s6 0000000000000000 s7 0000000000000000
s8 0000000000000000 s9 000000000000d028 sA 0000000000800000 sB 0000000000800000
t3 00000000ff800000 t4 0000000000000000 t5 000000007f800000 t6 0000000000003f3c
sr 0000000000000000 pc 00000000ff800000 va 0000000000000000 insn 00000000
Misaligned instruction access!