case SPR:
/* format: 0b100. .... .... */
val |= 0x800;
- if (ctx->arch == 15) //FIXME is this ok?
+ if (ctx->arch == 15)
val <<= 1;
if (reg->nr & ~0x1FF)
asm_error(ctx, "SPR-nr too big");
case OFFR:
/* format: 0b1000 0110 0rrr */
val |= 0x860;
- if (ctx->arch == 15) //FIXME is this ok?
+ if (ctx->arch == 15)
val <<= 1;
if (reg->nr & ~0x7)
asm_error(ctx, "OFFR-nr too big");
if (addr < 0)
goto does_not_exist;
c->operands[i].u.operand = addr;
- if (i != 2) /* Is not a jump target */
- c->operands[i].u.operand |= 0xC00; /* Make it be an immediate */
+ if (i != 2) {
+ /* Is not a jump target.
+ * Make it be an immediate */
+ if (ctx->arch == 5)
+ c->operands[i].u.operand |= 0xC00;
+ else if (ctx->arch == 15)
+ c->operands[i].u.operand |= 0xC00 << 1;
+ else
+ asm_error(ctx, "Internal error: label res imm");
+ }
}
break;
case OUT_LABEL: