I can't load the PC value which is a memory location to a general purpose register r0.
It is my current implementation jit-arm.dasm
The line 16 is that instruction, ldr r0, [pc, #12]
All the instruction will translate into a unsigned integer array which contain all the machine code.
//|.actionlist actionsstatic const unsigned int actions[6] = {0xe59f000c,0xe5901000,0xe2811009,0xe5801000,0xe1a0f00e,0x00000000};
It is as same as tests/jit.c
Hence, I don't know why it occurs the following error as it executes the instruction, ldr r0, [pc, #12]
I can't load the PC value which is a memory location to a general purpose register r0.
It is my current implementation jit-arm.dasm The line 16 is that instruction,
ldr r0, [pc, #12]
All the instruction will translate into a unsigned integer array which contain all the machine code.
//|.actionlist actions
static const unsigned int actions[6] = {
0xe59f000c,
0xe5901000,
0xe2811009,
0xe5801000,
0xe1a0f00e,
0x00000000
};
It is as same as tests/jit.c Hence, I don't know why it occurs the following error as it executes the instruction,
ldr r0, [pc, #12]
lua ./dynasm.lua -o jit-arm.h jit-arm.dasc
arm-linux-gnueabihf-gcc -Wall -std=gnu99 -I. -o jit-arm -DJIT=\"jit-arm.h\" dynasm-driver.c
qemu-arm -L /usr/arm-linux-gnueabihf jit-arm
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
make: *** [run-jit-arm] Segmentation fault (core dumped)
Any suggestion ? (BTW, if I change PC to SP, everything is ok)