summaryrefslogtreecommitdiff
path: root/gas/config/tc-ppc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/tc-ppc.c')
-rw-r--r--gas/config/tc-ppc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 978f0f3dd8..4fe9f5aec8 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -1516,7 +1516,7 @@ ppc_insert_operand (insn, operand, val, file, line)
{
long min, max, right;
offsetT test;
-
+
max = operand->bitm;
right = max & -max;
min = 0;
@@ -1554,8 +1554,7 @@ ppc_insert_operand (insn, operand, val, file, line)
else
test = val;
- if (test < (offsetT) min
- || test > (offsetT) max
+ if ((min <= max && (test < (offsetT) min || test > (offsetT) max))
|| (test & (right - 1)) != 0)
as_bad_value_out_of_range (_("operand"),
test, (offsetT) min, (offsetT) max, file, line);