aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-04-02 16:10:06 +0100
committerNick Clifton <nickc@redhat.com>2015-04-02 16:10:06 +0100
commit03e080386e266243b2af667af026b992822085cd (patch)
treead075efc8b54860928764bb2843fc22501ecef75 /gas
parent4295609462ce6c0983064c10d95ff6bacce0cdfd (diff)
downloadgdb-03e080386e266243b2af667af026b992822085cd.zip
gdb-03e080386e266243b2af667af026b992822085cd.tar.gz
gdb-03e080386e266243b2af667af026b992822085cd.tar.bz2
Fixes a bug in the microblaze assembler where it would not complain about constants larger than 32-bits.
PR gas/18189 * config/tc-microblaze.c (parse_imm): Use offsetT as the type for min and max parameters.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-microblaze.c10
2 files changed, 11 insertions, 5 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index d8335ab..e08b0f7 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2015-04-02 Nick Clifton <nickc@redhat.com>
+
+ PR gas/18189
+ * config/tc-microblaze.c (parse_imm): Use offsetT as the type for
+ min and max parameters.
+
2015-04-02 Renlin Li <renlin.li@arm.com>
* config/tc-aarch64.c (mapping_state): Emit MAP_DATA within text section in order.
diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c
index bdf25c2..6f0e795 100644
--- a/gas/config/tc-microblaze.c
+++ b/gas/config/tc-microblaze.c
@@ -685,7 +685,7 @@ static symbolS * GOT_symbol;
#define GOT_SYMBOL_NAME "_GLOBAL_OFFSET_TABLE_"
static char *
-parse_imm (char * s, expressionS * e, int min, int max)
+parse_imm (char * s, expressionS * e, offsetT min, offsetT max)
{
char *new_pointer;
char *atp;
@@ -736,11 +736,11 @@ parse_imm (char * s, expressionS * e, int min, int max)
; /* An error message has already been emitted. */
else if ((e->X_op != O_constant && e->X_op != O_symbol) )
as_fatal (_("operand must be a constant or a label"));
- else if ((e->X_op == O_constant) && ((int) e->X_add_number < min
- || (int) e->X_add_number > max))
+ else if ((e->X_op == O_constant) && (e->X_add_number < min
+ || e->X_add_number > max))
{
- as_fatal (_("operand must be absolute in range %d..%d, not %d"),
- min, max, (int) e->X_add_number);
+ as_fatal (_("operand must be absolute in range %lx..%lx, not %lx"),
+ (long) min, (long) max, (long) e->X_add_number);
}
if (atp)