From 58ea0ab745e99df13cd6ea580fadf0831e256816 Mon Sep 17 00:00:00 2001 From: John Reiser Date: Tue, 1 Mar 2005 15:35:09 +0000 Subject: [PATCH] use "~0u" to force unsigned bitmasks committer: jreiser 1109691309 +0000 --- src/filter/ppcbxx.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/filter/ppcbxx.h b/src/filter/ppcbxx.h index 430c2669..914a5160 100644 --- a/src/filter/ppcbxx.h +++ b/src/filter/ppcbxx.h @@ -58,13 +58,13 @@ static int F(Filter *f) unsigned char buf[256]; unsigned short wbuf[256]; memset(wbuf, 0, sizeof(wbuf)); - memset(buf , 0, -(~0<>6; - if (size <= (off & (~0<<2))+ic) { - buf[(~(~0<>(26 - W_CTO))] |= 1; + if (size <= (off & (~0u<<2))+ic) { + buf[(~(~0u<>(26 - W_CTO))] |= 1; ++wbuf[0xff&(off>>18)]; } } @@ -83,7 +83,7 @@ static int F(Filter *f) for (ic = 0; ic < size - 4; ic+=4) if (COND(b,ic)) { unsigned const word = get_be32(b+ic); unsigned const off = (int)(word<<6) >>6; - unsigned const jc = (off & (~0<<2))+ic; + unsigned const jc = (off & (~0u<<2))+ic; // try to detect 'real' calls only if (jc < size) { #ifdef U @@ -94,7 +94,7 @@ static int F(Filter *f) } else { assert(0==W_CTO - || (~(~0<>(24+2 - W_CTO))) != cto8); // this should not happen + || (~(~0u<>(24+2 - W_CTO))) != cto8); // this should not happen lastnoncall = ic; noncalls++; } @@ -127,8 +127,8 @@ static int U(Filter *f) for (ic = 0; ic < size4; ic+=4) if (COND(b,ic)) { unsigned const word = get_be32(b+ic); - if ((~(~0<>(24+2 - W_CTO))) == f->cto) { - unsigned const jc = word & (~(~0<<(26 - W_CTO)) & (~0<<2)); + if ((~(~0u<>(24+2 - W_CTO))) == f->cto) { + unsigned const jc = word & (~(~0u<<(26 - W_CTO)) & (~0u<<2)); set_be32(b+ic, (0xfc000003&word)|(0x03fffffc&(jc-ic-addvalue))); f->calls++; f->lastcall = ic;