diff options
Diffstat (limited to 'amd64')
| -rw-r--r-- | amd64/emit.c | 6 | ||||
| -rw-r--r-- | amd64/sysv.c | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/amd64/emit.c b/amd64/emit.c index 6634c64..df4c4cd 100644 --- a/amd64/emit.c +++ b/amd64/emit.c @@ -952,6 +952,12 @@ emitinstr(uchar **pcode, struct function *fn, struct block *blk, int curi, struc Xxor(pcode, cls, l, r); } break; + case Oxsave: + Xpush(pcode, mkregoper(ins->l).reg); + break; + case Oxrestore: + Xpop(pcode, mkregoper(ins->l).reg); + break; case Ocall: if (calltab.p[ins->r.i].vararg >= 0) { struct call *call = &calltab.p[ins->r.i]; diff --git a/amd64/sysv.c b/amd64/sysv.c index 9ecc09f..43ecd3c 100644 --- a/amd64/sysv.c +++ b/amd64/sysv.c @@ -139,6 +139,7 @@ static const char amd64_rnames[][6] = { const struct mctarg t_amd64_sysv = { .gpr0 = RAX, .ngpr = R15 - RAX + 1, .bpr = RBP, + .gprscratch = R11, .fprscratch = XMM15, .fpr0 = XMM0, .nfpr = XMM15 - XMM0 + 1, .rcallee = 1<<RBX | 1<<R12 | 1<<R13 | 1<<R14 | 1<<R15, .rglob = 1<<RSP | 1<<RBP, |