aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-08-17 23:46:43 +0000
committerNick Clifton <nickc@redhat.com>2000-08-17 23:46:43 +0000
commit4fb7971f4b419c9c5cac5cdeaf4b32162caa9a49 (patch)
tree8dd1b4a58eae0ab2f9583a4fe0a174570cd6e1be /gas
parent3f215a10930f7d2cd7dc76f6a0b51bd405ae1a7d (diff)
downloadgdb-4fb7971f4b419c9c5cac5cdeaf4b32162caa9a49.zip
gdb-4fb7971f4b419c9c5cac5cdeaf4b32162caa9a49.tar.gz
gdb-4fb7971f4b419c9c5cac5cdeaf4b32162caa9a49.tar.bz2
Allow illegal shifts by zero to be recorded as logical shift lefts by zero.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-arm.c18
2 files changed, 17 insertions, 6 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 03c7e97..2e767f0 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2000-08-17 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-arm.c (decode_shift): Allow illegal shifts by zero
+ to be recoded as logical shift lefts by zero.
+
2000-08-16 Jim Wilson <wilson@cygnus.com>
* config/tc-ia64.c (specify_resource, case IA64_RS_GR): Handle
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index a2ae26f..8af25e6 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -2531,7 +2531,7 @@ decode_shift (str, unrestrict)
char ** str;
int unrestrict;
{
- struct asm_shift_name * shift;
+ const struct asm_shift_name * shift;
char * p;
char c;
@@ -2548,7 +2548,7 @@ decode_shift (str, unrestrict)
c = * p;
* p = '\0';
- shift = (struct asm_shift_name *) hash_find (arm_shift_hsh, * str);
+ shift = (const struct asm_shift_name *) hash_find (arm_shift_hsh, * str);
* p = c;
if (shift == NULL)
@@ -2602,10 +2602,16 @@ decode_shift (str, unrestrict)
|| (num == 32 && shift->properties->allows_32 == 0)
)
{
- /* As a special case we allow ROR #0, but we issue a message
- reminding the programmer that this is actually an RRX. */
- if (num == 0 && shift->properties->index == SHIFT_ROR)
- as_tsktsk (_("ROR #0 is actually RRX"));
+ /* As a special case we allow a shift of zero for
+ modes that do not support it to be recoded as an
+ logical shift left of zero (ie nothing). We warn
+ about this though. */
+ if (num == 0)
+ {
+ as_tsktsk (_("Shift of 0 ignored."));
+ shift = shift_names;
+ assert (shift->properties->index == SHIFT_LSL);
+ }
else
{
inst.error = _("Invalid immediate shift");