print-rtl.c (print_rtx): Call PRINT_REG with second argument -1.

* print-rtl.c (print_rtx): Call PRINT_REG with second argument -1.
	* config/i386/i386.c (print_reg): Abort on a virtual register
	if code != -1; not if file == asm_out_file.
	* config/i386/i386.h (PRINT_REG): Document meaning of CODE == -1.
	(DEBUG_PRINT_REG): Delete, unused.

From-SVN: r73203
This commit is contained in:
Zack Weinberg 2003-11-02 19:47:57 +00:00
parent 634879c891
commit 9a623a652b
4 changed files with 48 additions and 100 deletions

View File

@ -1,3 +1,11 @@
2003-11-02 Zack Weinberg <zack@codesourcery.com>
* print-rtl.c (print_rtx): Call PRINT_REG with second argument -1.
* config/i386/i386.c (print_reg): Abort on a virtual register
if code != -1; not if file == asm_out_file.
* config/i386/i386.h (PRINT_REG): Document meaning of CODE == -1.
(DEBUG_PRINT_REG): Delete, unused.
2003-11-02 Andreas Schwab <schwab@suse.de>
* config/ia64/fde-glibc.c (_GNU_SOURCE): Define to 1 instead of

View File

@ -6993,11 +6993,14 @@ put_condition_code (enum rtx_code code, enum machine_mode mode, int reverse,
void
print_reg (rtx x, int code, FILE *file)
{
if ((REGNO (x) == ARG_POINTER_REGNUM
/* Code -1 indicates we are called from print_rtx, and it is not
an error for a virtual register to appear here. */
if (code == -1)
code = 0;
else if (REGNO (x) == ARG_POINTER_REGNUM
|| REGNO (x) == FRAME_POINTER_REGNUM
|| REGNO (x) == FLAGS_REG
|| REGNO (x) == FPSR_REG)
&& file == asm_out_file)
abort ();
if (ASSEMBLER_DIALECT == ASM_ATT || USER_LABEL_PREFIX[0] == 0)

View File

@ -2882,7 +2882,8 @@ do { \
If CODE is 'k', pretend the mode is SImode.
If CODE is 'q', pretend the mode is DImode.
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. */
If CODE is 'y', print "st(0)" instead of "st", if the reg is stack op.
If CODE is -1, it is not an error for X to be a virtual register. */
#define PRINT_REG(X, CODE, FILE) \
print_reg ((X), (CODE), (FILE))
@ -2899,70 +2900,6 @@ do { \
goto FAIL; \
} while (0);
/* Print the name of a register for based on its machine mode and number.
This macro is used to print debugging output.
This macro is different from PRINT_REG in that it may be used in
programs that are not linked with aux-output.o. */
#define DEBUG_PRINT_REG(X, CODE, FILE) \
do { static const char * const hi_name[] = HI_REGISTER_NAMES; \
static const char * const qi_name[] = QI_REGISTER_NAMES; \
fprintf ((FILE), "%d ", REGNO (X)); \
if (REGNO (X) == FLAGS_REG) \
{ fputs ("flags", (FILE)); break; } \
if (REGNO (X) == DIRFLAG_REG) \
{ fputs ("dirflag", (FILE)); break; } \
if (REGNO (X) == FPSR_REG) \
{ fputs ("fpsr", (FILE)); break; } \
if (REGNO (X) == ARG_POINTER_REGNUM) \
{ fputs ("argp", (FILE)); break; } \
if (REGNO (X) == FRAME_POINTER_REGNUM) \
{ fputs ("frame", (FILE)); break; } \
if (STACK_TOP_P (X)) \
{ fputs ("st(0)", (FILE)); break; } \
if (FP_REG_P (X)) \
{ fputs (hi_name[REGNO(X)], (FILE)); break; } \
if (REX_INT_REG_P (X)) \
{ \
switch (GET_MODE_SIZE (GET_MODE (X))) \
{ \
default: \
case 8: \
fprintf ((FILE), "r%i", REGNO (X) \
- FIRST_REX_INT_REG + 8); \
break; \
case 4: \
fprintf ((FILE), "r%id", REGNO (X) \
- FIRST_REX_INT_REG + 8); \
break; \
case 2: \
fprintf ((FILE), "r%iw", REGNO (X) \
- FIRST_REX_INT_REG + 8); \
break; \
case 1: \
fprintf ((FILE), "r%ib", REGNO (X) \
- FIRST_REX_INT_REG + 8); \
break; \
} \
break; \
} \
switch (GET_MODE_SIZE (GET_MODE (X))) \
{ \
case 8: \
fputs ("r", (FILE)); \
fputs (hi_name[REGNO (X)], (FILE)); \
break; \
default: \
fputs ("e", (FILE)); \
case 2: \
fputs (hi_name[REGNO (X)], (FILE)); \
break; \
case 1: \
fputs (qi_name[REGNO (X)], (FILE)); \
break; \
} \
} while (0)
/* a letter which is not needed by the normal asm syntax, which
we can use for operand syntax in the extended asm */

View File

@ -386,7 +386,7 @@ print_rtx (rtx in_rtx)
if (GET_CODE (in_rtx) == REG && value < FIRST_PSEUDO_REGISTER)
{
fputc (' ', outfile);
PRINT_REG (in_rtx, 0, outfile);
PRINT_REG (in_rtx, -1, outfile);
}
else if (GET_CODE (in_rtx) == REG
&& value <= LAST_VIRTUAL_REGISTER)