This is the mail archive of the gcc-prs@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]
Other format: [Raw text]

Re: optimization/7460: gcc/g++ 3.1.1 20020714/20020718 (cygwin) segfaulton __builtin_ia32_femms()


The following reply was made to PR optimization/7460; it has been noted by GNATS.

From: Graham Stott <graham.stott@btinternet.com>
To: gcc@tbp.dyndns.org
Cc: gcc-gnats@gcc.gnu.org,  gcc-patches@gcc.gnu.org
Subject: Re: optimization/7460: gcc/g++ 3.1.1 20020714/20020718 (cygwin) segfault
 on __builtin_ia32_femms()
Date: Thu, 01 Aug 2002 00:53:36 +0100

 All,
 
 Confirmed also present CVS mainline and not cygwin specific.
 
 The problem here is the define_attr "memory" in i386.md assumes that an insn always has two operands
 which is not the case for femms so when get_attr_memory tries to determine the "memory" attribute
 for the femms insn it tries to access operand 2 which doesn't exist.
 
 The patch fixes this problem for femms by explicitly specifying the "memory" attrib on the insn itself
 so that get_attr_memory nevers gets called for this insn.
 
 This doesn't fix the generic problem with the define_attr "memory" definition which is assuming an insn
 always has two operands.
 
 bootstrapped i686-pc-linux-gnu all languages no regressions.
 
 OK for mainline and 3.2?
 
 Graham
 
 ChangeLog
 
 2002-07-31  Graham Stott  <graham.stott@btinternet.com>
 
         * config/i386/i386.md ("femms"): Add "memory" attr "none".
 
 -------------------------------------------------------------
 Index: i386.md
 ===================================================================
 RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
 retrieving revision 1.378
 diff -c -p -r1.378 i386.md
 *** i386.md     16 Jul 2002 10:24:11 -0000      1.378
 --- i386.md     31 Jul 2002 23:35:13 -0000
 *** 19819,19825 ****
       (clobber (reg:DI 36))]
      "TARGET_3DNOW"
      "femms"
 !   [(set_attr "type" "mmx")])
 
    (define_insn "pf2id"
      [(set (match_operand:V2SI 0 "register_operand" "=y")
 --- 19819,19826 ----
       (clobber (reg:DI 36))]
      "TARGET_3DNOW"
      "femms"
 !   [(set_attr "type" "mmx")
 !    (set_attr "memory" "none")])
 
    (define_insn "pf2id"
      [(set (match_operand:V2SI 0 "register_operand" "=y")
 -----------------------------------------------------------
 
 
 
 
 
 
 


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