mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-25 05:00:01 +00:00
* 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.
This commit is contained in:
parent
9ac55becf6
commit
d6e524f308
@ -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.
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user