scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit f9a20062cefdd032483025a45bd4d09cb5f3b94c
parent 36bf2b2d93e248eb7c2789070a198972e756ab26
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat,  4 Jan 2025 16:38:06 +0100

cc2/qbe: Do not use in32type for relational expressions

Qbe only targets systems where int is 32 bits, but as this is something
that maybe in a far future can change, is better to remove this assumption
here.

Diffstat:
Msrc/cmd/scc-cc/cc2/qbe/cgen.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/cmd/scc-cc/cc2/qbe/cgen.c b/src/cmd/scc-cc/cc2/qbe/cgen.c @@ -609,16 +609,16 @@ rhs(Node *np) true = newlabel(); false = newlabel(); phi = label2node(&aux1, NULL); - tmp = tmpnode(&int32type, NULL); + tmp = tmpnode(tp, NULL); bool(np, true, false); setlabel(true); - code(ASCOPYW, tmp, constnode(&aux2, 1, &int32type), NULL); + code(ASCOPYW, tmp, constnode(&aux2, 1, tp), NULL); code(ASJMP, NULL, phi, NULL); setlabel(false); - code(ASCOPYW, tmp, constnode(&aux2, 0, &int32type), NULL); + code(ASCOPYW, tmp, constnode(&aux2, 0, tp), NULL); setlabel(phi->u.sym); return tmp;