diff options
| author | 2025-10-18 20:21:28 +0200 | |
|---|---|---|
| committer | 2025-10-18 21:29:17 +0200 | |
| commit | 3437945692f2b87883a4f066473c9deed50f25f5 (patch) | |
| tree | fa22ad5e4e2dbea5fa2f49982a69690910e61bb1 /amd64/isel.c | |
| parent | 99adb48d94c59cb2e5701ca39d7c40d4f63459b3 (diff) | |
amd64: float conversion insntrs
Diffstat (limited to 'amd64/isel.c')
| -rw-r--r-- | amd64/isel.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/amd64/isel.c b/amd64/isel.c index 2c2e9be..65ccfb7 100644 --- a/amd64/isel.c +++ b/amd64/isel.c @@ -405,7 +405,20 @@ sel(struct function *fn, struct instr *ins, struct block *blk, int *curi) else fixarg(&ins->r, ins, blk, curi); break; + case Ocvtu4f: + fixarg(&ins->l, ins, blk, curi); + ins->l = insertinstr(blk, (*curi)++, mkinstr(Oextu4, KI8, ins->l)); + ins->op = Ocvts8f; + break; + case Ocvtf4u: case Ocvtf8u: + fixarg(&ins->l, ins, blk, curi); + if (ins->cls == KI4) { + ins->l = insertinstr(blk, (*curi)++, mkinstr(ins->op == Ocvtf4u ? Ocvtf4s : Ocvtf8s, KI8, ins->l)); + ins->op = Oextu4; + } else assert(!"nyi flt -> u64"); + break; case Ocvtf4f8: case Ocvtf8f4: case Ocvtf4s: case Ocvtf8s: case Ocvts4f: case Ocvts8f: + case Ocvtu8f: case Oexts1: case Oextu1: case Oexts2: case Oextu2: case Oexts4: case Oextu4: case Ocopy: fixarg(&ins->l, ins, blk, curi); |