aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTom Wood <wood@gnu.org>1992-03-05 20:07:30 +0000
committerTom Wood <wood@gnu.org>1992-03-05 20:07:30 +0000
commite5c90c23e250db46bbb880af6daf0fcd8d67962b (patch)
treed3908563298a74e34cac5c144200cf38331cb318 /gcc
parentbf4400c2e6915a4ca437a3932575f92b08b46647 (diff)
downloadgcc-e5c90c23e250db46bbb880af6daf0fcd8d67962b.zip
gcc-e5c90c23e250db46bbb880af6daf0fcd8d67962b.tar.gz
gcc-e5c90c23e250db46bbb880af6daf0fcd8d67962b.tar.bz2
*** empty log message ***
From-SVN: r395
Diffstat (limited to 'gcc')
-rw-r--r--gcc/regclass.c16
-rw-r--r--gcc/varasm.c11
2 files changed, 12 insertions, 15 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c
index 5a4d72f..544d78e 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -326,18 +326,14 @@ fix_register (name, fixed, call_used)
/* Decode the name and update the primary form of
the register info. */
- for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
- if (reg_names[i][0] && ! strcmp (reg_names[i], name))
- {
- fixed_regs[i] = fixed;
- call_used_regs[i] = call_used;
- break;
- }
-
- if (i == FIRST_PSEUDO_REGISTER)
+ if ((i = decode_reg_name (name)) >= 0)
+ {
+ fixed_regs[i] = fixed;
+ call_used_regs[i] = call_used;
+ }
+ else
{
warning ("unknown register name: %s", name);
- return;
}
}
diff --git a/gcc/varasm.c b/gcc/varasm.c
index b6b218b..890c969 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -191,7 +191,8 @@ make_function_rtl (decl)
/* Decode an `asm' spec for a declaration as a register name.
Return the register number, or -1 if nothing specified,
- or -2 if the name is not a register. */
+ or -2 if the name is not a register. Accept an exact spelling,
+ a decimal number, or an optional prefix of '%' or '#'. */
int
decode_reg_name (asmspec)
@@ -218,7 +219,7 @@ decode_reg_name (asmspec)
if (reg_names[i][0] && ! strcmp (asmspec, reg_names[i]))
return i;
- if (asmspec[0] == '%')
+ if (asmspec[0] == '%' || asmspec[0] == '#')
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (reg_names[i][0] && ! strcmp (asmspec + 1, reg_names[i]))
return i;
@@ -232,7 +233,7 @@ decode_reg_name (asmspec)
if (! strcmp (asmspec, table[i].name))
return table[i].number;
- if (asmspec[0] == '%')
+ if (asmspec[0] == '%' || asmspec[0] == '#')
for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
if (! strcmp (asmspec + 1, table[i].name))
return table[i].number;
@@ -499,9 +500,9 @@ assemble_start_function (decl, fnname)
#endif
#ifdef DBX_DEBUGGING_INFO
- /* Output SDB definition of the function. */
+ /* Output DBX definition of the function. */
if (write_symbols == DBX_DEBUG)
- dbxout_begin_function ();
+ dbxout_begin_function (decl);
#endif
/* Make function name accessible from other files, if appropriate. */