I try to use spike to simulate risc-v.
I generate a log of execution by enter spike -l pk test.riscv.
The log is as follows:
: core 0: 0x0000000000001000 (0x00000297) auipc t0, 0x0
: core 0: 0x0000000000001004 (0x02028593) addi a1, t0, 32
: core 0: 0x0000000000001008 (0xf1402573) csrr a0, mhartid
: core 0: 0x000000000000100c (0x0182b283) ld t0, 24(t0)
: core 0: 0x0000000000001010 (0x00028067) jr t0
: core 0: 0x0000000080000000 (0x1e80006f) j pc + 0x1e8
: core 0: 0x00000000800001e8 (0x00000093) li ra, 0
: core 0: 0x00000000800001ec (0x00000113) li sp, 0
: core 0: 0x00000000800001f0 (0x00000193) li gp, 0
: core 0: 0x00000000800001f4 (0x00000213) li tp, 0
: core 0: 0x00000000800001f8 (0x00000293) li t0, 0
: core 0: 0x00000000800001fc (0x00000313) li t1, 0
“0x00000093” represents “li ra, 0”, “0x00000000800001e8” represents what?
Another question that puzzles me is that the first assemble code I write is li x1, 1; add x4, x1, x2; add x5, x4, x3;
However, the log shows that the first assemble code executed is “auipc t0, 0x0”