summaryrefslogtreecommitdiff
path: root/gcc/config/rs6000/rs6000-call.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/rs6000/rs6000-call.cc')
-rw-r--r--gcc/config/rs6000/rs6000-call.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/config/rs6000/rs6000-call.cc b/gcc/config/rs6000/rs6000-call.cc
index 5c870d4b958..d9bd5cacc16 100644
--- a/gcc/config/rs6000/rs6000-call.cc
+++ b/gcc/config/rs6000/rs6000-call.cc
@@ -5717,8 +5717,10 @@ rs6000_expand_builtin (tree exp, rtx target, rtx /* subtarget */,
if (!(TREE_CODE (restr_arg) == INTEGER_CST
&& (TREE_INT_CST_LOW (restr_arg) & ~mask) == 0))
{
- error ("argument %d must be a %d-bit unsigned literal",
- bifaddr->restr_opnd[i], bifaddr->restr_val1[i]);
+ unsigned p = (1U << bifaddr->restr_val1[i]) - 1;
+ error ("argument %d must be a literal between 0 and %d,"
+ " inclusive",
+ bifaddr->restr_opnd[i], p);
return CONST0_RTX (mode[0]);
}
break;