diff options
Diffstat (limited to 'gcc/config/i386/i386.c')
-rw-r--r-- | gcc/config/i386/i386.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index a42f1746317..3bcc5eb436c 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -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 - || REGNO (x) == FRAME_POINTER_REGNUM - || REGNO (x) == FLAGS_REG - || REGNO (x) == FPSR_REG) - && file == asm_out_file) + /* 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) abort (); if (ASSEMBLER_DIALECT == ASM_ATT || USER_LABEL_PREFIX[0] == 0) |