This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PPro/CC_FCOMI patch


> Here is the CC_FCOMI patch with 2 missing parts.

I turned up a couple of problems.

  1) output_float_compare merely checks if operand 1 is
     a stack register when deciding if FCOMI can be used.
     FCOMI requires that both operands be stack registers
     and the patterns currently allow operand 0 to be a
     memory operand.

  2) IEEE comparisons are not handled correctly.  For example:

    #include <floatingpoint.h>

    volatile double a;
    volatile double b;

    main()
      {

      fpsetmask(~FP_X_INV);

      *(unsigned long long *)&a = 0xffffffffffffffffULL;
      *(unsigned long long *)&b = 0xffffffffffffffffULL;

      if (a > b)
        abort();

      exit(0);
      }

    should never abort when compiled for IEEE.  Unfortunately it does
    when using your patch and compiling with -mieee-fp -march=pentiumpro.

-- John
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]