File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,8 +31,7 @@ instruction set architecture AArch32v6 = {
3131 register R : Index -> Word // general purpose register file
3232
3333 [next next] // PC points to the end of the following instruction
34- program counter PC : Addr // program counter TODO alias R(15)
35- //alias program counter PC : Addr = R(15) // program counter
34+ alias program counter PC : Addr = R(15) // program counter
3635 alias register LR : Addr = R(14) // link register
3736 alias register SP : Addr = R(13) // stack pointer
3837
Original file line number Diff line number Diff line change @@ -16,13 +16,10 @@ processor Virt implements A32 = {
1616 [ size : 0x08000000 ]
1717 memory region [ROM] FLASH in MEM = {
1818 // TODO: use this instead once mov instructions work
19- //MEM<4>(0x0) := 0xe3a00101 // mov r0, 0x40000000
20- //MEM<4>(0x4) := 0xe12fff10 // bx r0
19+ //MEM<4>(0x0) := 0xe3a0f101 // mov pc, #0x40000000
2120
22- // branch currently only works with b and bx, not writes to r15
2321 MEM<4>(0x0) := 0xe0200000 // eor r0, r0, r0
24- MEM<4>(0x4) := 0xe590000c // ldr r0, [r0, #12]
25- MEM<4>(0x8) := 0xe12fff10 // bx r0
22+ MEM<4>(0x4) := 0xe590f00c // ldr pc, [r0, #12]
2623 MEM<4>(0xc) := 0x40000000 // target address
2724 }
2825
You can’t perform that action at this time.
0 commit comments