summary refs log tree commit diff
path: root/arm64/emit.c
diff options
context:
space:
mode:
authorBor Grošelj Simić <bor.groseljsimic@telemach.net>2022-01-28 02:06:18 +0100
committerQuentin Carbonneaux <quentin@c9x.me>2022-01-28 09:24:15 +0100
commit3964574a8325ab802f98856195b8214dcce3124c (patch)
tree0ac6128a201088b186d642b990a02c6e78cf715a /arm64/emit.c
parent74d022f975f22fda20c0d1fe09a3f6fc7680f64f (diff)
downloadroux-3964574a8325ab802f98856195b8214dcce3124c.tar.gz
implement float -> unsigned casts
amd64 lacks instruction for this so it has to be implemented with
float -> signed casts. The approach is borrowed from llvm.
Diffstat (limited to 'arm64/emit.c')
-rw-r--r--arm64/emit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arm64/emit.c b/arm64/emit.c
index 7cebcab..70384c0 100644
--- a/arm64/emit.c
+++ b/arm64/emit.c
@@ -89,7 +89,9 @@ static struct {
 	{ Ocast,   Ks, "fmov %=, %W0" },
 	{ Ocast,   Kd, "fmov %=, %L0" },
 	{ Ostosi,  Ka, "fcvtzs %=, %S0" },
+	{ Ostoui,  Ka, "fcvtzu %=, %S0" },
 	{ Odtosi,  Ka, "fcvtzs %=, %D0" },
+	{ Odtoui,  Ka, "fcvtzu %=, %D0" },
 	{ Oswtof,  Ka, "scvtf %=, %W0" },
 	{ Ouwtof,  Ka, "ucvtf %=, %W0" },
 	{ Osltof,  Ka, "scvtf %=, %L0" },