cr;
ubyteX; /* bottom 8 bits valid, the rest undefined */
- ubyte0; /* bottom 8 bits valid, the rest 0 */
+ ubyte0; /* bottom 8 bits valid, the rest 0 */
ushortX; /* bottom 16 bits valid, the rest undefined */
- ushort0; /* bottom 16 bits valid, the rest 0 */
+ ushort0; /* bottom 16 bits valid, the rest 0 */
address fragment;
emit "! setret8"
cost 1;
- (ret)reg = GETRET4
- emit "! getret4"
- cost 1;
-
- (pret)reg = GETRET8
- emit "! getret8"
- cost 1;
-
STACKADJUST4(delta:CONST4)
when signed_constant(%delta, 16)
emit "addi sp, sp, $delta"
emit "b $false"
cost 8;
- CALL(dest:LABEL4)
+ CALL1(dest:LABEL4)
+ with corrupted(volatile)
+ emit "bl $dest"
+ cost 4;
+
+ out:(ret)reg = CALL4(dest:LABEL4)
+ with corrupted(volatile)
+ emit "bl $dest"
+ cost 4;
+
+ out:(pret)reg = CALL8(dest:LABEL4)
with corrupted(volatile)
emit "bl $dest"
cost 4;
- CALL(dest:(int)reg)
+ CALL1(dest:(int)reg)
+ with corrupted(volatile)
+ emit "mtspr ctr, %dest"
+ emit "bcctrl 20, 0, 0"
+ cost 8;
+
+ out:(ret)reg = CALL4(dest:(int)reg)
+ with corrupted(volatile)
+ emit "mtspr ctr, %dest"
+ emit "bcctrl 20, 0, 0"
+ cost 8;
+
+ out:(pret)reg = CALL8(dest:(int)reg)
with corrupted(volatile)
emit "mtspr ctr, %dest"
emit "bcctrl 20, 0, 0"
static int stackptr;
static struct ir* stack[64];
+static struct ir* lastcall;
static struct ir* convert(struct ir* src, int destsize, int opcodebase);
static struct ir* appendir(struct ir* ir);
struct ir* dest = pop(EM_pointersize);
materialise_stack();
- appendir(
+ lastcall = appendir(
new_ir1(
IR_CALL, 0,
dest
case op_lfr:
{
- push(
- appendir(
- new_ir0(
- IR_GETRET, value
- )
- )
- );
+ assert(lastcall != NULL);
+ lastcall->size = value;
+ push(lastcall);
break;
}
}
materialise_stack();
- appendir(
- new_ir1(
- IR_CALL, 0,
- new_labelir(helper)
- )
- );
push(
- new_ir0(
- IR_GETRET, EM_wordsize
+ appendir(
+ new_ir1(
+ IR_CALL, EM_wordsize,
+ new_labelir(helper)
+ )
)
);
break;
case op_cal:
assert(offset == 0);
materialise_stack();
- appendir(
+ lastcall = appendir(
new_ir1(
IR_CALL, 0,
new_labelir(label)