Browse Source

zero msbs of 32-bit constants

Some noisy assemblers complain
when asked to do it themselves.
Quentin Carbonneaux 3 years ago
parent
commit
d79b2aecbf
1 changed files with 2 additions and 0 deletions
  1. 2 0
      fold.c

+ 2 - 0
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;