aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJames Van Artsdalen <jrv@gnu.org>1992-10-12 03:26:02 +0000
committerJames Van Artsdalen <jrv@gnu.org>1992-10-12 03:26:02 +0000
commit9e06e321305fac06cf2c7b73e9623b46e21ca037 (patch)
tree766006fbbe6af4a728b3936a95cdfe10de445563 /gcc
parent4805ff591cb13d2aa49228f014e598dea3d80664 (diff)
downloadgcc-9e06e321305fac06cf2c7b73e9623b46e21ca037.zip
gcc-9e06e321305fac06cf2c7b73e9623b46e21ca037.tar.gz
gcc-9e06e321305fac06cf2c7b73e9623b46e21ca037.tar.bz2
(PRINT_REG): Make register name arrays static within this macro.
From-SVN: r2401
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/i386/i386.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 5de401d..02f3f78 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -1280,8 +1280,7 @@ extern struct rtx_def *(*i386_compare_gen)(), *(*i386_compare_gen_eq)();
For non floating point regs, the following are the HImode names.
For float regs, the stack top is sometimes referred to as "%st(0)"
- instead of just "%st". PRINT_REG in i386.c handles with with the
- "y" code. */
+ instead of just "%st". PRINT_REG handles this with the "y" code. */
#define HI_REGISTER_NAMES \
{"ax","dx","cx","bx","si","di","bp","sp", \
@@ -1461,13 +1460,11 @@ do { union { float f; long l;} tem; \
If CODE is 'h', pretend the reg is the `high' byte register.
If CODE is 'y', print "st(0)" instead of "st", if the reg is stack op. */
-extern char *hi_reg_name[];
-extern char *qi_reg_name[];
-extern char *qi_high_reg_name[];
-
#define PRINT_REG(X, CODE, FILE) \
- do { if (REGNO (X) == ARG_POINTER_REGNUM) \
- abort (); \
+ do { static char *hi_reg_name[] = HI_REGISTER_NAMES; \
+ static char *qi_reg_name[] = QI_REGISTER_NAMES; \
+ static char *qi_high_reg_name[] = QI_HIGH_REGISTER_NAMES; \
+ if (REGNO (X) == ARG_POINTER_REGNUM) abort (); \
fprintf (FILE, "%s", RP); \
switch ((CODE == 'w' ? 2 \
: CODE == 'b' ? 1 \
@@ -1478,13 +1475,9 @@ extern char *qi_high_reg_name[];
{ \
case 3: \
if (STACK_TOP_P (X)) \
- { \
- fputs ("st(0)", FILE); \
- break; \
- } \
- case 4: \
- case 8: \
- if (!FP_REG_P (X)) fputs ("e", FILE); \
+ { fputs ("st(0)", FILE); break; } \
+ case 4: case 8: \
+ if (! FP_REG_P (X)) fputs ("e", FILE); \
case 2: \
fputs (hi_reg_name[REGNO (X)], FILE); \
break; \