Commit f3c33d9d by Michael Meissner Committed by Michael Meissner

Make UNSPEC/UNSPECV constants use the enum; Fix 48192; Add test case for 48053

From-SVN: r171247
parent ac43f774
2011-03-21 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rs6000.md (UNSPEC_*, UNSPECV_*): Redefine all
UNSPEC constants to be in the unspec enumeration, and redefine
all UNSPECV constants to be in the unspecv enumeration, so that
dumps print which unspec/unspec_volatile this is.
* config/rs6000/vector.md (UNSPEC_*): Ditto.
* config/rs6000/paired.md (UNSPEC_*): Ditto.
* config/rs6000/vsx.md (UNSPEC_*): Ditto.
* config/rs6000/altivec.md (UNSPEC_*, UNSPECV_*): Ditto.
* config/rs6000/dfp.md (UNSPEC_*): Ditto.
* config/rs6000/rs6000.md (UNSPECV_ISYNC, UNSPECV_LWSYNC): Rename
UNSPEC_ISYNC and UNSPEC_HWSYNC to UNSPECV_ISYNC and
UNSPECV_LWSYNC, since these are used as unspec_volatile.
* config/rs6000/sync.md (isync, lwsync): Ditto.
2011-03-21 Richard Guenther <rguenther@suse.de> 2011-03-21 Richard Guenther <rguenther@suse.de>
* params.def (lto-min-partition): Fix typo. * params.def (lto-min-partition): Fix typo.
......
...@@ -19,138 +19,130 @@ ...@@ -19,138 +19,130 @@
;; along with GCC; see the file COPYING3. If not see ;; along with GCC; see the file COPYING3. If not see
;; <http://www.gnu.org/licenses/>. ;; <http://www.gnu.org/licenses/>.
(define_constants (define_c_enum "unspec"
;; 51-62 deleted [UNSPEC_VCMPBFP
[(UNSPEC_VCMPBFP 64) UNSPEC_VMSUMU
(UNSPEC_VMSUMU 65) UNSPEC_VMSUMM
(UNSPEC_VMSUMM 66) UNSPEC_VMSUMSHM
(UNSPEC_VMSUMSHM 68) UNSPEC_VMSUMUHS
(UNSPEC_VMSUMUHS 69) UNSPEC_VMSUMSHS
(UNSPEC_VMSUMSHS 70) UNSPEC_VMHADDSHS
(UNSPEC_VMHADDSHS 71) UNSPEC_VMHRADDSHS
(UNSPEC_VMHRADDSHS 72) UNSPEC_VMLADDUHM
(UNSPEC_VMLADDUHM 73) UNSPEC_VADDCUW
(UNSPEC_VADDCUW 75) UNSPEC_VADDU
(UNSPEC_VADDU 76) UNSPEC_VADDS
(UNSPEC_VADDS 77) UNSPEC_VAVGU
(UNSPEC_VAVGU 80) UNSPEC_VAVGS
(UNSPEC_VAVGS 81) UNSPEC_VMULEUB
(UNSPEC_VMULEUB 83) UNSPEC_VMULESB
(UNSPEC_VMULESB 84) UNSPEC_VMULEUH
(UNSPEC_VMULEUH 85) UNSPEC_VMULESH
(UNSPEC_VMULESH 86) UNSPEC_VMULOUB
(UNSPEC_VMULOUB 87) UNSPEC_VMULOSB
(UNSPEC_VMULOSB 88) UNSPEC_VMULOUH
(UNSPEC_VMULOUH 89) UNSPEC_VMULOSH
(UNSPEC_VMULOSH 90) UNSPEC_VPKUHUM
(UNSPEC_VPKUHUM 93) UNSPEC_VPKUWUM
(UNSPEC_VPKUWUM 94) UNSPEC_VPKPX
(UNSPEC_VPKPX 95) UNSPEC_VPKSHSS
(UNSPEC_VPKSHSS 97) UNSPEC_VPKSWSS
(UNSPEC_VPKSWSS 99) UNSPEC_VPKUHUS
(UNSPEC_VPKUHUS 100) UNSPEC_VPKSHUS
(UNSPEC_VPKSHUS 101) UNSPEC_VPKUWUS
(UNSPEC_VPKUWUS 102) UNSPEC_VPKSWUS
(UNSPEC_VPKSWUS 103) UNSPEC_VSLV4SI
;; 104 deleted UNSPEC_VSLO
(UNSPEC_VSLV4SI 110) UNSPEC_VSR
(UNSPEC_VSLO 111) UNSPEC_VSRO
(UNSPEC_VSR 118) UNSPEC_VSUBCUW
(UNSPEC_VSRO 119) UNSPEC_VSUBU
(UNSPEC_VSUBCUW 124) UNSPEC_VSUBS
(UNSPEC_VSUBU 125) UNSPEC_VSUM4UBS
(UNSPEC_VSUBS 126) UNSPEC_VSUM4S
(UNSPEC_VSUM4UBS 131) UNSPEC_VSUM2SWS
(UNSPEC_VSUM4S 132) UNSPEC_VSUMSWS
(UNSPEC_VSUM2SWS 134) UNSPEC_VPERM
(UNSPEC_VSUMSWS 135) UNSPEC_VPERM_UNS
(UNSPEC_VPERM 144) UNSPEC_VRFIN
(UNSPEC_VPERM_UNS 145) UNSPEC_VCFUX
;; 148 deleted UNSPEC_VCFSX
(UNSPEC_VRFIN 149) UNSPEC_VCTUXS
;; 150 deleted UNSPEC_VCTSXS
(UNSPEC_VCFUX 151) UNSPEC_VLOGEFP
(UNSPEC_VCFSX 152) UNSPEC_VEXPTEFP
(UNSPEC_VCTUXS 153) UNSPEC_VLSDOI
(UNSPEC_VCTSXS 154) UNSPEC_VUPKHSB
(UNSPEC_VLOGEFP 155) UNSPEC_VUPKHPX
(UNSPEC_VEXPTEFP 156) UNSPEC_VUPKHSH
;; 157-162 deleted UNSPEC_VUPKLSB
(UNSPEC_VLSDOI 163) UNSPEC_VUPKLPX
(UNSPEC_VUPKHSB 167) UNSPEC_VUPKLSH
(UNSPEC_VUPKHPX 168) UNSPEC_DST
(UNSPEC_VUPKHSH 169) UNSPEC_DSTT
(UNSPEC_VUPKLSB 170) UNSPEC_DSTST
(UNSPEC_VUPKLPX 171) UNSPEC_DSTSTT
(UNSPEC_VUPKLSH 172) UNSPEC_LVSL
;; 173 deleted UNSPEC_LVSR
(UNSPEC_DST 190) UNSPEC_LVE
(UNSPEC_DSTT 191) UNSPEC_STVX
(UNSPEC_DSTST 192) UNSPEC_STVXL
(UNSPEC_DSTSTT 193) UNSPEC_STVE
(UNSPEC_LVSL 194) UNSPEC_SET_VSCR
(UNSPEC_LVSR 195) UNSPEC_GET_VRSAVE
(UNSPEC_LVE 196) UNSPEC_LVX
(UNSPEC_STVX 201) UNSPEC_REDUC_PLUS
(UNSPEC_STVXL 202) UNSPEC_VECSH
(UNSPEC_STVE 203) UNSPEC_EXTEVEN_V4SI
(UNSPEC_SET_VSCR 213) UNSPEC_EXTEVEN_V8HI
(UNSPEC_GET_VRSAVE 214) UNSPEC_EXTEVEN_V16QI
(UNSPEC_LVX 215) UNSPEC_EXTEVEN_V4SF
(UNSPEC_REDUC_PLUS 217) UNSPEC_EXTODD_V4SI
(UNSPEC_VECSH 219) UNSPEC_EXTODD_V8HI
(UNSPEC_EXTEVEN_V4SI 220) UNSPEC_EXTODD_V16QI
(UNSPEC_EXTEVEN_V8HI 221) UNSPEC_EXTODD_V4SF
(UNSPEC_EXTEVEN_V16QI 222) UNSPEC_INTERHI_V4SI
(UNSPEC_EXTEVEN_V4SF 223) UNSPEC_INTERHI_V8HI
(UNSPEC_EXTODD_V4SI 224) UNSPEC_INTERHI_V16QI
(UNSPEC_EXTODD_V8HI 225) UNSPEC_INTERLO_V4SI
(UNSPEC_EXTODD_V16QI 226) UNSPEC_INTERLO_V8HI
(UNSPEC_EXTODD_V4SF 227) UNSPEC_INTERLO_V16QI
(UNSPEC_INTERHI_V4SI 228) UNSPEC_LVLX
(UNSPEC_INTERHI_V8HI 229) UNSPEC_LVLXL
(UNSPEC_INTERHI_V16QI 230) UNSPEC_LVRX
;; delete 231 UNSPEC_LVRXL
(UNSPEC_INTERLO_V4SI 232) UNSPEC_STVLX
(UNSPEC_INTERLO_V8HI 233) UNSPEC_STVLXL
(UNSPEC_INTERLO_V16QI 234) UNSPEC_STVRX
;; delete 235 UNSPEC_STVRXL
(UNSPEC_LVLX 236) UNSPEC_VMULWHUB
(UNSPEC_LVLXL 237) UNSPEC_VMULWLUB
(UNSPEC_LVRX 238) UNSPEC_VMULWHSB
(UNSPEC_LVRXL 239) UNSPEC_VMULWLSB
(UNSPEC_STVLX 240) UNSPEC_VMULWHUH
(UNSPEC_STVLXL 241) UNSPEC_VMULWLUH
(UNSPEC_STVRX 242) UNSPEC_VMULWHSH
(UNSPEC_STVRXL 243) UNSPEC_VMULWLSH
(UNSPEC_VMULWHUB 308) UNSPEC_VUPKHUB
(UNSPEC_VMULWLUB 309) UNSPEC_VUPKHUH
(UNSPEC_VMULWHSB 310) UNSPEC_VUPKLUB
(UNSPEC_VMULWLSB 311) UNSPEC_VUPKLUH
(UNSPEC_VMULWHUH 312) UNSPEC_VPERMSI
(UNSPEC_VMULWLUH 313) UNSPEC_VPERMHI
(UNSPEC_VMULWHSH 314) UNSPEC_INTERHI
(UNSPEC_VMULWLSH 315) UNSPEC_INTERLO
(UNSPEC_VUPKHUB 316) UNSPEC_VUPKHS_V4SF
(UNSPEC_VUPKHUH 317) UNSPEC_VUPKLS_V4SF
(UNSPEC_VUPKLUB 318) UNSPEC_VUPKHU_V4SF
(UNSPEC_VUPKLUH 319) UNSPEC_VUPKLU_V4SF
(UNSPEC_VPERMSI 320)
(UNSPEC_VPERMHI 321)
(UNSPEC_INTERHI 322)
(UNSPEC_INTERLO 323)
(UNSPEC_VUPKHS_V4SF 324)
(UNSPEC_VUPKLS_V4SF 325)
(UNSPEC_VUPKHU_V4SF 326)
(UNSPEC_VUPKLU_V4SF 327)
]) ])
(define_constants (define_c_enum "unspecv"
[(UNSPECV_SET_VRSAVE 30) [UNSPECV_SET_VRSAVE
(UNSPECV_MTVSCR 186) UNSPECV_MTVSCR
(UNSPECV_MFVSCR 187) UNSPECV_MFVSCR
(UNSPECV_DSSALL 188) UNSPECV_DSSALL
(UNSPECV_DSS 189) UNSPECV_DSS
]) ])
;; Vec int modes ;; Vec int modes
......
;; Decimal Floating Point (DFP) patterns. ;; Decimal Floating Point (DFP) patterns.
;; Copyright (C) 2007, 2008, 2010 ;; Copyright (C) 2007, 2008, 2010, 2011
;; Free Software Foundation, Inc. ;; Free Software Foundation, Inc.
;; Contributed by Ben Elliston (bje@au.ibm.com) and Peter Bergner ;; Contributed by Ben Elliston (bje@au.ibm.com) and Peter Bergner
;; (bergner@vnet.ibm.com). ;; (bergner@vnet.ibm.com).
...@@ -24,9 +24,9 @@ ...@@ -24,9 +24,9 @@
;; UNSPEC usage ;; UNSPEC usage
;; ;;
(define_constants (define_c_enum "unspec"
[(UNSPEC_MOVSD_LOAD 400) [UNSPEC_MOVSD_LOAD
(UNSPEC_MOVSD_STORE 401) UNSPEC_MOVSD_STORE
]) ])
......
;; PowerPC paired single and double hummer description ;; PowerPC paired single and double hummer description
;; Copyright (C) 2007, 2009, 2010 ;; Copyright (C) 2007, 2009, 2010, 2011
;; Free Software Foundation, Inc. ;; Free Software Foundation, Inc.
;; Contributed by David Edelsohn <edelsohn@gnu.org> and Revital Eres ;; Contributed by David Edelsohn <edelsohn@gnu.org> and Revital Eres
;; <eres@il.ibm.com> ;; <eres@il.ibm.com>
...@@ -20,12 +20,12 @@ ...@@ -20,12 +20,12 @@
;; along with this program; see the file COPYING3. If not see ;; along with this program; see the file COPYING3. If not see
;; <http://www.gnu.org/licenses/>. ;; <http://www.gnu.org/licenses/>.
(define_constants (define_c_enum "unspec"
[(UNSPEC_INTERHI_V2SF 330) [UNSPEC_INTERHI_V2SF
(UNSPEC_INTERLO_V2SF 331) UNSPEC_INTERLO_V2SF
(UNSPEC_EXTEVEN_V2SF 332) UNSPEC_EXTEVEN_V2SF
(UNSPEC_EXTODD_V2SF 333) UNSPEC_EXTODD_V2SF
]) ])
(define_insn "paired_negv2sf2" (define_insn "paired_negv2sf2"
[(set (match_operand:V2SF 0 "gpc_reg_operand" "=f") [(set (match_operand:V2SF 0 "gpc_reg_operand" "=f")
......
;; Machine description for IBM RISC System 6000 (POWER) for GNU C compiler ;; Machine description for IBM RISC System 6000 (POWER) for GNU C compiler
;; Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, ;; Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 ;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; Free Software Foundation, Inc. ;; Free Software Foundation, Inc.
;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) ;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
...@@ -53,76 +53,77 @@ ...@@ -53,76 +53,77 @@
;; UNSPEC usage ;; UNSPEC usage
;; ;;
(define_constants (define_c_enum "unspec"
[(UNSPEC_FRSP 0) ; frsp for POWER machines [UNSPEC_FRSP ; frsp for POWER machines
(UNSPEC_PROBE_STACK 4) ; probe stack memory reference UNSPEC_PROBE_STACK ; probe stack memory reference
(UNSPEC_TIE 5) ; tie stack contents and stack pointer UNSPEC_TIE ; tie stack contents and stack pointer
(UNSPEC_TOCPTR 6) ; address of a word pointing to the TOC UNSPEC_TOCPTR ; address of a word pointing to the TOC
(UNSPEC_TOC 7) ; address of the TOC (more-or-less) UNSPEC_TOC ; address of the TOC (more-or-less)
(UNSPEC_MOVSI_GOT 8) UNSPEC_MOVSI_GOT
(UNSPEC_MV_CR_OV 9) ; move_from_CR_ov_bit UNSPEC_MV_CR_OV ; move_from_CR_ov_bit
(UNSPEC_FCTIWZ 10) UNSPEC_FCTIWZ
(UNSPEC_FRIM 11) UNSPEC_FRIM
(UNSPEC_FRIN 12) UNSPEC_FRIN
(UNSPEC_FRIP 13) UNSPEC_FRIP
(UNSPEC_FRIZ 14) UNSPEC_FRIZ
(UNSPEC_LD_MPIC 15) ; load_macho_picbase UNSPEC_LD_MPIC ; load_macho_picbase
(UNSPEC_MPIC_CORRECT 16) ; macho_correct_pic UNSPEC_MPIC_CORRECT ; macho_correct_pic
(UNSPEC_TLSGD 17) UNSPEC_TLSGD
(UNSPEC_TLSLD 18) UNSPEC_TLSLD
(UNSPEC_MOVESI_FROM_CR 19) UNSPEC_MOVESI_FROM_CR
(UNSPEC_MOVESI_TO_CR 20) UNSPEC_MOVESI_TO_CR
(UNSPEC_TLSDTPREL 21) UNSPEC_TLSDTPREL
(UNSPEC_TLSDTPRELHA 22) UNSPEC_TLSDTPRELHA
(UNSPEC_TLSDTPRELLO 23) UNSPEC_TLSDTPRELLO
(UNSPEC_TLSGOTDTPREL 24) UNSPEC_TLSGOTDTPREL
(UNSPEC_TLSTPREL 25) UNSPEC_TLSTPREL
(UNSPEC_TLSTPRELHA 26) UNSPEC_TLSTPRELHA
(UNSPEC_TLSTPRELLO 27) UNSPEC_TLSTPRELLO
(UNSPEC_TLSGOTTPREL 28) UNSPEC_TLSGOTTPREL
(UNSPEC_TLSTLS 29) UNSPEC_TLSTLS
(UNSPEC_FIX_TRUNC_TF 30) ; fadd, rounding towards zero UNSPEC_FIX_TRUNC_TF ; fadd, rounding towards zero
(UNSPEC_MV_CR_GT 31) ; move_from_CR_gt_bit UNSPEC_MV_CR_GT ; move_from_CR_gt_bit
(UNSPEC_STFIWX 32) UNSPEC_STFIWX
(UNSPEC_POPCNTB 33) UNSPEC_POPCNTB
(UNSPEC_FRES 34) UNSPEC_FRES
(UNSPEC_SP_SET 35) UNSPEC_SP_SET
(UNSPEC_SP_TEST 36) UNSPEC_SP_TEST
(UNSPEC_SYNC 37) UNSPEC_SYNC
(UNSPEC_LWSYNC 38) UNSPEC_SYNC_OP
(UNSPEC_ISYNC 39) UNSPEC_ATOMIC
(UNSPEC_SYNC_OP 40) UNSPEC_CMPXCHG
(UNSPEC_ATOMIC 41) UNSPEC_XCHG
(UNSPEC_CMPXCHG 42) UNSPEC_AND
(UNSPEC_XCHG 43) UNSPEC_DLMZB
(UNSPEC_AND 44) UNSPEC_DLMZB_CR
(UNSPEC_DLMZB 45) UNSPEC_DLMZB_STRLEN
(UNSPEC_DLMZB_CR 46) UNSPEC_RSQRT
(UNSPEC_DLMZB_STRLEN 47) UNSPEC_TOCREL
(UNSPEC_RSQRT 48) UNSPEC_MACHOPIC_OFFSET
(UNSPEC_TOCREL 49) UNSPEC_BPERM
(UNSPEC_MACHOPIC_OFFSET 50) UNSPEC_COPYSIGN
(UNSPEC_BPERM 51) UNSPEC_PARITY
(UNSPEC_COPYSIGN 52) UNSPEC_FCTIW
(UNSPEC_PARITY 53) UNSPEC_FCTID
(UNSPEC_FCTIW 54) UNSPEC_LFIWAX
(UNSPEC_FCTID 55) UNSPEC_LFIWZX
(UNSPEC_LFIWAX 56) UNSPEC_FCTIWUZ
(UNSPEC_LFIWZX 57)
(UNSPEC_FCTIWUZ 58)
]) ])
;; ;;
;; UNSPEC_VOLATILE usage ;; UNSPEC_VOLATILE usage
;; ;;
(define_constants (define_c_enum "unspecv"
[(UNSPECV_BLOCK 0) [UNSPECV_BLOCK
(UNSPECV_LL 1) ; load-locked UNSPECV_LL ; load-locked
(UNSPECV_SC 2) ; store-conditional UNSPECV_SC ; store-conditional
(UNSPECV_PROBE_STACK_RANGE 3) ; probe range of stack addresses UNSPECV_PROBE_STACK_RANGE ; probe range of stack addresses
(UNSPECV_EH_RR 9) ; eh_reg_restore UNSPECV_EH_RR ; eh_reg_restore
UNSPECV_ISYNC ; isync instruction
UNSPECV_LWSYNC ; lwsync
]) ])
;; Define an insn type attribute. This is used in function unit delay ;; Define an insn type attribute. This is used in function unit delay
;; computations. ;; computations.
......
;; Machine description for PowerPC synchronization instructions. ;; Machine description for PowerPC synchronization instructions.
;; Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc. ;; Copyright (C) 2005, 2007, 2008, 2009, 2011
;; Free Software Foundation, Inc.
;; Contributed by Geoffrey Keating. ;; Contributed by Geoffrey Keating.
;; This file is part of GCC. ;; This file is part of GCC.
...@@ -591,7 +592,7 @@ ...@@ -591,7 +592,7 @@
(define_insn "isync" (define_insn "isync"
[(set (mem:BLK (match_scratch 0 "X")) [(set (mem:BLK (match_scratch 0 "X"))
(unspec_volatile:BLK [(mem:BLK (match_scratch 1 "X"))] UNSPEC_ISYNC))] (unspec_volatile:BLK [(mem:BLK (match_scratch 1 "X"))] UNSPECV_ISYNC))]
"" ""
"{ics|isync}" "{ics|isync}"
[(set_attr "type" "isync")]) [(set_attr "type" "isync")])
...@@ -610,7 +611,7 @@ ...@@ -610,7 +611,7 @@
; Some AIX assemblers don't accept lwsync, so we use a .long. ; Some AIX assemblers don't accept lwsync, so we use a .long.
(define_insn "lwsync" (define_insn "lwsync"
[(set (mem:BLK (match_scratch 0 "X")) [(set (mem:BLK (match_scratch 0 "X"))
(unspec_volatile:BLK [(mem:BLK (match_scratch 1 "X"))] UNSPEC_LWSYNC))] (unspec_volatile:BLK [(mem:BLK (match_scratch 1 "X"))] UNSPECV_LWSYNC))]
"" ""
{ {
if (TARGET_NO_LWSYNC) if (TARGET_NO_LWSYNC)
......
...@@ -74,8 +74,7 @@ ...@@ -74,8 +74,7 @@
(V2DF "V2DI")]) (V2DF "V2DI")])
;; constants for unspec ;; constants for unspec
(define_constants (define_c_enum "unspec" [UNSPEC_PREDICATE])
[(UNSPEC_PREDICATE 400)])
;; Vector move instructions. ;; Vector move instructions.
......
...@@ -183,25 +183,25 @@ ...@@ -183,25 +183,25 @@
(V16QI "QI")]) (V16QI "QI")])
;; Constants for creating unspecs ;; Constants for creating unspecs
(define_constants (define_c_enum "unspec"
[(UNSPEC_VSX_CONCAT 500) [UNSPEC_VSX_CONCAT
(UNSPEC_VSX_CVDPSXWS 501) UNSPEC_VSX_CVDPSXWS
(UNSPEC_VSX_CVDPUXWS 502) UNSPEC_VSX_CVDPUXWS
(UNSPEC_VSX_CVSPDP 503) UNSPEC_VSX_CVSPDP
(UNSPEC_VSX_CVSXWDP 504) UNSPEC_VSX_CVSXWDP
(UNSPEC_VSX_CVUXWDP 505) UNSPEC_VSX_CVUXWDP
(UNSPEC_VSX_CVSXDSP 506) UNSPEC_VSX_CVSXDSP
(UNSPEC_VSX_CVUXDSP 507) UNSPEC_VSX_CVUXDSP
(UNSPEC_VSX_CVSPSXDS 508) UNSPEC_VSX_CVSPSXDS
(UNSPEC_VSX_CVSPUXDS 509) UNSPEC_VSX_CVSPUXDS
;; 510-514 deleted UNSPEC_VSX_TDIV
(UNSPEC_VSX_TDIV 515) UNSPEC_VSX_TSQRT
(UNSPEC_VSX_TSQRT 516) UNSPEC_VSX_XXPERMDI
(UNSPEC_VSX_XXPERMDI 517) UNSPEC_VSX_SET
(UNSPEC_VSX_SET 518) UNSPEC_VSX_ROUND_I
(UNSPEC_VSX_ROUND_I 519) UNSPEC_VSX_ROUND_IC
(UNSPEC_VSX_ROUND_IC 520) UNSPEC_VSX_SLDWI
(UNSPEC_VSX_SLDWI 521)]) ])
;; VSX moves ;; VSX moves
(define_insn "*vsx_mov<mode>" (define_insn "*vsx_mov<mode>"
......
2011-03-21 Michael Meissner <meissner@linux.vnet.ibm.com>
PR preprocessor/48192
* gcc.target/powerpc/pr48192.c: New file.
PR target/48053
* gcc.target/powerpc/pr48053-3.c: New file, add test case for
split problem of 0 being loaded in a VSX register.
2011-03-21 Richard Guenther <rguenther@suse.de> 2011-03-21 Richard Guenther <rguenther@suse.de>
PR c/47939 PR c/47939
......
/* { dg-do compile } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-options "-O3 -mcpu=power7" } */
/* Cut down example from s_scalbnl that aborted on 32-bit when the fix for
48053 went in to allow creating DImode 0's in VSX registers. */
typedef union
{
long double value;
struct
{
unsigned long long msw;
unsigned long long lsw;
} parts64;
struct
{
unsigned int w0, w1, w2, w3;
} parts32;
} ieee854_long_double_shape_type;
static const long double twolm54 = 5.55111512312578270212e-17;
long double foo (long double x, int n)
{
long long k, hx, lx;
ieee854_long_double_shape_type qw_u;
qw_u.value = x;
hx = qw_u.parts64.msw;
lx = qw_u.parts64.lsw;
k = ((hx >> 52) & 0x7ff) + n + 54;
qw_u.parts64.msw = ((hx & 0x800fffffffffffffULL) | (k << 52));
qw_u.parts64.lsw = lx;
x = qw_u.value;
return x*twolm54;
}
/* { dg-do compile } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-options "-O3 -mcpu=power7 -std=gnu89" } */
/* Make sure that the conditional macros vector, bool, and pixel are not
considered as being defined. */
#ifdef bool
#error "bool is considered defined"
#endif
#ifdef vector
#error "vector is considered defined"
#endif
#ifdef pixel
#error "pixel is condsidered defined"
#endif
#if defined(bool)
#error "bool is considered defined"
#endif
#if defined(vector)
#error "vector is considered defined"
#endif
#if defined(pixel)
#error "pixel is condsidered defined"
#endif
#ifndef bool
#else
#error "bool is considered defined"
#endif
#ifndef vector
#else
#error "vector is considered defined"
#endif
#ifndef pixel
#else
#error "pixel is condsidered defined"
#endif
#define bool long double
bool pixel = 0;
2011-03-21 Michael Meissner <meissner@linux.vnet.ibm.com>
PR preprocessor/48192
* directives.c (do_ifdef): Do not consider conditional macros as
being defined.
(do_ifndef): Ditto.
* expr.c (parse_defined): Ditto.
2011-03-18 Richard Henderson <rth@redhat.com> 2011-03-18 Richard Henderson <rth@redhat.com>
PR bootstrap/45381 PR bootstrap/45381
......
...@@ -1819,7 +1819,12 @@ do_ifdef (cpp_reader *pfile) ...@@ -1819,7 +1819,12 @@ do_ifdef (cpp_reader *pfile)
if (node) if (node)
{ {
skip = node->type != NT_MACRO; /* Do not treat conditional macros as being defined. This is due to
the powerpc and spu ports using conditional macros for 'vector',
'bool', and 'pixel' to act as conditional keywords. This messes
up tests like #ifndef bool. */
skip = (node->type != NT_MACRO
|| ((node->flags & NODE_CONDITIONAL) != 0));
_cpp_mark_macro_used (node); _cpp_mark_macro_used (node);
if (!(node->flags & NODE_USED)) if (!(node->flags & NODE_USED))
{ {
...@@ -1860,7 +1865,12 @@ do_ifndef (cpp_reader *pfile) ...@@ -1860,7 +1865,12 @@ do_ifndef (cpp_reader *pfile)
if (node) if (node)
{ {
skip = node->type == NT_MACRO; /* Do not treat conditional macros as being defined. This is due to
the powerpc and spu ports using conditional macros for 'vector',
'bool', and 'pixel' to act as conditional keywords. This messes
up tests like #ifndef bool. */
skip = (node->type == NT_MACRO
&& ((node->flags & NODE_CONDITIONAL) == 0));
_cpp_mark_macro_used (node); _cpp_mark_macro_used (node);
if (!(node->flags & NODE_USED)) if (!(node->flags & NODE_USED))
{ {
......
...@@ -720,10 +720,15 @@ parse_defined (cpp_reader *pfile) ...@@ -720,10 +720,15 @@ parse_defined (cpp_reader *pfile)
pfile->state.prevent_expansion--; pfile->state.prevent_expansion--;
/* Do not treat conditional macros as being defined. This is due to the
powerpc and spu ports using conditional macros for 'vector', 'bool', and
'pixel' to act as conditional keywords. This messes up tests like #ifndef
bool. */
result.unsignedp = false; result.unsignedp = false;
result.high = 0; result.high = 0;
result.overflow = false; result.overflow = false;
result.low = node && node->type == NT_MACRO; result.low = (node && node->type == NT_MACRO
&& (node->flags & NODE_CONDITIONAL) == 0);
return result; return result;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment