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

📄 rs6000.md

📁 linux下编程用 编译软件
💻 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, 2006;; 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, 51 Franklin Street, Fifth Floor, Boston,;; MA 02110-1301, 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_FRIM			11)   (UNSPEC_FRIN			12)   (UNSPEC_FRIP			13)   (UNSPEC_FRIZ			14)   (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   (UNSPEC_STFIWX		32)   (UNSPEC_POPCNTB		33)   (UNSPEC_FRES			34)   (UNSPEC_SP_SET		35)   (UNSPEC_SP_TEST		36)   (UNSPEC_SYNC			37)   (UNSPEC_LWSYNC		38)   (UNSPEC_ISYNC		39)   (UNSPEC_SYNC_OP		40)   (UNSPEC_ATOMIC		41)   (UNSPEC_CMPXCHG		42)   (UNSPEC_XCHG			43)   (UNSPEC_AND			44)  ]);;;; UNSPEC_VOLATILE usage;;(define_constants  [(UNSPECV_BLOCK		0)   (UNSPECV_LL			1)	; load-locked   (UNSPECV_SC			2)	; store-conditional   (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,isync,sync,load_l,store_c"  (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 "predicates.md")(include "darwin.md");; Mode macros; This mode macro allows :GPR to be used to indicate the allowable size; of whole values in GPRs.(define_mode_macro GPR [SI (DI "TARGET_POWERPC64")]); Any supported integer mode.(define_mode_macro INT [QI HI SI DI TI]); Any supported integer mode that fits in one register.(define_mode_macro INT1 [QI HI SI (DI "TARGET_POWERPC64")]); extend modes for DImode(define_mode_macro QHSI [QI HI SI]); SImode or DImode, even if DImode doesn't fit in GPRs.(define_mode_macro SDI [SI DI]); The size of a pointer.  Also, the size of the value that a record-condition; (one with a '.') will compare.(define_mode_macro P [(SI "TARGET_32BIT") (DI "TARGET_64BIT")]); Any hardware-supported floating-point mode(define_mode_macro FP [(SF "TARGET_HARD_FLOAT")  (DF "TARGET_HARD_FLOAT && (TARGET_FPRS || TARGET_E500_DOUBLE)")  (TF "!TARGET_IEEEQUAD   && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_LONG_DOUBLE_128")]); Various instructions that come in SI and DI forms.; A generic w/d attribute, for things like cmpw/cmpd.(define_mode_attr wd [(QI "b") (HI "h") (SI "w") (DI "d")]); DImode bits(define_mode_attr dbits [(QI "56") (HI "48") (SI "32")]);; 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_extend<mode>di2"  [(set (match_operand:DI 0 "gpc_reg_operand" "")	(zero_extend:DI (match_operand:QHSI 1 "gpc_reg_operand" "")))]  "TARGET_POWERPC64"  "")(define_insn "*zero_extend<mode>di2_internal1"  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")	(zero_extend:DI (match_operand:QHSI 1 "reg_or_mem_operand" "m,r")))]  "TARGET_POWERPC64"  "@   l<wd>z%U1%X1 %0,%1   rldicl %0,%1,0,<dbits>"  [(set_attr "type" "load,*")])(define_insn "*zero_extend<mode>di2_internal2"  [(set (match_operand:CC 0 "cc_reg_operand" "=x,?y")	(compare:CC (zero_extend:DI (match_operand:QHSI 1 "gpc_reg_operand" "r,r"))		    (const_int 0)))   (clobber (match_scratch:DI 2 "=r,r"))]  "TARGET_64BIT"  "@   rldicl. %2,%1,0,<dbits>   #"  [(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:QHSI 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 "*zero_extend<mode>di2_internal3"  [(set (match_operand:CC 2 "cc_reg_operand" "=x,?y")	(compare:CC (zero_extend:DI (match_operand:QHSI 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,<dbits>   #"  [(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:QHSI 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 "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 "extendsidi2"  [(set (match_operand:DI 0 "gpc_reg_operand" "")	(sign_extend:DI (match_operand:SI 1 "gpc_reg_operand" "")))]  "TARGET_POWERPC64"  "")(define_insn ""  [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")	(sign_extend:DI (match_operand:SI 1 "lwa_operand" "m,r")))]  "TARGET_POWERPC64"  "@   lwa%U1%X1 %0,%1   extsw %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:SI 1 "gpc_reg_operand" "r,r"))		    (const_int 0)))   (clobber (match_scratch:DI 2 "=r,r"))]  "TARGET_64BIT"  "@   extsw. %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:SI 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:SI 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"  "@   extsw. %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:SI 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_extendqisi2"  [(set (match_operand:SI 0 "gpc_reg_operand" "")	(zero_extend:SI (match_operand:QI 1 "gpc_reg_operand" "")))]  ""  "")(define_insn ""  [(set (match_operand:SI 0 "gpc_reg_operand" "=r,r")

⌨️ 快捷键说明

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