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

📄 s390.md

📁 Mac OS X 10.4.9 for x86 Source Code gcc 实现源代码
💻 MD
📖 第 1 页 / 共 5 页
字号:
; movqi instruction pattern(s).;(define_expand "movqi"  [(set (match_operand:QI 0 "nonimmediate_operand" "")        (match_operand:QI 1 "general_operand" ""))]  ""{  /* On z/Architecture, zero-extending from memory to register     is just as fast as a QImode load.  */  if (TARGET_ZARCH && optimize && !no_new_pseudos      && register_operand (operands[0], VOIDmode)      && GET_CODE (operands[1]) == MEM)    {      rtx tmp = gen_reg_rtx (word_mode);      rtx ext = gen_rtx_ZERO_EXTEND (word_mode, operands[1]);      emit_insn (gen_rtx_SET (VOIDmode, tmp, ext));      operands[1] = gen_lowpart (QImode, tmp);    }})(define_insn "*movqi"  [(set (match_operand:QI 0 "nonimmediate_operand" "=d,d,d,d,R,T,Q,S,?Q")        (match_operand:QI 1 "general_operand" "d,n,R,T,d,d,n,n,?Q"))]  ""  "@   lr\t%0,%1   lhi\t%0,%b1   ic\t%0,%1   icy\t%0,%1   stc\t%1,%0   stcy\t%1,%0   mvi\t%S0,%b1   mviy\t%S0,%b1   #"  [(set_attr "op_type" "RR,RI,RX,RXY,RX,RXY,SI,SIY,SS")   (set_attr "type" "lr,*,*,*,store,store,store,store,*")])(define_peephole2  [(set (match_operand:QI 0 "nonimmediate_operand" "")        (mem:QI (match_operand 1 "address_operand" "")))]  "GET_CODE (operands[1]) == SYMBOL_REF   && CONSTANT_POOL_ADDRESS_P (operands[1])   && get_pool_mode (operands[1]) == QImode   && GET_CODE (get_pool_constant (operands[1])) == CONST_INT"  [(set (match_dup 0) (match_dup 2))]  "operands[2] = get_pool_constant (operands[1]);");; movstrictqi instruction pattern(s).;(define_insn "*movstrictqi"  [(set (strict_low_part (match_operand:QI 0 "register_operand" "+d,d"))                         (match_operand:QI 1 "memory_operand" "R,T"))]  ""  "@   ic\t%0,%1   icy\t%0,%1"  [(set_attr "op_type"  "RX,RXY")]);; movstricthi instruction pattern(s).;(define_insn "*movstricthi"  [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d,d"))                         (match_operand:HI 1 "memory_operand" "Q,S"))   (clobber (reg:CC 33))]  ""  "@   icm\t%0,3,%S1   icmy\t%0,3,%S1"  [(set_attr "op_type" "RS,RSY")]);; movstrictsi instruction pattern(s).;(define_insn "movstrictsi"  [(set (strict_low_part (match_operand:SI 0 "register_operand" "+d,d,d,d"))                         (match_operand:SI 1 "general_operand" "d,R,T,t"))]  "TARGET_64BIT"  "@   lr\t%0,%1   l\t%0,%1   ly\t%0,%1   ear\t%0,%1"  [(set_attr "op_type" "RR,RX,RXY,RRE")   (set_attr "type" "lr,load,load,*")]);; movdf instruction pattern(s).;(define_expand "movdf"  [(set (match_operand:DF 0 "nonimmediate_operand" "")        (match_operand:DF 1 "general_operand"  ""))]  ""  "")(define_insn "*movdf_64"  [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,f,R,T,d,d,m,?Q")        (match_operand:DF 1 "general_operand" "f,R,T,f,f,d,m,d,?Q"))]  "TARGET_64BIT"  "@   ldr\t%0,%1   ld\t%0,%1   ldy\t%0,%1   std\t%1,%0   stdy\t%1,%0   lgr\t%0,%1   lg\t%0,%1   stg\t%1,%0   #"  [(set_attr "op_type" "RR,RX,RXY,RX,RXY,RRE,RXY,RXY,SS")   (set_attr "type" "floadd,floadd,floadd,fstored,fstored,lr,load,store,*")])(define_insn "*movdf_31"  [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,f,R,T,d,Q,d,o,Q")        (match_operand:DF 1 "general_operand" "f,R,T,f,f,Q,d,dKm,d,Q"))]  "!TARGET_64BIT"  "@   ldr\t%0,%1   ld\t%0,%1   ldy\t%0,%1   std\t%1,%0   stdy\t%1,%0   lm\t%0,%N0,%S1   stm\t%1,%N1,%S0   #   #   #"  [(set_attr "op_type" "RR,RX,RXY,RX,RXY,RS,RS,*,*,SS")   (set_attr "type" "floadd,floadd,floadd,fstored,fstored,lm,stm,*,*,*")])(define_split  [(set (match_operand:DF 0 "nonimmediate_operand" "")        (match_operand:DF 1 "general_operand" ""))]  "!TARGET_64BIT && reload_completed   && s390_split_ok_p (operands[0], operands[1], DFmode, 0)"  [(set (match_dup 2) (match_dup 4))   (set (match_dup 3) (match_dup 5))]{  operands[2] = operand_subword (operands[0], 0, 0, DFmode);  operands[3] = operand_subword (operands[0], 1, 0, DFmode);  operands[4] = operand_subword (operands[1], 0, 0, DFmode);  operands[5] = operand_subword (operands[1], 1, 0, DFmode);})(define_split  [(set (match_operand:DF 0 "nonimmediate_operand" "")        (match_operand:DF 1 "general_operand" ""))]  "!TARGET_64BIT && reload_completed   && s390_split_ok_p (operands[0], operands[1], DFmode, 1)"  [(set (match_dup 2) (match_dup 4))   (set (match_dup 3) (match_dup 5))]{  operands[2] = operand_subword (operands[0], 1, 0, DFmode);  operands[3] = operand_subword (operands[0], 0, 0, DFmode);  operands[4] = operand_subword (operands[1], 1, 0, DFmode);  operands[5] = operand_subword (operands[1], 0, 0, DFmode);})(define_split  [(set (match_operand:DF 0 "register_operand" "")        (match_operand:DF 1 "memory_operand" ""))]  "!TARGET_64BIT && reload_completed   && !FP_REG_P (operands[0])   && !s_operand (operands[1], VOIDmode)"  [(set (match_dup 0) (match_dup 1))]{  rtx addr = operand_subword (operands[0], 1, 0, DFmode);  s390_load_address (addr, XEXP (operands[1], 0));  operands[1] = replace_equiv_address (operands[1], addr);})(define_expand "reload_outdf"  [(parallel [(match_operand:DF 0 "" "")              (match_operand:DF 1 "register_operand" "d")              (match_operand:SI 2 "register_operand" "=&a")])]  "!TARGET_64BIT"{  gcc_assert (MEM_P (operands[0]));  s390_load_address (operands[2], find_replacement (&XEXP (operands[0], 0)));  operands[0] = replace_equiv_address (operands[0], operands[2]);  emit_move_insn (operands[0], operands[1]);  DONE;});; movsf instruction pattern(s).;(define_insn "movsf"  [(set (match_operand:SF 0 "nonimmediate_operand" "=f,f,f,R,T,d,d,d,R,T,?Q")        (match_operand:SF 1 "general_operand" "f,R,T,f,f,d,R,T,d,d,?Q"))]  ""  "@   ler\t%0,%1   le\t%0,%1   ley\t%0,%1   ste\t%1,%0   stey\t%1,%0   lr\t%0,%1   l\t%0,%1   ly\t%0,%1   st\t%1,%0   sty\t%1,%0   #"  [(set_attr "op_type" "RR,RX,RXY,RX,RXY,RR,RX,RXY,RX,RXY,SS")   (set_attr "type" "floads,floads,floads,fstores,fstores,                     lr,load,load,store,store,*")]);; movcc instruction pattern;(define_insn "movcc"  [(set (match_operand:CC 0 "nonimmediate_operand" "=d,c,d,d,d,R,T")	(match_operand:CC 1 "nonimmediate_operand" "d,d,c,R,T,d,d"))]  ""  "@   lr\t%0,%1   tmh\t%1,12288   ipm\t%0   st\t%0,%1   sty\t%0,%1   l\t%1,%0   ly\t%1,%0"  [(set_attr "op_type" "RR,RI,RRE,RX,RXY,RX,RXY")   (set_attr "type" "lr,*,*,store,store,load,load")]);; Block move (MVC) patterns.;(define_insn "*mvc"  [(set (match_operand:BLK 0 "memory_operand" "=Q")        (match_operand:BLK 1 "memory_operand" "Q"))   (use (match_operand 2 "const_int_operand" "n"))]  "INTVAL (operands[2]) >= 1 && INTVAL (operands[2]) <= 256"  "mvc\t%O0(%2,%R0),%S1"  [(set_attr "op_type" "SS")])(define_split  [(set (match_operand 0 "memory_operand" "")        (match_operand 1 "memory_operand" ""))]  "reload_completed   && GET_MODE (operands[0]) == GET_MODE (operands[1])   && GET_MODE_SIZE (GET_MODE (operands[0])) > 0"  [(parallel    [(set (match_dup 0) (match_dup 1))     (use (match_dup 2))])]{  operands[2] = GEN_INT (GET_MODE_SIZE (GET_MODE (operands[0])));  operands[0] = adjust_address (operands[0], BLKmode, 0);  operands[1] = adjust_address (operands[1], BLKmode, 0);})(define_peephole2  [(parallel    [(set (match_operand:BLK 0 "memory_operand" "")          (match_operand:BLK 1 "memory_operand" ""))     (use (match_operand 2 "const_int_operand" ""))])   (parallel    [(set (match_operand:BLK 3 "memory_operand" "")          (match_operand:BLK 4 "memory_operand" ""))     (use (match_operand 5 "const_int_operand" ""))])]  "s390_offset_p (operands[0], operands[3], operands[2])   && s390_offset_p (operands[1], operands[4], operands[2])   && INTVAL (operands[2]) + INTVAL (operands[5]) <= 256"  [(parallel    [(set (match_dup 6) (match_dup 7))     (use (match_dup 8))])]  "operands[6] = gen_rtx_MEM (BLKmode, XEXP (operands[0], 0));   operands[7] = gen_rtx_MEM (BLKmode, XEXP (operands[1], 0));   operands[8] = GEN_INT (INTVAL (operands[2]) + INTVAL (operands[5]));");; load_multiple pattern(s).;; ??? Due to reload problems with replacing registers inside match_parallel; we currently support load_multiple/store_multiple only after reload.;(define_expand "load_multiple"  [(match_par_dup 3 [(set (match_operand 0 "" "")			  (match_operand 1 "" ""))		     (use (match_operand 2 "" ""))])]  "reload_completed"{  enum machine_mode mode;  int regno;  int count;  rtx from;  int i, off;  /* Support only loading a constant number of fixed-point registers from     memory and only bother with this if more than two */  if (GET_CODE (operands[2]) != CONST_INT      || INTVAL (operands[2]) < 2      || INTVAL (operands[2]) > 16      || GET_CODE (operands[1]) != MEM      || GET_CODE (operands[0]) != REG      || REGNO (operands[0]) >= 16)    FAIL;  count = INTVAL (operands[2]);  regno = REGNO (operands[0]);  mode = GET_MODE (operands[0]);  if (mode != SImode && mode != word_mode)    FAIL;  operands[3] = gen_rtx_PARALLEL (VOIDmode, rtvec_alloc (count));  if (no_new_pseudos)    {      if (GET_CODE (XEXP (operands[1], 0)) == REG)	{	  from = XEXP (operands[1], 0);	  off = 0;	}      else if (GET_CODE (XEXP (operands[1], 0)) == PLUS	       && GET_CODE (XEXP (XEXP (operands[1], 0), 0)) == REG	       && GET_CODE (XEXP (XEXP (operands[1], 0), 1)) == CONST_INT)	{	  from = XEXP (XEXP (operands[1], 0), 0);	  off = INTVAL (XEXP (XEXP (operands[1], 0), 1));	}      else	FAIL;    }  else    {      from = force_reg (Pmode, XEXP (operands[1], 0));      off = 0;    }  for (i = 0; i < count; i++)    XVECEXP (operands[3], 0, i)      = gen_rtx_SET (VOIDmode, gen_rtx_REG (mode, regno + i),		     change_address (operands[1], mode,		       plus_constant (from, off + i * GET_MODE_SIZE (mode))));})(define_insn "*load_multiple_di"  [(match_parallel 0 "load_multiple_operation"		   [(set (match_operand:DI 1 "register_operand" "=r")			 (match_operand:DI 2 "s_operand" "QS"))])]  "reload_completed && word_mode == DImode"{  int words = XVECLEN (operands[0], 0);  operands[0] = gen_rtx_REG (DImode, REGNO (operands[1]) + words - 1);  return "lmg\t%1,%0,%S2";}   [(set_attr "op_type" "RSY")    (set_attr "type"    "lm")])(define_insn "*load_multiple_si"  [(match_parallel 0 "load_multiple_operation"		   [(set (match_operand:SI 1 "register_operand" "=r,r")			 (match_operand:SI 2 "s_operand" "Q,S"))])]  "reload_completed"{  int words = XVECLEN (operands[0], 0);  operands[0] = gen_rtx_REG (SImode, REGNO (operands[1]) + words - 1);  return which_alternative == 0 ? "lm\t%1,%0,%S2" : "lmy\t%1,%0,%S2";}   [(set_attr "op_type" "RS,RSY")    (set_attr "type"    "lm")]);; store multiple pattern(s).;(define_expand "store_multiple"  [(match_par_dup 3 [(set (match_operand 0 "" "")			  (match_operand 1 "" ""))		     (use (match_operand 2 "" ""))])]  "reload_completed"{  enum machine_mode mode;  int regno;  int count;  rtx to;  int i, off;  /* Support only storing a constant number of fixed-point registers to     memory and only bother with this if more than two.  */  if (GET_CODE (operands[2]) != CONST_INT      || INTVAL (operands[2]) < 2      || INTVAL (operands[2]) > 16      || GET_CODE (operands[0]) != MEM      || GET_CODE (operands[1]) != REG      || REGNO (operands[1]) >= 16)    FAIL;  count = INTVAL (operands[2]);  regno = REGNO (operands[1]);  mode = GET_MODE (operands[1]);  if (mode != SImode && mode != word_mode)    FAIL;  operands[3] = gen_rtx_PARALLEL (VOIDmode, rtvec_alloc (count));  if (no_new_pseudos)    {      if (GET_CODE (XEXP (operands[0], 0)) == REG)	{	  to = XEXP (operands[0], 0);	  off = 0;	}      else if (GET_CODE (XEXP (operands[0], 0)) == PLUS	       && GET_CODE (XEXP (XEXP (operands[0], 0), 0)) == REG	       && GET_CODE (XEXP (XEXP (operands[0], 0), 1)) == CONST_INT)	{	  to = XEXP (XEXP (operands[0], 0), 0);	  off = INTVAL (XEXP (XEXP (operands[0], 0), 1));	}      else	FAIL;    }

⌨️ 快捷键说明

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