summary refs log tree commit diff
path: root/fold.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin@c9x.me>2022-12-12 13:57:28 +0100
committerQuentin Carbonneaux <quentin@c9x.me>2022-12-12 13:57:28 +0100
commitd79b2aecbf58052262871265e42c78df6d0e8f4c (patch)
treefb5aa5f5729d1e1c89ec4f192b79775bc8732c24 /fold.c
parent9126afa2da0e1635d78429075cc44ca576f68169 (diff)
downloadroux-d79b2aecbf58052262871265e42c78df6d0e8f4c.tar.gz
zero msbs of 32-bit constants
Some noisy assemblers complain
when asked to do it themselves.
Diffstat (limited to 'fold.c')
-rw-r--r--fold.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fold.c b/fold.c
index 4b4a811..f992b3a 100644
--- a/fold.c
+++ b/fold.c
@@ -525,6 +525,8 @@ opfold(int op, int cls, Con *cl, Con *cr, Fn *fn)
 			return Bot;
 	} else
 		foldflt(&c, op, cls == Kd, cl, cr);
+	if (!KWIDE(cls))
+		c.bits.i &= 0xffffffff;
 	r = newcon(&c, fn);
 	assert(!(cls == Ks || cls == Kd) || c.flt);
 	return r.val;