Allow illegal shifts by zero to be recorded as logical shift lefts by zero.
This commit is contained in:
parent
3f215a1093
commit
4fb7971f4b
|
@ -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>
|
2000-08-16 Jim Wilson <wilson@cygnus.com>
|
||||||
|
|
||||||
* config/tc-ia64.c (specify_resource, case IA64_RS_GR): Handle
|
* config/tc-ia64.c (specify_resource, case IA64_RS_GR): Handle
|
||||||
|
|
|
@ -2531,7 +2531,7 @@ decode_shift (str, unrestrict)
|
||||||
char ** str;
|
char ** str;
|
||||||
int unrestrict;
|
int unrestrict;
|
||||||
{
|
{
|
||||||
struct asm_shift_name * shift;
|
const struct asm_shift_name * shift;
|
||||||
char * p;
|
char * p;
|
||||||
char c;
|
char c;
|
||||||
|
|
||||||
|
@ -2548,7 +2548,7 @@ decode_shift (str, unrestrict)
|
||||||
|
|
||||||
c = * p;
|
c = * p;
|
||||||
* p = '\0';
|
* 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;
|
* p = c;
|
||||||
|
|
||||||
if (shift == NULL)
|
if (shift == NULL)
|
||||||
|
@ -2602,10 +2602,16 @@ decode_shift (str, unrestrict)
|
||||||
|| (num == 32 && shift->properties->allows_32 == 0)
|
|| (num == 32 && shift->properties->allows_32 == 0)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
/* As a special case we allow ROR #0, but we issue a message
|
/* As a special case we allow a shift of zero for
|
||||||
reminding the programmer that this is actually an RRX. */
|
modes that do not support it to be recoded as an
|
||||||
if (num == 0 && shift->properties->index == SHIFT_ROR)
|
logical shift left of zero (ie nothing). We warn
|
||||||
as_tsktsk (_("ROR #0 is actually RRX"));
|
about this though. */
|
||||||
|
if (num == 0)
|
||||||
|
{
|
||||||
|
as_tsktsk (_("Shift of 0 ignored."));
|
||||||
|
shift = shift_names;
|
||||||
|
assert (shift->properties->index == SHIFT_LSL);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
inst.error = _("Invalid immediate shift");
|
inst.error = _("Invalid immediate shift");
|
||||||
|
|
Loading…
Reference in New Issue