* Another patch
@ 1994-05-19 0:00 Jeffrey A Law
0 siblings, 0 replies; only message in thread
From: Jeffrey A Law @ 1994-05-19 0:00 UTC (permalink / raw)
To: raeburn; +Cc: gas2
These two bugfixes went into devo just after the gas-2.4 branch
was made. They should probably be included in gas-2.4
[ The first avoids writing an incorrect object file, the second avoids
an abort in the assembler. ]
bfd/ChangeLog:
* libhppa.h (hppa_field_adjust): Avoid adding constant_value into
the final value twice for LR and RR field selectors.
gas/ChangeLog:
* config/tc-hppa.c (pa_parse_fp_cmp_cond): Report an error
on a partial completer match.
Index: bfd/libhppa.h
===================================================================
RCS file: /rel/cvsfiles/devo/bfd/libhppa.h,v
retrieving revision 1.19
retrieving revision 1.21
diff -c -r1.19 -r1.21
*** bfd/libhppa.h 1994/03/19 03:54:42 1.19
--- bfd/libhppa.h 1994/05/16 16:41:39 1.21
***************
*** 308,327 ****
unsigned long constant_value;
unsigned short r_field;
{
- value += constant_value;
switch (r_field)
{
case e_fsel: /* F : no change */
break;
case e_lssel: /* LS : if (bit 21) then add 0x800
arithmetic shift right 11 bits */
if (value & 0x00000400)
value += 0x800;
value = (value & 0xfffff800) >> 11;
break;
case e_rssel: /* RS : Sign extend from bit 21 */
if (value & 0x00000400)
value |= 0xfffff800;
else
--- 308,329 ----
unsigned long constant_value;
unsigned short r_field;
{
switch (r_field)
{
case e_fsel: /* F : no change */
+ value += constant_value;
break;
case e_lssel: /* LS : if (bit 21) then add 0x800
arithmetic shift right 11 bits */
+ value += constant_value;
if (value & 0x00000400)
value += 0x800;
value = (value & 0xfffff800) >> 11;
break;
case e_rssel: /* RS : Sign extend from bit 21 */
+ value += constant_value;
if (value & 0x00000400)
value |= 0xfffff800;
else
***************
*** 329,348 ****
--- 331,354 ----
break;
case e_lsel: /* L : Arithmetic shift right 11 bits */
+ value += constant_value;
value = (value & 0xfffff800) >> 11;
break;
case e_rsel: /* R : Set bits 0-20 to zero */
+ value += constant_value;
value = value & 0x7ff;
break;
case e_ldsel: /* LD : Add 0x800, arithmetic shift
right 11 bits */
+ value += constant_value;
value += 0x800;
value = (value & 0xfffff800) >> 11;
break;
case e_rdsel: /* RD : Set bits 0-20 to one */
+ value += constant_value;
value |= 0xfffff800;
break;
Index: gas/config/tc-hppa.c
===================================================================
RCS file: /rel/cvsfiles/devo/gas/config/tc-hppa.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -c -r1.86 -r1.87
*** gas/config/tc-hppa.c 1994/05/16 19:29:56 1.86
--- gas/config/tc-hppa.c 1994/05/17 18:54:50 1.87
***************
*** 3293,3305 ****
{
cond = fp_cond_map[i].cond;
*s += strlen (fp_cond_map[i].string);
while (**s == ' ' || **s == '\t')
*s = *s + 1;
return cond;
}
}
! as_bad ("Invalid FP Compare Condition: %c", **s);
return 0;
}
--- 3293,3317 ----
{
cond = fp_cond_map[i].cond;
*s += strlen (fp_cond_map[i].string);
+ /* If not a complete match, back up the input string and
+ report an error. */
+ if (**s != ' ' && **s != '\t')
+ {
+ *s -= strlen (fp_cond_map[i].string);
+ break;
+ }
while (**s == ' ' || **s == '\t')
*s = *s + 1;
return cond;
}
}
! as_bad ("Invalid FP Compare Condition: %s", *s);
!
! /* Advance over the bogus completer. */
! while (**s != ',' && **s != ' ' && **s != '\t')
! *s += 1;
!
return 0;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1994-05-19 0:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-05-19 0:00 Another patch Jeffrey A Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).