Home | History | Annotate | Line # | Download | only in rs6000
darwin.md revision 1.1
      1  1.1  mrg /* Machine description patterns for PowerPC running Darwin (Mac OS X).
      2  1.1  mrg    Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
      3  1.1  mrg    Contributed by Apple Computer Inc.
      4  1.1  mrg 
      5  1.1  mrg This file is part of GCC.
      6  1.1  mrg 
      7  1.1  mrg GNU CC is free software; you can redistribute it and/or modify
      8  1.1  mrg it under the terms of the GNU General Public License as published by
      9  1.1  mrg the Free Software Foundation; either version 3, or (at your option)
     10  1.1  mrg any later version.
     11  1.1  mrg 
     12  1.1  mrg GNU CC is distributed in the hope that it will be useful,
     13  1.1  mrg but WITHOUT ANY WARRANTY; without even the implied warranty of
     14  1.1  mrg MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15  1.1  mrg GNU General Public License for more details.
     16  1.1  mrg 
     17  1.1  mrg You should have received a copy of the GNU General Public License
     18  1.1  mrg ;; along with GCC; see the file COPYING3.  If not see
     19  1.1  mrg ;; <http://www.gnu.org/licenses/>.  */
     20  1.1  mrg 
     21  1.1  mrg (define_insn "adddi3_high"
     22  1.1  mrg   [(set (match_operand:DI 0 "gpc_reg_operand" "=b")
     23  1.1  mrg         (plus:DI (match_operand:DI 1 "gpc_reg_operand" "b")
     24  1.1  mrg                  (high:DI (match_operand 2 "" ""))))]
     25  1.1  mrg   "TARGET_MACHO && TARGET_64BIT"
     26  1.1  mrg   "{cau|addis} %0,%1,ha16(%2)"
     27  1.1  mrg   [(set_attr "length" "4")])
     28  1.1  mrg 
     29  1.1  mrg (define_insn "movdf_low_si"
     30  1.1  mrg   [(set (match_operand:DF 0 "gpc_reg_operand" "=f,!r")
     31  1.1  mrg         (mem:DF (lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b,b")
     32  1.1  mrg                            (match_operand 2 "" ""))))]
     33  1.1  mrg   "TARGET_MACHO && TARGET_HARD_FLOAT && TARGET_FPRS && !TARGET_64BIT"
     34  1.1  mrg   "*
     35  1.1  mrg {
     36  1.1  mrg   switch (which_alternative)
     37  1.1  mrg     {
     38  1.1  mrg       case 0:
     39  1.1  mrg 	return \"lfd %0,lo16(%2)(%1)\";
     40  1.1  mrg       case 1:
     41  1.1  mrg 	{
     42  1.1  mrg 	  if (TARGET_POWERPC64 && TARGET_32BIT)
     43  1.1  mrg 	    /* Note, old assemblers didn't support relocation here.  */
     44  1.1  mrg 	    return \"ld %0,lo16(%2)(%1)\";
     45  1.1  mrg 	  else
     46  1.1  mrg 	    {
     47  1.1  mrg 	      output_asm_insn (\"{cal|la} %0,lo16(%2)(%1)\", operands);
     48  1.1  mrg 	      output_asm_insn (\"{l|lwz} %L0,4(%0)\", operands);
     49  1.1  mrg 	      return (\"{l|lwz} %0,0(%0)\");
     50  1.1  mrg 	    }
     51  1.1  mrg 	}
     52  1.1  mrg       default:
     53  1.1  mrg 	gcc_unreachable ();
     54  1.1  mrg     }
     55  1.1  mrg }"
     56  1.1  mrg   [(set_attr "type" "load")
     57  1.1  mrg    (set_attr "length" "4,12")])
     58  1.1  mrg 
     59  1.1  mrg 
     60  1.1  mrg (define_insn "movdf_low_di"
     61  1.1  mrg   [(set (match_operand:DF 0 "gpc_reg_operand" "=f,!r")
     62  1.1  mrg         (mem:DF (lo_sum:DI (match_operand:DI 1 "gpc_reg_operand" "b,b")
     63  1.1  mrg                            (match_operand 2 "" ""))))]
     64  1.1  mrg   "TARGET_MACHO && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_64BIT"
     65  1.1  mrg   "*
     66  1.1  mrg {
     67  1.1  mrg   switch (which_alternative)
     68  1.1  mrg     {
     69  1.1  mrg       case 0:
     70  1.1  mrg 	return \"lfd %0,lo16(%2)(%1)\";
     71  1.1  mrg       case 1:
     72  1.1  mrg 	return \"ld %0,lo16(%2)(%1)\";
     73  1.1  mrg       default:
     74  1.1  mrg 	gcc_unreachable ();
     75  1.1  mrg     }
     76  1.1  mrg }"
     77  1.1  mrg   [(set_attr "type" "load")
     78  1.1  mrg    (set_attr "length" "4,4")])
     79  1.1  mrg 
     80  1.1  mrg (define_insn "movdf_low_st_si"
     81  1.1  mrg   [(set (mem:DF (lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b")
     82  1.1  mrg                            (match_operand 2 "" "")))
     83  1.1  mrg 	(match_operand:DF 0 "gpc_reg_operand" "f"))]
     84  1.1  mrg   "TARGET_MACHO && TARGET_HARD_FLOAT && TARGET_FPRS && ! TARGET_64BIT"
     85  1.1  mrg   "stfd %0,lo16(%2)(%1)"
     86  1.1  mrg   [(set_attr "type" "store")
     87  1.1  mrg    (set_attr "length" "4")])
     88  1.1  mrg 
     89  1.1  mrg (define_insn "movdf_low_st_di"
     90  1.1  mrg   [(set (mem:DF (lo_sum:DI (match_operand:DI 1 "gpc_reg_operand" "b")
     91  1.1  mrg                            (match_operand 2 "" "")))
     92  1.1  mrg 	(match_operand:DF 0 "gpc_reg_operand" "f"))]
     93  1.1  mrg   "TARGET_MACHO && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_64BIT"
     94  1.1  mrg   "stfd %0,lo16(%2)(%1)"
     95  1.1  mrg   [(set_attr "type" "store")
     96  1.1  mrg    (set_attr "length" "4")])
     97  1.1  mrg 
     98  1.1  mrg (define_insn "movsf_low_si"
     99  1.1  mrg   [(set (match_operand:SF 0 "gpc_reg_operand" "=f,!r")
    100  1.1  mrg         (mem:SF (lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b,b")
    101  1.1  mrg                            (match_operand 2 "" ""))))]
    102  1.1  mrg   "TARGET_MACHO && TARGET_HARD_FLOAT && TARGET_FPRS && ! TARGET_64BIT"
    103  1.1  mrg   "@
    104  1.1  mrg    lfs %0,lo16(%2)(%1)
    105  1.1  mrg    {l|lwz} %0,lo16(%2)(%1)"
    106  1.1  mrg   [(set_attr "type" "load")
    107  1.1  mrg    (set_attr "length" "4")])
    108  1.1  mrg 
    109  1.1  mrg (define_insn "movsf_low_di"
    110  1.1  mrg   [(set (match_operand:SF 0 "gpc_reg_operand" "=f,!r")
    111  1.1  mrg         (mem:SF (lo_sum:DI (match_operand:DI 1 "gpc_reg_operand" "b,b")
    112  1.1  mrg                            (match_operand 2 "" ""))))]
    113  1.1  mrg   "TARGET_MACHO && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_64BIT"
    114  1.1  mrg   "@
    115  1.1  mrg    lfs %0,lo16(%2)(%1)
    116  1.1  mrg    {l|lwz} %0,lo16(%2)(%1)"
    117  1.1  mrg   [(set_attr "type" "load")
    118  1.1  mrg    (set_attr "length" "4")])
    119  1.1  mrg 
    120  1.1  mrg (define_insn "movsf_low_st_si"
    121  1.1  mrg   [(set (mem:SF (lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b,b")
    122  1.1  mrg                            (match_operand 2 "" "")))
    123  1.1  mrg 	(match_operand:SF 0 "gpc_reg_operand" "f,!r"))]
    124  1.1  mrg   "TARGET_MACHO && TARGET_HARD_FLOAT && TARGET_FPRS && ! TARGET_64BIT"
    125  1.1  mrg   "@
    126  1.1  mrg    stfs %0,lo16(%2)(%1)
    127  1.1  mrg    {st|stw} %0,lo16(%2)(%1)"
    128  1.1  mrg   [(set_attr "type" "store")
    129  1.1  mrg    (set_attr "length" "4")])
    130  1.1  mrg 
    131  1.1  mrg (define_insn "movsf_low_st_di"
    132  1.1  mrg   [(set (mem:SF (lo_sum:DI (match_operand:DI 1 "gpc_reg_operand" "b,b")
    133  1.1  mrg                            (match_operand 2 "" "")))
    134  1.1  mrg 	(match_operand:SF 0 "gpc_reg_operand" "f,!r"))]
    135  1.1  mrg   "TARGET_MACHO && TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_64BIT"
    136  1.1  mrg   "@
    137  1.1  mrg    stfs %0,lo16(%2)(%1)
    138  1.1  mrg    {st|stw} %0,lo16(%2)(%1)"
    139  1.1  mrg   [(set_attr "type" "store")
    140  1.1  mrg    (set_attr "length" "4")])
    141  1.1  mrg 
    142  1.1  mrg ;; 64-bit MachO load/store support
    143  1.1  mrg (define_insn "movdi_low"
    144  1.1  mrg   [(set (match_operand:DI 0 "gpc_reg_operand" "=r")
    145  1.1  mrg         (mem:DI (lo_sum:DI (match_operand:DI 1 "gpc_reg_operand" "b")
    146  1.1  mrg                            (match_operand 2 "" ""))))]
    147  1.1  mrg   "TARGET_MACHO && TARGET_64BIT"
    148  1.1  mrg   "{l|ld} %0,lo16(%2)(%1)"
    149  1.1  mrg   [(set_attr "type" "load")
    150  1.1  mrg    (set_attr "length" "4")])
    151  1.1  mrg 
    152  1.1  mrg (define_insn "movsi_low_st"
    153  1.1  mrg   [(set (mem:SI (lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b")
    154  1.1  mrg                            (match_operand 2 "" "")))
    155  1.1  mrg 	(match_operand:SI 0 "gpc_reg_operand" "r"))]
    156  1.1  mrg   "TARGET_MACHO && ! TARGET_64BIT"
    157  1.1  mrg   "{st|stw} %0,lo16(%2)(%1)"
    158  1.1  mrg   [(set_attr "type" "store")
    159  1.1  mrg    (set_attr "length" "4")])
    160  1.1  mrg 
    161  1.1  mrg (define_insn "movdi_low_st"
    162  1.1  mrg   [(set (mem:DI (lo_sum:DI (match_operand:DI 1 "gpc_reg_operand" "b")
    163  1.1  mrg                            (match_operand 2 "" "")))
    164  1.1  mrg 	(match_operand:DI 0 "gpc_reg_operand" "r"))]
    165  1.1  mrg   "TARGET_MACHO && TARGET_64BIT"
    166  1.1  mrg   "{st|std} %0,lo16(%2)(%1)"
    167  1.1  mrg   [(set_attr "type" "store")
    168  1.1  mrg    (set_attr "length" "4")])
    169  1.1  mrg 
    170  1.1  mrg ;; Mach-O PIC trickery.
    171  1.1  mrg (define_expand "macho_high"
    172  1.1  mrg   [(set (match_operand 0 "" "")
    173  1.1  mrg 	(high (match_operand 1 "" "")))]
    174  1.1  mrg   "TARGET_MACHO"
    175  1.1  mrg {
    176  1.1  mrg   if (TARGET_64BIT)
    177  1.1  mrg     emit_insn (gen_macho_high_di (operands[0], operands[1]));
    178  1.1  mrg   else
    179  1.1  mrg     emit_insn (gen_macho_high_si (operands[0], operands[1]));
    180  1.1  mrg 
    181  1.1  mrg   DONE;
    182  1.1  mrg })
    183  1.1  mrg 
    184  1.1  mrg (define_insn "macho_high_si"
    185  1.1  mrg   [(set (match_operand:SI 0 "gpc_reg_operand" "=b*r")
    186  1.1  mrg 	(high:SI (match_operand 1 "" "")))]
    187  1.1  mrg   "TARGET_MACHO && ! TARGET_64BIT"
    188  1.1  mrg   "{liu|lis} %0,ha16(%1)")
    189  1.1  mrg 
    190  1.1  mrg 
    191  1.1  mrg (define_insn "macho_high_di"
    192  1.1  mrg   [(set (match_operand:DI 0 "gpc_reg_operand" "=b*r")
    193  1.1  mrg 	(high:DI (match_operand 1 "" "")))]
    194  1.1  mrg   "TARGET_MACHO && TARGET_64BIT"
    195  1.1  mrg   "{liu|lis} %0,ha16(%1)")
    196  1.1  mrg 
    197  1.1  mrg (define_expand "macho_low"
    198  1.1  mrg   [(set (match_operand 0 "" "")
    199  1.1  mrg 	(lo_sum (match_operand 1 "" "")
    200  1.1  mrg 		   (match_operand 2 "" "")))]
    201  1.1  mrg    "TARGET_MACHO"
    202  1.1  mrg {
    203  1.1  mrg   if (TARGET_64BIT)
    204  1.1  mrg     emit_insn (gen_macho_low_di (operands[0], operands[1], operands[2]));
    205  1.1  mrg   else
    206  1.1  mrg     emit_insn (gen_macho_low_si (operands[0], operands[1], operands[2]));
    207  1.1  mrg 
    208  1.1  mrg   DONE;
    209  1.1  mrg })
    210  1.1  mrg 
    211  1.1  mrg (define_insn "macho_low_si"
    212  1.1  mrg   [(set (match_operand:SI 0 "gpc_reg_operand" "=r,r")
    213  1.1  mrg 	(lo_sum:SI (match_operand:SI 1 "gpc_reg_operand" "b,!*r")
    214  1.1  mrg 		   (match_operand 2 "" "")))]
    215  1.1  mrg    "TARGET_MACHO && ! TARGET_64BIT"
    216  1.1  mrg    "@
    217  1.1  mrg     {cal %0,%a2@l(%1)|la %0,lo16(%2)(%1)}
    218  1.1  mrg     {cal %0,%a2@l(%1)|addic %0,%1,lo16(%2)}")
    219  1.1  mrg 
    220  1.1  mrg (define_insn "macho_low_di"
    221  1.1  mrg   [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r")
    222  1.1  mrg 	(lo_sum:DI (match_operand:DI 1 "gpc_reg_operand" "b,!*r")
    223  1.1  mrg 		   (match_operand 2 "" "")))]
    224  1.1  mrg    "TARGET_MACHO && TARGET_64BIT"
    225  1.1  mrg    "@
    226  1.1  mrg     {cal %0,%a2@l(%1)|la %0,lo16(%2)(%1)}
    227  1.1  mrg     {cal %0,%a2@l(%1)|addic %0,%1,lo16(%2)}")
    228  1.1  mrg 
    229  1.1  mrg (define_split
    230  1.1  mrg   [(set (mem:V4SI (plus:DI (match_operand:DI 0 "gpc_reg_operand" "")
    231  1.1  mrg 			 (match_operand:DI 1 "short_cint_operand" "")))
    232  1.1  mrg 	(match_operand:V4SI 2 "register_operand" ""))
    233  1.1  mrg    (clobber (match_operand:DI 3 "gpc_reg_operand" ""))]
    234  1.1  mrg   "TARGET_MACHO && TARGET_64BIT"
    235  1.1  mrg   [(set (match_dup 3) (plus:DI (match_dup 0) (match_dup 1)))
    236  1.1  mrg    (set (mem:V4SI (match_dup 3))
    237  1.1  mrg 	(match_dup 2))]
    238  1.1  mrg   "")
    239  1.1  mrg 
    240  1.1  mrg (define_expand "load_macho_picbase"
    241  1.1  mrg   [(set (reg:SI 65)
    242  1.1  mrg         (unspec [(match_operand 0 "" "")]
    243  1.1  mrg                    UNSPEC_LD_MPIC))]
    244  1.1  mrg   "(DEFAULT_ABI == ABI_DARWIN) && flag_pic"
    245  1.1  mrg {
    246  1.1  mrg   if (TARGET_32BIT)
    247  1.1  mrg     emit_insn (gen_load_macho_picbase_si (operands[0]));
    248  1.1  mrg   else
    249  1.1  mrg     emit_insn (gen_load_macho_picbase_di (operands[0]));
    250  1.1  mrg 
    251  1.1  mrg   DONE;
    252  1.1  mrg })
    253  1.1  mrg 
    254  1.1  mrg (define_insn "load_macho_picbase_si"
    255  1.1  mrg   [(set (reg:SI 65)
    256  1.1  mrg 	(unspec:SI [(match_operand:SI 0 "immediate_operand" "s")
    257  1.1  mrg 		    (pc)] UNSPEC_LD_MPIC))]
    258  1.1  mrg   "(DEFAULT_ABI == ABI_DARWIN) && flag_pic"
    259  1.1  mrg   "bcl 20,31,%0\\n%0:"
    260  1.1  mrg   [(set_attr "type" "branch")
    261  1.1  mrg    (set_attr "length" "4")])
    262  1.1  mrg 
    263  1.1  mrg (define_insn "load_macho_picbase_di"
    264  1.1  mrg   [(set (reg:DI 65)
    265  1.1  mrg 	(unspec:DI [(match_operand:DI 0 "immediate_operand" "s")
    266  1.1  mrg 		    (pc)] UNSPEC_LD_MPIC))]
    267  1.1  mrg   "(DEFAULT_ABI == ABI_DARWIN) && flag_pic && TARGET_64BIT"
    268  1.1  mrg   "bcl 20,31,%0\\n%0:"
    269  1.1  mrg   [(set_attr "type" "branch")
    270  1.1  mrg    (set_attr "length" "4")])
    271  1.1  mrg 
    272  1.1  mrg (define_expand "macho_correct_pic"
    273  1.1  mrg   [(set (match_operand 0 "" "")
    274  1.1  mrg 	(plus (match_operand 1 "" "")
    275  1.1  mrg 		 (unspec [(match_operand 2 "" "")
    276  1.1  mrg 			     (match_operand 3 "" "")]
    277  1.1  mrg 			    UNSPEC_MPIC_CORRECT)))]
    278  1.1  mrg   "DEFAULT_ABI == ABI_DARWIN"
    279  1.1  mrg {
    280  1.1  mrg   if (TARGET_32BIT)
    281  1.1  mrg     emit_insn (gen_macho_correct_pic_si (operands[0], operands[1], operands[2],
    282  1.1  mrg 	       operands[3]));
    283  1.1  mrg   else
    284  1.1  mrg     emit_insn (gen_macho_correct_pic_di (operands[0], operands[1], operands[2],
    285  1.1  mrg 	       operands[3]));
    286  1.1  mrg 
    287  1.1  mrg   DONE;
    288  1.1  mrg })
    289  1.1  mrg 
    290  1.1  mrg (define_insn "macho_correct_pic_si"
    291  1.1  mrg   [(set (match_operand:SI 0 "gpc_reg_operand" "=r")
    292  1.1  mrg 	(plus:SI (match_operand:SI 1 "gpc_reg_operand" "r")
    293  1.1  mrg 		 (unspec:SI [(match_operand:SI 2 "immediate_operand" "s")
    294  1.1  mrg 			     (match_operand:SI 3 "immediate_operand" "s")]
    295  1.1  mrg 			    UNSPEC_MPIC_CORRECT)))]
    296  1.1  mrg   "DEFAULT_ABI == ABI_DARWIN"
    297  1.1  mrg   "addis %0,%1,ha16(%2-%3)\n\taddi %0,%0,lo16(%2-%3)"
    298  1.1  mrg   [(set_attr "length" "8")])
    299  1.1  mrg 
    300  1.1  mrg (define_insn "macho_correct_pic_di"
    301  1.1  mrg   [(set (match_operand:DI 0 "gpc_reg_operand" "=r")
    302  1.1  mrg 	(plus:DI (match_operand:DI 1 "gpc_reg_operand" "r")
    303  1.1  mrg 		 (unspec:DI [(match_operand:DI 2 "immediate_operand" "s")
    304  1.1  mrg 			     (match_operand:DI 3 "immediate_operand" "s")]
    305  1.1  mrg 			    16)))]
    306  1.1  mrg   "DEFAULT_ABI == ABI_DARWIN && TARGET_64BIT"
    307  1.1  mrg   "addis %0,%1,ha16(%2-%3)\n\taddi %0,%0,lo16(%2-%3)"
    308  1.1  mrg   [(set_attr "length" "8")])
    309  1.1  mrg 
    310  1.1  mrg (define_insn "*call_indirect_nonlocal_darwin64"
    311  1.1  mrg   [(call (mem:SI (match_operand:DI 0 "register_operand" "c,*l,c,*l"))
    312  1.1  mrg 	 (match_operand 1 "" "g,g,g,g"))
    313  1.1  mrg    (use (match_operand:SI 2 "immediate_operand" "O,O,n,n"))
    314  1.1  mrg    (clobber (reg:SI 65))]
    315  1.1  mrg   "DEFAULT_ABI == ABI_DARWIN && TARGET_64BIT"
    316  1.1  mrg {
    317  1.1  mrg   return "b%T0l";
    318  1.1  mrg }
    319  1.1  mrg   [(set_attr "type" "jmpreg,jmpreg,jmpreg,jmpreg")
    320  1.1  mrg    (set_attr "length" "4,4,8,8")])
    321  1.1  mrg 
    322  1.1  mrg (define_insn "*call_nonlocal_darwin64"
    323  1.1  mrg   [(call (mem:SI (match_operand:DI 0 "symbol_ref_operand" "s,s"))
    324  1.1  mrg 	 (match_operand 1 "" "g,g"))
    325  1.1  mrg    (use (match_operand:SI 2 "immediate_operand" "O,n"))
    326  1.1  mrg    (clobber (reg:SI 65))]
    327  1.1  mrg   "(DEFAULT_ABI == ABI_DARWIN)
    328  1.1  mrg    && (INTVAL (operands[2]) & CALL_LONG) == 0"
    329  1.1  mrg {
    330  1.1  mrg #if TARGET_MACHO
    331  1.1  mrg   return output_call(insn, operands, 0, 2);
    332  1.1  mrg #else
    333  1.1  mrg   gcc_unreachable ();
    334  1.1  mrg #endif
    335  1.1  mrg }
    336  1.1  mrg   [(set_attr "type" "branch,branch")
    337  1.1  mrg    (set_attr "length" "4,8")])
    338  1.1  mrg 
    339  1.1  mrg (define_insn "*call_value_indirect_nonlocal_darwin64"
    340  1.1  mrg   [(set (match_operand 0 "" "")
    341  1.1  mrg 	(call (mem:SI (match_operand:DI 1 "register_operand" "c,*l,c,*l"))
    342  1.1  mrg 	      (match_operand 2 "" "g,g,g,g")))
    343  1.1  mrg    (use (match_operand:SI 3 "immediate_operand" "O,O,n,n"))
    344  1.1  mrg    (clobber (reg:SI 65))]
    345  1.1  mrg   "DEFAULT_ABI == ABI_DARWIN"
    346  1.1  mrg {
    347  1.1  mrg   return "b%T1l";
    348  1.1  mrg }
    349  1.1  mrg   [(set_attr "type" "jmpreg,jmpreg,jmpreg,jmpreg")
    350  1.1  mrg    (set_attr "length" "4,4,8,8")])
    351  1.1  mrg 
    352  1.1  mrg (define_insn "*call_value_nonlocal_darwin64"
    353  1.1  mrg   [(set (match_operand 0 "" "")
    354  1.1  mrg 	(call (mem:SI (match_operand:DI 1 "symbol_ref_operand" "s,s"))
    355  1.1  mrg 	      (match_operand 2 "" "g,g")))
    356  1.1  mrg    (use (match_operand:SI 3 "immediate_operand" "O,n"))
    357  1.1  mrg    (clobber (reg:SI 65))]
    358  1.1  mrg   "(DEFAULT_ABI == ABI_DARWIN)
    359  1.1  mrg    && (INTVAL (operands[3]) & CALL_LONG) == 0"
    360  1.1  mrg {
    361  1.1  mrg #if TARGET_MACHO
    362  1.1  mrg   return output_call(insn, operands, 1, 3);
    363  1.1  mrg #else
    364  1.1  mrg   gcc_unreachable ();
    365  1.1  mrg #endif
    366  1.1  mrg }
    367  1.1  mrg   [(set_attr "type" "branch,branch")
    368  1.1  mrg    (set_attr "length" "4,8")])
    369  1.1  mrg 
    370  1.1  mrg (define_insn "*sibcall_nonlocal_darwin64"
    371  1.1  mrg   [(call (mem:SI (match_operand:DI 0 "symbol_ref_operand" "s,s"))
    372  1.1  mrg 	 (match_operand 1 "" ""))
    373  1.1  mrg    (use (match_operand 2 "immediate_operand" "O,n"))
    374  1.1  mrg    (use (reg:SI 65))
    375  1.1  mrg    (return)]
    376  1.1  mrg   "(DEFAULT_ABI == ABI_DARWIN)
    377  1.1  mrg    && (INTVAL (operands[2]) & CALL_LONG) == 0"
    378  1.1  mrg {
    379  1.1  mrg   return "b %z0";
    380  1.1  mrg }
    381  1.1  mrg   [(set_attr "type" "branch,branch")
    382  1.1  mrg    (set_attr "length" "4,8")])
    383  1.1  mrg 
    384  1.1  mrg (define_insn "*sibcall_value_nonlocal_darwin64"
    385  1.1  mrg   [(set (match_operand 0 "" "")
    386  1.1  mrg 	(call (mem:SI (match_operand:DI 1 "symbol_ref_operand" "s,s"))
    387  1.1  mrg 	      (match_operand 2 "" "")))
    388  1.1  mrg    (use (match_operand:SI 3 "immediate_operand" "O,n"))
    389  1.1  mrg    (use (reg:SI 65))
    390  1.1  mrg    (return)]
    391  1.1  mrg   "(DEFAULT_ABI == ABI_DARWIN)
    392  1.1  mrg    && (INTVAL (operands[3]) & CALL_LONG) == 0"
    393  1.1  mrg   "*
    394  1.1  mrg {
    395  1.1  mrg   return \"b %z1\";
    396  1.1  mrg }"
    397  1.1  mrg   [(set_attr "type" "branch,branch")
    398  1.1  mrg    (set_attr "length" "4,8")])
    399  1.1  mrg 
    400  1.1  mrg 
    401  1.1  mrg (define_insn "*sibcall_symbolic_64"
    402  1.1  mrg   [(call (mem:SI (match_operand:DI 0 "call_operand" "s,c")) ; 64
    403  1.1  mrg 	 (match_operand 1 "" ""))
    404  1.1  mrg    (use (match_operand 2 "" ""))
    405  1.1  mrg    (use (reg:SI 65))
    406  1.1  mrg    (return)]
    407  1.1  mrg   "TARGET_64BIT && DEFAULT_ABI == ABI_DARWIN"
    408  1.1  mrg   "*
    409  1.1  mrg {
    410  1.1  mrg   switch (which_alternative)
    411  1.1  mrg     {
    412  1.1  mrg       case 0:  return \"b %z0\";
    413  1.1  mrg       case 1:  return \"b%T0\";
    414  1.1  mrg       default:  gcc_unreachable ();
    415  1.1  mrg     }
    416  1.1  mrg }"
    417  1.1  mrg   [(set_attr "type" "branch")
    418  1.1  mrg    (set_attr "length" "4")])
    419  1.1  mrg 
    420  1.1  mrg (define_insn "*sibcall_value_symbolic_64"
    421  1.1  mrg   [(set (match_operand 0 "" "")
    422  1.1  mrg 	(call (mem:SI (match_operand:DI 1 "call_operand" "s,c"))
    423  1.1  mrg 	      (match_operand 2 "" "")))
    424  1.1  mrg    (use (match_operand:SI 3 "" ""))
    425  1.1  mrg    (use (reg:SI 65))
    426  1.1  mrg    (return)]
    427  1.1  mrg   "TARGET_64BIT && DEFAULT_ABI == ABI_DARWIN"
    428  1.1  mrg   "*
    429  1.1  mrg {
    430  1.1  mrg   switch (which_alternative)
    431  1.1  mrg     {
    432  1.1  mrg       case 0:  return \"b %z1\";
    433  1.1  mrg       case 1:  return \"b%T1\";
    434  1.1  mrg       default:  gcc_unreachable ();
    435  1.1  mrg     }
    436  1.1  mrg }"
    437  1.1  mrg   [(set_attr "type" "branch")
    438  1.1  mrg    (set_attr "length" "4")])
    439