⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rs6000.md

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 MD
📖 第 1 页 / 共 5 页
字号:
;; Machine description for IBM RISC System 6000 (POWER) for GNU C compiler;; Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,;; 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.;; Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu);; This file is part of GCC.;; GCC is free software; you can redistribute it and/or modify it;; under the terms of the GNU General Public License as published;; by the Free Software Foundation; either version 2, or (at your;; option) any later version.;; GCC is distributed in the hope that it will be useful, but WITHOUT;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY;; or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public;; License for more details.;; You should have received a copy of the GNU General Public License;; along with GCC; see the file COPYING.  If not, write to the;; Free Software Foundation, 59 Temple Place - Suite 330, Boston,;; MA 02111-1307, USA.;;- See file "rtl.def" for documentation on define_insn, match_*, et. al.;;;; UNSPEC usage;;(define_constants  [(UNSPEC_FRSP			0)	; frsp for POWER machines   (UNSPEC_TIE			5)	; tie stack contents and stack pointer   (UNSPEC_TOCPTR		6)	; address of a word pointing to the TOC   (UNSPEC_TOC			7)	; address of the TOC (more-or-less)   (UNSPEC_MOVSI_GOT		8)   (UNSPEC_MV_CR_OV		9)	; move_from_CR_ov_bit   (UNSPEC_FCTIWZ		10)   (UNSPEC_LD_MPIC		15)	; load_macho_picbase   (UNSPEC_MPIC_CORRECT		16)	; macho_correct_pic   (UNSPEC_TLSGD		17)   (UNSPEC_TLSLD		18)   (UNSPEC_MOVESI_FROM_CR	19)   (UNSPEC_MOVESI_TO_CR		20)   (UNSPEC_TLSDTPREL		21)   (UNSPEC_TLSDTPRELHA		22)   (UNSPEC_TLSDTPRELLO		23)   (UNSPEC_TLSGOTDTPREL		24)   (UNSPEC_TLSTPREL		25)   (UNSPEC_TLSTPRELHA		26)   (UNSPEC_TLSTPRELLO		27)   (UNSPEC_TLSGOTTPREL		28)   (UNSPEC_TLSTLS		29)   (UNSPEC_FIX_TRUNC_TF		30)	; fadd, rounding towards zero   (UNSPEC_MV_CR_GT		31)	; move_from_CR_eq_bit   ;; APPLE LOCAL special ObjC method use of R12   (UNSPEC_LD_MPIC_L		32)     ; local_macho_picbase_label  ]);;;; UNSPEC_VOLATILE usage;;(define_constants  [(UNSPECV_BLOCK		0)   (UNSPECV_EH_RR		9)	; eh_reg_restore  ]);; Define an insn type attribute.  This is used in function unit delay;; computations.(define_attr "type" "integer,two,three,load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u,store,store_ux,store_u,fpload,fpload_ux,fpload_u,fpstore,fpstore_ux,fpstore_u,vecload,vecstore,imul,imul2,imul3,lmul,idiv,ldiv,insert_word,branch,cmp,fast_compare,compare,delayed_compare,imul_compare,lmul_compare,fpcompare,cr_logical,delayed_cr,mfcr,mfcrf,mtcr,mfjmpr,mtjmpr,fp,fpsimple,dmul,sdiv,ddiv,ssqrt,dsqrt,jmpreg,brinc,vecsimple,veccomplex,vecdiv,veccmp,veccmpsimple,vecperm,vecfloat,vecfdiv"  (const_string "integer"));; Length (in bytes).; '(pc)' in the following doesn't include the instruction itself; it is; calculated as if the instruction had zero size.(define_attr "length" ""  (if_then_else (eq_attr "type" "branch")		(if_then_else (and (ge (minus (match_dup 0) (pc))				       (const_int -32768))				   (lt (minus (match_dup 0) (pc))				       (const_int 32764)))			      (const_int 4)			      (const_int 8))		(const_int 4)));; Processor type -- this attribute must exactly match the processor_type;; enumeration in rs6000.h.(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,power4,power5"  (const (symbol_ref "rs6000_cpu_attr")))(automata_option "ndfa")(include "rios1.md")(include "rios2.md")(include "rs64.md")(include "mpc.md")(include "40x.md")(include "440.md")(include "603.md")(include "6xx.md")(include "7xx.md")(include "7450.md")(include "8540.md")(include "power4.md")(include "power5.md")(include "darwin.md");; This mode macro allows :P to be used for patterns that operate on;; pointer-sized quantities.  Exactly one of the two alternatives will match.(define_mode_macro P [(SI "Pmode == SImode") (DI "Pmode == DImode")]);; Start with fixed-point load and store insns.  Here we put only the more;; complex forms.  Basic data transfer is done later.(define_expand "zero_extendqidi2"  [(set (match_operand:DI 0 "gpc_reg_operand" "")	(zero_extend:DI (match_operand:QI 1 "gpc_reg_operand" "")))]  "TARGET_POWERPC64"  "")(define_insn ""  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")	(zero_extend:DI (match_operand:QI 1 "reg_or_mem_operand" "m,r")))]  "TARGET_POWERPC64"  "@   lbz%U1%X1 %0,%1   rldicl %0,%1,0,56"  [(set_attr "type" "load,*")])(define_insn ""  [(set (match_operand:CC 0 "cc_reg_operand" "=x,?y")	(compare:CC (zero_extend:DI (match_operand:QI 1 "gpc_reg_operand" "r,r"))		    (const_int 0)))   (clobber (match_scratch:DI 2 "=r,r"))]  "TARGET_64BIT"  "@   rldicl. %2,%1,0,56   #"  [(set_attr "type" "compare")   (set_attr "length" "4,8")])(define_split  [(set (match_operand:CC 0 "cc_reg_not_cr0_operand" "")	(compare:CC (zero_extend:DI (match_operand:QI 1 "gpc_reg_operand" ""))		    (const_int 0)))   (clobber (match_scratch:DI 2 ""))]  "TARGET_POWERPC64 && reload_completed"  [(set (match_dup 2)	(zero_extend:DI (match_dup 1)))   (set (match_dup 0)	(compare:CC (match_dup 2)		    (const_int 0)))]  "")(define_insn ""  [(set (match_operand:CC 2 "cc_reg_operand" "=x,?y")	(compare:CC (zero_extend:DI (match_operand:QI 1 "gpc_reg_operand" "r,r"))		    (const_int 0)))   (set (match_operand:DI 0 "gpc_reg_operand" "=r,r")	(zero_extend:DI (match_dup 1)))]  "TARGET_64BIT"  "@   rldicl. %0,%1,0,56   #"  [(set_attr "type" "compare")   (set_attr "length" "4,8")])(define_split  [(set (match_operand:CC 2 "cc_reg_not_cr0_operand" "")	(compare:CC (zero_extend:DI (match_operand:QI 1 "gpc_reg_operand" ""))		    (const_int 0)))   (set (match_operand:DI 0 "gpc_reg_operand" "")	(zero_extend:DI (match_dup 1)))]  "TARGET_POWERPC64 && reload_completed"  [(set (match_dup 0)	(zero_extend:DI (match_dup 1)))   (set (match_dup 2)	(compare:CC (match_dup 0)		    (const_int 0)))]  "")(define_insn "extendqidi2"  [(set (match_operand:DI 0 "gpc_reg_operand" "=r")	(sign_extend:DI (match_operand:QI 1 "gpc_reg_operand" "r")))]  "TARGET_POWERPC64"  "extsb %0,%1")(define_insn ""  [(set (match_operand:CC 0 "cc_reg_operand" "=x,?y")	(compare:CC (sign_extend:DI (match_operand:QI 1 "gpc_reg_operand" "r,r"))		    (const_int 0)))   (clobber (match_scratch:DI 2 "=r,r"))]  "TARGET_64BIT"  "@   extsb. %2,%1   #"  [(set_attr "type" "compare")   (set_attr "length" "4,8")])(define_split  [(set (match_operand:CC 0 "cc_reg_not_cr0_operand" "")	(compare:CC (sign_extend:DI (match_operand:QI 1 "gpc_reg_operand" ""))		    (const_int 0)))   (clobber (match_scratch:DI 2 ""))]  "TARGET_POWERPC64 && reload_completed"  [(set (match_dup 2)	(sign_extend:DI (match_dup 1)))   (set (match_dup 0)	(compare:CC (match_dup 2)		    (const_int 0)))]  "")(define_insn ""  [(set (match_operand:CC 2 "cc_reg_operand" "=x,?y")	(compare:CC (sign_extend:DI (match_operand:QI 1 "gpc_reg_operand" "r,r"))		    (const_int 0)))   (set (match_operand:DI 0 "gpc_reg_operand" "=r,r")	(sign_extend:DI (match_dup 1)))]  "TARGET_64BIT"  "@   extsb. %0,%1   #"  [(set_attr "type" "compare")   (set_attr "length" "4,8")])(define_split  [(set (match_operand:CC 2 "cc_reg_not_cr0_operand" "")	(compare:CC (sign_extend:DI (match_operand:QI 1 "gpc_reg_operand" ""))		    (const_int 0)))   (set (match_operand:DI 0 "gpc_reg_operand" "")	(sign_extend:DI (match_dup 1)))]  "TARGET_POWERPC64 && reload_completed"  [(set (match_dup 0)	(sign_extend:DI (match_dup 1)))   (set (match_dup 2)	(compare:CC (match_dup 0)		    (const_int 0)))]  "")(define_expand "zero_extendhidi2"  [(set (match_operand:DI 0 "gpc_reg_operand" "")	(zero_extend:DI (match_operand:HI 1 "gpc_reg_operand" "")))]  "TARGET_POWERPC64"  "")(define_insn ""  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")	(zero_extend:DI (match_operand:HI 1 "reg_or_mem_operand" "m,r")))]  "TARGET_POWERPC64"  "@   lhz%U1%X1 %0,%1   rldicl %0,%1,0,48"  [(set_attr "type" "load,*")])(define_insn ""  [(set (match_operand:CC 0 "cc_reg_operand" "=x,?y")	(compare:CC (zero_extend:DI (match_operand:HI 1 "gpc_reg_operand" "r,r"))		    (const_int 0)))   (clobber (match_scratch:DI 2 "=r,r"))]  "TARGET_64BIT"  "@   rldicl. %2,%1,0,48   #"  [(set_attr "type" "compare")   (set_attr "length" "4,8")])(define_split  [(set (match_operand:CC 0 "cc_reg_not_cr0_operand" "")	(compare:CC (zero_extend:DI (match_operand:HI 1 "gpc_reg_operand" ""))		    (const_int 0)))   (clobber (match_scratch:DI 2 ""))]  "TARGET_POWERPC64 && reload_completed"  [(set (match_dup 2)	(zero_extend:DI (match_dup 1)))   (set (match_dup 0)	(compare:CC (match_dup 2)		    (const_int 0)))]  "")(define_insn ""  [(set (match_operand:CC 2 "cc_reg_operand" "=x,?y")	(compare:CC (zero_extend:DI (match_operand:HI 1 "gpc_reg_operand" "r,r"))		    (const_int 0)))   (set (match_operand:DI 0 "gpc_reg_operand" "=r,r")	(zero_extend:DI (match_dup 1)))]  "TARGET_64BIT"  "@   rldicl. %0,%1,0,48   #"  [(set_attr "type" "compare")   (set_attr "length" "4,8")])(define_split  [(set (match_operand:CC 2 "cc_reg_not_cr0_operand" "")	(compare:CC (zero_extend:DI (match_operand:HI 1 "gpc_reg_operand" ""))		    (const_int 0)))   (set (match_operand:DI 0 "gpc_reg_operand" "")	(zero_extend:DI (match_dup 1)))]  "TARGET_POWERPC64 && reload_completed"  [(set (match_dup 0)	(zero_extend:DI (match_dup 1)))   (set (match_dup 2)	(compare:CC (match_dup 0)		    (const_int 0)))]  "")(define_expand "extendhidi2"  [(set (match_operand:DI 0 "gpc_reg_operand" "")	(sign_extend:DI (match_operand:HI 1 "gpc_reg_operand" "")))]  "TARGET_POWERPC64"  "")(define_insn ""  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")	(sign_extend:DI (match_operand:HI 1 "reg_or_mem_operand" "m,r")))]  "TARGET_POWERPC64"  "@   lha%U1%X1 %0,%1   extsh %0,%1"  [(set_attr "type" "load_ext,*")])(define_insn ""  [(set (match_operand:CC 0 "cc_reg_operand" "=x,?y")	(compare:CC (sign_extend:DI (match_operand:HI 1 "gpc_reg_operand" "r,r"))		    (const_int 0)))   (clobber (match_scratch:DI 2 "=r,r"))]  "TARGET_64BIT"  "@   extsh. %2,%1   #"  [(set_attr "type" "compare")   (set_attr "length" "4,8")])(define_split  [(set (match_operand:CC 0 "cc_reg_not_cr0_operand" "")	(compare:CC (sign_extend:DI (match_operand:HI 1 "gpc_reg_operand" ""))		    (const_int 0)))   (clobber (match_scratch:DI 2 ""))]  "TARGET_POWERPC64 && reload_completed"  [(set (match_dup 2)	(sign_extend:DI (match_dup 1)))   (set (match_dup 0)	(compare:CC (match_dup 2)		    (const_int 0)))]  "")(define_insn ""  [(set (match_operand:CC 2 "cc_reg_operand" "=x,?y")	(compare:CC (sign_extend:DI (match_operand:HI 1 "gpc_reg_operand" "r,r"))		    (const_int 0)))   (set (match_operand:DI 0 "gpc_reg_operand" "=r,r")	(sign_extend:DI (match_dup 1)))]  "TARGET_64BIT"  "@   extsh. %0,%1   #"  [(set_attr "type" "compare")   (set_attr "length" "4,8")])(define_split  [(set (match_operand:CC 2 "cc_reg_not_cr0_operand" "")	(compare:CC (sign_extend:DI (match_operand:HI 1 "gpc_reg_operand" ""))		    (const_int 0)))   (set (match_operand:DI 0 "gpc_reg_operand" "")	(sign_extend:DI (match_dup 1)))]  "TARGET_POWERPC64 && reload_completed"  [(set (match_dup 0)	(sign_extend:DI (match_dup 1)))   (set (match_dup 2)	(compare:CC (match_dup 0)		    (const_int 0)))]  "")(define_expand "zero_extendsidi2"  [(set (match_operand:DI 0 "gpc_reg_operand" "")	(zero_extend:DI (match_operand:SI 1 "gpc_reg_operand" "")))]  "TARGET_POWERPC64"  "")(define_insn ""  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")	(zero_extend:DI (match_operand:SI 1 "reg_or_mem_operand" "m,r")))]  "TARGET_POWERPC64"  "@   lwz%U1%X1 %0,%1   rldicl %0,%1,0,32"  [(set_attr "type" "load,*")])(define_insn ""  [(set (match_operand:CC 0 "cc_reg_operand" "=x,?y")	(compare:CC (zero_extend:DI (match_operand:SI 1 "gpc_reg_operand" "r,r"))		    (const_int 0)))   (clobber (match_scratch:DI 2 "=r,r"))]  "TARGET_64BIT"  "@   rldicl. %2,%1,0,32   #"  [(set_attr "type" "compare")   (set_attr "length" "4,8")])(define_split  [(set (match_operand:CC 0 "cc_reg_not_cr0_operand" "")	(compare:CC (zero_extend:DI (match_operand:SI 1 "gpc_reg_operand" ""))		    (const_int 0)))   (clobber (match_scratch:DI 2 ""))]  "TARGET_POWERPC64 && reload_completed"  [(set (match_dup 2)	(zero_extend:DI (match_dup 1)))   (set (match_dup 0)	(compare:CC (match_dup 2)		    (const_int 0)))]  "")(define_insn ""  [(set (match_operand:CC 2 "cc_reg_operand" "=x,?y")	(compare:CC (zero_extend:DI (match_operand:SI 1 "gpc_reg_operand" "r,r"))		    (const_int 0)))   (set (match_operand:DI 0 "gpc_reg_operand" "=r,r")	(zero_extend:DI (match_dup 1)))]  "TARGET_64BIT"  "@   rldicl. %0,%1,0,32   #"  [(set_attr "type" "compare")   (set_attr "length" "4,8")])(define_split  [(set (match_operand:CC 2 "cc_reg_not_cr0_operand" "")	(compare:CC (zero_extend:DI (match_operand:SI 1 "gpc_reg_operand" ""))		    (const_int 0)))   (set (match_operand:DI 0 "gpc_reg_operand" "")	(zero_extend:DI (match_dup 1)))]  "TARGET_POWERPC64 && reload_completed"  [(set (match_dup 0)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -