diff options
| author | 2026-01-08 09:08:07 +0100 | |
|---|---|---|
| committer | 2026-01-08 09:08:07 +0100 | |
| commit | 45036f2a6f612d8bbe071d332c5a0baf92783044 (patch) | |
| tree | 6cf2b6e691170af42b1ae0723bb83af456b29394 | |
| parent | 3bfe6672357c35fb643e09389c277af2fd437891 (diff) | |
ir: only stub out float <-> u64 cvt on x86
hackish..
| -rw-r--r-- | ir/builder.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ir/builder.c b/ir/builder.c index 1348fe1..6758533 100644 --- a/ir/builder.c +++ b/ir/builder.c @@ -177,16 +177,15 @@ irunop(struct function *fn, enum op op, enum irclass k, union ref a) case Ocvts64f: break; case Ocvtf32u: case Ocvtf64u: - if (k == KI64 && fn) { - /* XXX some architectures like arm64 do have these instructions natively - * this should probably be handled in a separate "arithmetic-lowering" pass, earlier than isel + if (target.arch == ISx86_64 && k == KI64 && fn) { + /* this should probably be handled in a separate "arithmetic-lowering" pass, earlier than isel */ return cvtfu64(fn, op == Ocvtf32u ? KF32 : KF64, a); } break; case Ocvtu64f: /* XXX see above */ - if (fn) + if (target.arch == ISx86_64 && fn) return cvtu64f(fn, k, a); case Oexts8: case Oextu8: case Oexts16: case Oextu16: case Oexts32: case Oextu32: |