From 9f202ac53acfac00addb5b6e4c9b1e5c7a33ea45 Mon Sep 17 00:00:00 2001 From: lemon Date: Tue, 24 Feb 2026 15:47:10 +0100 Subject: fix various warnings --- aarch64/emit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'aarch64') diff --git a/aarch64/emit.c b/aarch64/emit.c index 6db1bd6..3fd3278 100644 --- a/aarch64/emit.c +++ b/aarch64/emit.c @@ -759,7 +759,7 @@ emitinstr(uchar **pcode, struct function *fn, struct block *blk, int curi, struc break; case Oshl: if (ins->r.t == RICON) { - uint nbit = cls == KI32 ? 32 : 64, s = ins->r.i & nbit-1; + uint nbit = cls == KI32 ? 32 : 64, s = ins->r.i & (nbit-1); assert(s > 0); Xubfm(pcode, cls, reg2oper(ins->reg-1), ref2oper(ins->l), nbit-s, nbit-s-1); } else { @@ -769,7 +769,7 @@ emitinstr(uchar **pcode, struct function *fn, struct block *blk, int curi, struc break; case Oslr: if (ins->r.t == RICON) { - uint nbit = cls == KI32 ? 32 : 64, s = ins->r.i & nbit-1; + uint nbit = cls == KI32 ? 32 : 64, s = ins->r.i & (nbit-1); assert(s > 0); Xubfm(pcode, cls, reg2oper(ins->reg-1), ref2oper(ins->l), s, nbit-1); } else { @@ -779,7 +779,7 @@ emitinstr(uchar **pcode, struct function *fn, struct block *blk, int curi, struc break; case Osar: if (ins->r.t == RICON) { - uint nbit = cls == KI32 ? 32 : 64, s = ins->r.i & nbit-1; + uint nbit = cls == KI32 ? 32 : 64, s = ins->r.i & (nbit-1); assert(s > 0); Xsbfm(pcode, cls, reg2oper(ins->reg-1), ref2oper(ins->l), s, nbit-1); } else { -- cgit v1.2.3