diff options
| author | 2026-02-24 15:47:10 +0100 | |
|---|---|---|
| committer | 2026-02-24 15:47:10 +0100 | |
| commit | 9f202ac53acfac00addb5b6e4c9b1e5c7a33ea45 (patch) | |
| tree | 34bb26c3a9f4ed01057fdcc5e3c435e2c61ed316 /aarch64 | |
| parent | 659430f48f8db6335676ed933f53e4c89d28106d (diff) | |
fix various warnings
Diffstat (limited to 'aarch64')
| -rw-r--r-- | aarch64/emit.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 { |