From 87ccbc5cdd38ffd76515d6c6df48d1680ff0b380 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Sat, 28 Oct 2006 11:20:23 +0200 Subject: [PATCH] i386.c (output_387_ffreep): Create output from a template string for !HAVE_AS_IX86_FFREEP. * config/i386/i386.c (output_387_ffreep): Create output from a template string for !HAVE_AS_IX86_FFREEP. From-SVN: r118101 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386.c | 20 +++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 855dccbbcf3..d1d2e4e421d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2006-10-28 Uros Bizjak + + * config/i386/i386.c (output_387_ffreep): Create output from a + template string for !HAVE_AS_IX86_FFREEP. + 2006-10-27 Eric Christopher * config/darwin.c: Fix formatting and grammar. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 41d76c3689f..14974ff1481 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -8698,17 +8698,15 @@ output_387_ffreep (rtx *operands ATTRIBUTE_UNUSED, int opno) #if HAVE_AS_IX86_FFREEP return opno ? "ffreep\t%y1" : "ffreep\t%y0"; #else - switch (REGNO (operands[opno])) - { - case FIRST_STACK_REG + 0: return ".word\t0xc0df"; - case FIRST_STACK_REG + 1: return ".word\t0xc1df"; - case FIRST_STACK_REG + 2: return ".word\t0xc2df"; - case FIRST_STACK_REG + 3: return ".word\t0xc3df"; - case FIRST_STACK_REG + 4: return ".word\t0xc4df"; - case FIRST_STACK_REG + 5: return ".word\t0xc5df"; - case FIRST_STACK_REG + 6: return ".word\t0xc6df"; - case FIRST_STACK_REG + 7: return ".word\t0xc7df"; - } + { + static char retval[] = ".word\t0xc_df"; + int regno = REGNO (operands[opno]); + + gcc_assert (FP_REGNO_P (regno)); + + retval[9] = '0' + (regno - FIRST_STACK_REG); + return retval; + } #endif return opno ? "fstp\t%y1" : "fstp\t%y0"; -- 2.30.2