g++.dg/other/static11.C regression
Zack Weinberg
zack@codesourcery.com
Sun Oct 19 21:57:00 GMT 2003
Zack Weinberg <zack@codesourcery.com> writes:
> What do you think of having print_reg alter its behavior depending on
> whether file == asm_out_file? That lets us restore the abort for the
> case where it matters; we could also restore the printout of the
> internal register number.
I'm bootstrapping this patch, which is based on that concept, now. It
leaves the text printed alone; as I said, I kinda like not showing the
internal register number for hard regs.
zw
* config/i386/i386.c (print_reg): Abort if REGNO (x) is a
virtual register, but only if file == asm_out_file.
* config/i386/i386.h (HI_REGISTER_NAMES): Use "argp", not "",
for ARG_POINTER_REGNUM.
===================================================================
Index: config/i386/i386.c
--- config/i386/i386.c 19 Oct 2003 18:00:12 -0000 1.609
+++ config/i386/i386.c 19 Oct 2003 21:30:01 -0000
@@ -6884,6 +6884,13 @@ put_condition_code (enum rtx_code code,
void
print_reg (rtx x, int code, FILE *file)
{
+ 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)
putc ('%', file);
===================================================================
Index: config/i386/i386.h
--- config/i386/i386.h 26 Sep 2003 20:25:59 -0000 1.354
+++ config/i386/i386.h 19 Oct 2003 21:30:01 -0000
@@ -2747,8 +2747,8 @@ do { \
#undef HI_REGISTER_NAMES
#define HI_REGISTER_NAMES \
{"ax","dx","cx","bx","si","di","bp","sp", \
- "st","st(1)","st(2)","st(3)","st(4)","st(5)","st(6)","st(7)","", \
- "flags","fpsr", "dirflag", "frame", \
+ "st","st(1)","st(2)","st(3)","st(4)","st(5)","st(6)","st(7)", \
+ "argp", "flags", "fpsr", "dirflag", "frame", \
"xmm0","xmm1","xmm2","xmm3","xmm4","xmm5","xmm6","xmm7", \
"mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7" , \
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \
More information about the Gcc-bugs
mailing list