aboutsummaryrefslogtreecommitdiffhomepage
path: root/x86_64/isel.c
diff options
context:
space:
mode:
Diffstat (limited to 'x86_64/isel.c')
-rw-r--r--x86_64/isel.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/x86_64/isel.c b/x86_64/isel.c
index fffc4c9..19e8d0c 100644
--- a/x86_64/isel.c
+++ b/x86_64/isel.c
@@ -560,6 +560,14 @@ sel(struct function *fn, struct instr *ins, struct block *blk, int *curi)
case Ocopy:
fixarg(&ins->l, ins, blk, curi);
break;
+ case Obswap16: case Obswap32: case Obswap64:
+ ins->inplace = 1;
+ if (ins->l.t != RTMP) {
+ ins->l = insertinstr(blk, *curi, mkinstr(Ocopy, ins->cls, ins->l));
+ fixarg(&instrtab[ins->l.i].l, ins, blk, curi);
+ ++*curi;
+ }
+ break;
case Oxvaprologue:
fuseaddr(&ins->l, blk, curi);
assert(ins->l.t == RADDR);