mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-03-13 17:57:12 +08:00
Add (redundant) parentheses around bit tests mixed with &&
It is easy to get confused when mixing & and &&, so add redundant parenteses for clarity. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
parent
1be09ee0d7
commit
c6c750cb3d
@ -1872,7 +1872,7 @@ static int rexflags(int val, opflags_t flags, int mask)
|
||||
{
|
||||
int rex = 0;
|
||||
|
||||
if (val >= 0 && val & 8)
|
||||
if (val >= 0 && (val & 8))
|
||||
rex |= REX_B|REX_X|REX_R;
|
||||
if (flags & BITS64)
|
||||
rex |= REX_W;
|
||||
@ -1891,11 +1891,11 @@ static int evexflags(int val, decoflags_t deco,
|
||||
|
||||
switch (byte) {
|
||||
case 0:
|
||||
if (val >= 0 && val & 16)
|
||||
if (val >= 0 && (val & 16))
|
||||
evex |= (EVEX_P0RP | EVEX_P0X);
|
||||
break;
|
||||
case 2:
|
||||
if (val >= 0 && val & 16)
|
||||
if (val >= 0 && (val & 16))
|
||||
evex |= EVEX_P2VP;
|
||||
if (deco & Z)
|
||||
evex |= EVEX_P2Z;
|
||||
|
Loading…
x
Reference in New Issue
Block a user