Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3125 → Rev 3126

/branches/tracing/uspace/app/debug/arch/arm32/src/arm32.c
54,7 → 54,9
OP_BL,
OP_BLX1,
OP_BLX2,
OP_BX
OP_BX,
 
OP_MOV_PC_LR
} op_t;
 
typedef struct {
78,6 → 80,9
{ 0x0f000000, 0x0a000000, OP_B },
{ 0x0f000000, 0x0b000000, OP_BL },
 
/* mov pc, lr */
{ 0xffffffff, 0xe1a0f00e, OP_MOV_PC_LR },
 
{ 0, 0, -1 }
};
 
232,8 → 237,18
n = 2;
break;
 
/* TODO: handle instructions writing r15 */
case OP_MOV_PC_LR:
/* mov pc, lr - this is typically used as 'return' */
rc = get_reg(dt, 14 /* lr */, &regv);
if (rc != 0) return rc;
 
buffer[0] = regv & ~0x1;
printf("mov pc, lr ---> 0x%x\n", buffer[0]);
n = 1;
break;
 
/* TODO: handle general case of instructions writing r15(pc) */
 
default:
/* Regular instruction */
buffer[0] = addr + 4;