Tue Nov 2 15:07:07 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+ * tc-hppa.c: Add %dp and %rp as synonyms for %r27 and %r2 in the
+ predefined register table.
+ (pa_parse_number): Handle %rp in common register shortcut code.
+ Consistently set return value to -1 for an error. Clean up error
+ messages and only print them when "print_errors" is true. Handle
+ empty string case like the HP assembler -- assume a value of
+ zero.
+
* config/ho-hpux.h: Do not include ho-sysv.h. Instead include
standard hpux include files to pick up various function decls.
%r26 - %r23 have %arg0 - %arg3 as synonyms
%r28 - %r29 have %ret0 - %ret1 as synonyms
%r30 has %sp as a synonym
+ %r27 has %dp as a synonym
+ %r2 has %rp as a synonym
Almost every control register has a synonym; they are not listed
here for brevity.
{"%cr31", 31},
{"%cr8", 8},
{"%cr9", 9},
+ {"%dp", 27},
{"%eiem", 15},
{"%eirr", 23},
{"%fr0", 0},
{"%rctr", 0},
{"%ret0", 28},
{"%ret1", 29},
+ {"%rp", 2},
{"%sar", 11},
{"%sp", 30},
{"%sr0", 0},
num = *p - '0' + 28;
p++;
}
+ else if (*p == 'p')
+ {
+ num = 2;
+ p++;
+ }
else if (!isdigit (*p))
- as_bad ("Undefined register: '%s'. ASSUMING 0", name);
+ {
+ if (print_errors)
+ as_bad ("Undefined register: '%s'.", name);
+ num = -1;
+ }
else
{
do
else
{
if (print_errors)
- as_bad ("Undefined register: '%s'. ASSUMING 0", name);
- else
- num = -1;
+ as_bad ("Undefined register: '%s'.", name);
+ num = -1;
}
*p = c;
}
else
{
if (print_errors)
- as_bad ("Non-absolute constant: '%s'. ASSUMING 0", name);
- else
- num = -1;
+ as_bad ("Non-absolute symbol: '%s'.", name);
+ num = -1;
}
}
else
{
- if (print_errors)
- as_bad ("Undefined absolute constant: '%s'. ASSUMING 0", name);
+ /* There is where we'd come for an undefined symbol
+ or for an empty string. For an empty string we
+ will return zero. That's a concession made for
+ compatability with the braindamaged HP assemblers. */
+ if (*p == 0)
+ num = 0;
else
- num = -1;
+ {
+ if (print_errors)
+ as_bad ("Undefined absolute constant: '%s'.", name);
+ num = -1;
+ }
}
*p = c;