aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1993-11-03 06:21:14 +0000
committerJeff Law <law@redhat.com>1993-11-03 06:21:14 +0000
commitd6e524f30851d7bd1c8a260a49fed60bdfd864ef (patch)
tree04060d4ec7685a6caf1e4b910b8c975828b122b7 /gas
parent9ac55becf6f032f4aca2d10b663f90c48fd22e9b (diff)
downloadgdb-d6e524f30851d7bd1c8a260a49fed60bdfd864ef.zip
gdb-d6e524f30851d7bd1c8a260a49fed60bdfd864ef.tar.gz
gdb-d6e524f30851d7bd1c8a260a49fed60bdfd864ef.tar.bz2
* 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.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/config/tc-hppa.c39
2 files changed, 37 insertions, 10 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index fca4957..4b23846 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -6,6 +6,14 @@ Tue Nov 2 18:04:11 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
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.
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
index 8eca5c0..468933f 100644
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -832,6 +832,8 @@ static int print_errors = 1;
%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.
@@ -869,6 +871,7 @@ static const struct pd_reg pre_defined_registers[] =
{"%cr31", 31},
{"%cr8", 8},
{"%cr9", 9},
+ {"%dp", 27},
{"%eiem", 15},
{"%eirr", 23},
{"%fr0", 0},
@@ -1028,6 +1031,7 @@ static const struct pd_reg pre_defined_registers[] =
{"%rctr", 0},
{"%ret0", 28},
{"%ret1", 29},
+ {"%rp", 2},
{"%sar", 11},
{"%sp", 30},
{"%sr0", 0},
@@ -3395,8 +3399,17 @@ pa_parse_number (s, result)
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
@@ -3419,9 +3432,8 @@ pa_parse_number (s, result)
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;
}
@@ -3458,17 +3470,24 @@ pa_parse_number (s, result)
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;