Bug 5139 - Another bit range checking mismatch in config/tc-cris.c
Summary: Another bit range checking mismatch in config/tc-cris.c
Status: RESOLVED INVALID
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.17
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-07 13:06 UTC by Jorma Karvonen
Modified: 2008-01-16 02:33 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jorma Karvonen 2007-10-07 13:06:28 UTC
#: config/tc-cris.c:2120 config/tc-cris.c:2171
#, c-format
msgid "Immediate value not in 16 bit range: %ld"

The error message above is not quite correct, because range -32768...65535 is a
bit greater than 16 bits.

if (instruction->imm_oprnd_size == SIZE_FIELD
  && (out_insnp->expr.X_add_number < -32768
    || out_insnp->expr.X_add_number > 65535))
      as_bad (_("Immediate value not in 16 bit range: %ld"),
Comment 1 Hans-Peter Nilsson 2007-10-07 22:00:08 UTC
Subject: Re:  New: Another bit range checking mismatch in
 config/tc-cris.c

n Sun, 7 Oct 2007, karvjorm at users dot sourceforge dot net wrote:

> #: config/tc-cris.c:2120 config/tc-cris.c:2171
> #, c-format
> msgid "Immediate value not in 16 bit range: %ld"
>
> The error message above is not quite correct, because range -32768...65535 is a
> bit greater than 16 bits.

Same reply as to pr 5138.

brgds, H-P
Comment 2 Alan Modra 2008-01-16 02:33:35 UTC
Not a bug