This allows using any hex and decimal numbers and even complex immediates for external conditions.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
ol = insn->operands;
opcode = opbase;
- cond = ol->oper[0]->u.raw;
+ cond = ol->oper[0]->u.imm->imm;
if (cond & ~0xFF)
asm_error(ctx, "External jump condition value too big (> 0xFF)");
opcode |= cond;
}
;
-external_jump_operands : hexnum COMMA operand COMMA operand COMMA labelref {
+external_jump_operands : imm COMMA operand COMMA operand COMMA labelref {
struct operlist *ol = xmalloc(sizeof(struct operlist));
struct operand *cond = xmalloc(sizeof(struct operand));
- cond->type = OPER_RAW;
- cond->u.raw = (unsigned long)$1;
+ cond->type = OPER_IMM;
+ cond->u.imm = $1;
ol->oper[0] = cond;
ol->oper[1] = $3;
ol->oper[2] = $5;
#define PSM_BRC spr848
-#define ECOND_MAC_ON 0x24
+#define ECOND_MAC_ON (0x20 | 4)
.text