http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60207

            Bug ID: 60207
           Summary: Wrong TFmode check in construct_container
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: hubicka at ucw dot cz, rth at gcc dot gnu.org, ubizjak at 
gmail dot com

r73099:

commit e07e720e6332466eef5d5f0ad7687523ddbfc644
Author: hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Thu Oct 30 21:01:16 2003 +0000

      * real.c (encode_ieee_extended): Initialize whole array.
      * reg-stack.c (move_for_stack_reg0: Use always XFmode.
      * i386-modes.def: Change definitions of TFmode and XFmode.
      * i386.c (classify_argument): Rename TFmodes to XFmodes; add new TFmode
co
de.
      (construct_container): Allow constructing of TFmode integer containers.
      (ix86_return_in_memory):  XFmode is not returned in memory.
      (init_ext_80387_constants): Always use XFmode.
      (print_operand): Likewise.
      (ix86_prepare_fp_compare_regs): Likewise.
      (split_to_parts): Deal with TFmode.
      (split_long_move): Simplify.
      (ix86_init_mmx_sse_builtins): Add __float80, __float128.
      (ix86_memory_move_cost): Do not confuse TFmode.
      * i386.h (LONG_DOUBLE_TYPE_SIZE): Set to 96.
      (IS_STACK_MODE): TFmode is not stack mode.
      (HARD_REGNO_NREGS, CLASS_MAX_NREGS): Deal nicely with XFmode.
      (VALID_SSE_REG_MODE): Allow TFmode.
      (VALID_FP_MODE_P): Disallow TFmode.

passed TFmode in integer registers:

+    case TFmode:
+      classes[0] = X86_64_INTEGER_CLASS;
+      classes[1] = X86_64_INTEGER_CLASS;
+      return 2;

   if (n == 2 && class[0] == X86_64_INTEGER_CLASS
       && class[1] == X86_64_INTEGER_CLASS
-      && (mode == CDImode || mode == TImode)
+      && (mode == CDImode || mode == TImode || mode == TFmode)
       && intreg[0] + 1 == intreg[1])
     return gen_rtx_REG (mode, intreg[0]);

But it was changed later to pass TFmode in SSE register:

commit fabb8546e54830051300c70ddcd8a6fce3b7d790
Author: rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Fri Jul 9 22:35:35 2004 +0000

            * config/i386/i386.c (classify_argument): Treat V1xx modes the same
as
            their base modes. CTImode, TCmode, and XCmode must be passed in
memory.
            TFmode (__float128) must be is an SSE/SSEUP pair. V2SImode,
V4HImode,
            and V8QI are class SSE. All sufficiently small remaining vector
modes
            must be passed in one or two integer registers.
            (ix86_libcall_value): TFmode must be returned in xmm0, XCmode must
be
            returned in memory.
            (bdesc_2arg, ix86_init_mmx_sse_builtins): __builtin_ia32_pmuludq
and
            __builtin_ia32_pmuludq128 have non-uniform argument and return
types
            and must thus be handled explicitly.
            * config/i386/i386.md (*movdi_1_rex64): Add cases for moving
between
            MMX and XMM regs.
            (movv8qi_internal, movv4hi_internal, movv2si_internal,
            movv2sf_internal): Permit moving between MMX and XMM registers
(since
            MMX areguments and return values are passed in XMM registers).
            (sse2_umulsidi3): Correct type and mode.

But we didn't remove mode == TFmode check in construct_container.

Reply via email to