WikiStart: clang_bgq_r154950-20120421.patch

File clang_bgq_r154950-20120421.patch, 70.7 KB (added by hfinkel, 5 years ago)
  • include/clang/Basic/BuiltinsPPC.def

    diff --git a/include/clang/Basic/BuiltinsPPC.def b/include/clang/Basic/BuiltinsPPC.def
    index 8a751e4..b89c673 100644
    a b  
    206206 
    207207// FIXME: Obviously incomplete. 
    208208 
     209BUILTIN(__builtin_fp2_fpadd, "V2dV2dV2d", "") 
     210BUILTIN(__builtin_fp2_fpsub, "V2dV2dV2d", "") 
     211 
     212BUILTIN(__builtin_fp2_fpre, "V2dV2d", "") 
     213BUILTIN(__builtin_fp2_fprsqrte, "V2dV2d", "") 
     214 
     215BUILTIN(__builtin_fp2_fpmul, "V2dV2dV2d", "") 
     216BUILTIN(__builtin_fp2_fxmul, "V2dV2dV2d", "") 
     217BUILTIN(__builtin_fp2_fxpmul, "V2dV2dV2d", "") 
     218BUILTIN(__builtin_fp2_fxsmul, "V2dV2dV2d", "") 
     219 
     220BUILTIN(__builtin_fp2_fpmadd, "V2dV2dV2dV2d", "") 
     221BUILTIN(__builtin_fp2_fpnmadd, "V2dV2dV2dV2d", "") 
     222BUILTIN(__builtin_fp2_fpmsub, "V2dV2dV2dV2d", "") 
     223BUILTIN(__builtin_fp2_fpnmsub, "V2dV2dV2dV2d", "") 
     224BUILTIN(__builtin_fp2_fxmadd, "V2dV2dV2dV2d", "") 
     225BUILTIN(__builtin_fp2_fxnmadd, "V2dV2dV2dV2d", "") 
     226BUILTIN(__builtin_fp2_fxmsub, "V2dV2dV2dV2d", "") 
     227BUILTIN(__builtin_fp2_fxnmsub, "V2dV2dV2dV2d", "") 
     228BUILTIN(__builtin_fp2_fxcpmadd, "V2dV2dV2dV2d", "") 
     229BUILTIN(__builtin_fp2_fxcsmadd, "V2dV2dV2dV2d", "") 
     230BUILTIN(__builtin_fp2_fxcpnmadd, "V2dV2dV2dV2d", "") 
     231BUILTIN(__builtin_fp2_fxcsnmadd, "V2dV2dV2dV2d", "") 
     232BUILTIN(__builtin_fp2_fxcpmsub, "V2dV2dV2dV2d", "") 
     233BUILTIN(__builtin_fp2_fxcsmsub, "V2dV2dV2dV2d", "") 
     234BUILTIN(__builtin_fp2_fxcpnmsub, "V2dV2dV2dV2d", "") 
     235BUILTIN(__builtin_fp2_fxcsnmsub, "V2dV2dV2dV2d", "") 
     236 
     237BUILTIN(__builtin_fp2_fxcpnpma, "V2dV2dV2dV2d", "") 
     238BUILTIN(__builtin_fp2_fxcsnpma, "V2dV2dV2dV2d", "") 
     239BUILTIN(__builtin_fp2_fxcpnsma, "V2dV2dV2dV2d", "") 
     240BUILTIN(__builtin_fp2_fxcsnsma, "V2dV2dV2dV2d", "") 
     241 
     242BUILTIN(__builtin_fp2_fxcxnpma, "V2dV2dV2dV2d", "") 
     243BUILTIN(__builtin_fp2_fxcxnsma, "V2dV2dV2dV2d", "") 
     244BUILTIN(__builtin_fp2_fxcxma, "V2dV2dV2dV2d", "") 
     245BUILTIN(__builtin_fp2_fxcxnms, "V2dV2dV2dV2d", "") 
     246 
     247BUILTIN(__builtin_fp2_fpsel, "V2dV2dV2dV2d", "") 
     248 
     249BUILTIN(__builtin_fp2_fpctiw, "V2dV2d", "") 
     250BUILTIN(__builtin_fp2_fpctiwz, "V2dV2d", "") 
     251BUILTIN(__builtin_fp2_fprsp, "V2dV2d", "") 
     252 
     253BUILTIN(__builtin_fp2_fpneg, "V2dV2d", "") 
     254BUILTIN(__builtin_fp2_fpabs, "V2dV2d", "") 
     255BUILTIN(__builtin_fp2_fpnabs, "V2dV2d", "") 
     256BUILTIN(__builtin_fp2_fxmr, "V2dV2d", "") 
     257 
     258BUILTIN(__builtin_fp2_lfps, "V2dfC*", "") 
     259BUILTIN(__builtin_fp2_lfxs, "V2dfC*", "") 
     260BUILTIN(__builtin_fp2_lfpd, "V2ddC*", "") 
     261BUILTIN(__builtin_fp2_lfxd, "V2ddC*", "") 
     262 
     263BUILTIN(__builtin_fp2_stfps, "vV2df*", "") 
     264BUILTIN(__builtin_fp2_stfxs, "vV2df*", "") 
     265BUILTIN(__builtin_fp2_stfpd, "vV2dd*", "") 
     266BUILTIN(__builtin_fp2_stfxd, "vV2dd*", "") 
     267BUILTIN(__builtin_fp2_stfpiw, "vV2di*", "") 
     268 
     269BUILTIN(__builtin_qpx_qvfabs, "V4dV4d", "") 
     270BUILTIN(__builtin_qpx_qvfctid, "V4dV4d", "") 
     271BUILTIN(__builtin_qpx_qvfcfid, "V4dV4d", "") 
     272BUILTIN(__builtin_qpx_qvfcfidu, "V4dV4d", "") 
     273BUILTIN(__builtin_qpx_qvfctidu, "V4dV4d", "") 
     274BUILTIN(__builtin_qpx_qvfctiduz, "V4dV4d", "") 
     275BUILTIN(__builtin_qpx_qvfctidz, "V4dV4d", "") 
     276BUILTIN(__builtin_qpx_qvfctiw, "V4dV4d", "") 
     277BUILTIN(__builtin_qpx_qvfctiwu, "V4dV4d", "") 
     278BUILTIN(__builtin_qpx_qvfctiwuz, "V4dV4d", "") 
     279BUILTIN(__builtin_qpx_qvfctiwz, "V4dV4d", "") 
     280BUILTIN(__builtin_qpx_qvfnabs, "V4dV4d", "") 
     281BUILTIN(__builtin_qpx_qvfneg, "V4dV4d", "") 
     282BUILTIN(__builtin_qpx_qvfre, "V4dV4d", "") 
     283BUILTIN(__builtin_qpx_qvfres, "V4dV4d", "") 
     284BUILTIN(__builtin_qpx_qvfrim, "V4dV4d", "") 
     285BUILTIN(__builtin_qpx_qvfrin, "V4dV4d", "") 
     286BUILTIN(__builtin_qpx_qvfrip, "V4dV4d", "") 
     287BUILTIN(__builtin_qpx_qvfriz, "V4dV4d", "") 
     288BUILTIN(__builtin_qpx_qvfrsp, "V4dV4d", "") 
     289BUILTIN(__builtin_qpx_qvfrsqrte, "V4dV4d", "") 
     290BUILTIN(__builtin_qpx_qvfrsqrtes, "V4dV4d", "") 
     291 
     292BUILTIN(__builtin_qpx_qvfadd, "V4dV4dV4d", "") 
     293BUILTIN(__builtin_qpx_qvfcmpeq, "V4dV4dV4d", "") 
     294BUILTIN(__builtin_qpx_qvfcmpgt, "V4dV4dV4d", "") 
     295BUILTIN(__builtin_qpx_qvfcmplt, "V4dV4dV4d", "") 
     296BUILTIN(__builtin_qpx_qvfcpsgn, "V4dV4dV4d", "") 
     297BUILTIN(__builtin_qpx_qvfmadd, "V4dV4dV4dV4d", "") 
     298BUILTIN(__builtin_qpx_qvfmsub, "V4dV4dV4dV4d", "") 
     299BUILTIN(__builtin_qpx_qvfmul, "V4dV4dV4d", "") 
     300BUILTIN(__builtin_qpx_qvfnmadd, "V4dV4dV4dV4d", "") 
     301BUILTIN(__builtin_qpx_qvfnmsub, "V4dV4dV4dV4d", "") 
     302BUILTIN(__builtin_qpx_qvfsel, "V4dV4dV4dV4d", "") 
     303BUILTIN(__builtin_qpx_qvfsub, "V4dV4dV4d", "") 
     304BUILTIN(__builtin_qpx_qvftstnan, "V4dV4dV4d", "") 
     305BUILTIN(__builtin_qpx_qvfxmadd, "V4dV4dV4dV4d", "") 
     306BUILTIN(__builtin_qpx_qvfxmul, "V4dV4dV4d", "") 
     307BUILTIN(__builtin_qpx_qvfxxcpnmadd, "V4dV4dV4dV4d", "") 
     308BUILTIN(__builtin_qpx_qvfxxmadd, "V4dV4dV4dV4d", "") 
     309BUILTIN(__builtin_qpx_qvfxxnpmadd, "V4dV4dV4dV4d", "") 
     310 
     311BUILTIN(__builtin_qpx_qvflogical, "V4dV4dV4dIi", "") 
     312 
     313BUILTIN(__builtin_qpx_qvfperm, "V4dV4dV4dV4d", "") 
     314BUILTIN(__builtin_qpx_qvlpcld, "V4ddC*", "") 
     315BUILTIN(__builtin_qpx_qvlpcls, "V4dfC*", "") 
     316BUILTIN(__builtin_qpx_qvlpcrd, "V4ddC*", "") 
     317BUILTIN(__builtin_qpx_qvlpcrs, "V4dfC*", "") 
     318BUILTIN(__builtin_qpx_qvgpci, "V4dIi", "") 
     319 
     320BUILTIN(__builtin_qpx_qvlfcda, "V4dXdC*", "") 
     321BUILTIN(__builtin_qpx_qvlfcd, "V4dXdC*", "") 
     322BUILTIN(__builtin_qpx_qvlfcsa, "V4dXfC*", "") 
     323BUILTIN(__builtin_qpx_qvlfcs, "V4dXfC*", "") 
     324BUILTIN(__builtin_qpx_qvlfda, "V4ddC*", "") 
     325BUILTIN(__builtin_qpx_qvlfd, "V4ddC*", "") 
     326BUILTIN(__builtin_qpx_qvlfiwaa, "V4diC*", "") 
     327BUILTIN(__builtin_qpx_qvlfiwa, "V4diC*", "") 
     328BUILTIN(__builtin_qpx_qvlfiwza, "V4dUiC*", "") 
     329BUILTIN(__builtin_qpx_qvlfiwz, "V4dUiC*", "") 
     330BUILTIN(__builtin_qpx_qvlfsa, "V4dfC*", "") 
     331BUILTIN(__builtin_qpx_qvlfs, "V4dfC*", "") 
     332 
     333BUILTIN(__builtin_qpx_qvstfcda, "vV4dXd*", "") 
     334BUILTIN(__builtin_qpx_qvstfcd, "vV4dXd*", "") 
     335BUILTIN(__builtin_qpx_qvstfcsa, "vV4dXf*", "") 
     336BUILTIN(__builtin_qpx_qvstfcs, "vV4dXf*", "") 
     337BUILTIN(__builtin_qpx_qvstfda, "vV4dd*", "") 
     338BUILTIN(__builtin_qpx_qvstfd, "vV4dd*", "") 
     339BUILTIN(__builtin_qpx_qvstfiwa, "vV4dUi*", "") 
     340BUILTIN(__builtin_qpx_qvstfiw, "vV4dUi*", "") 
     341BUILTIN(__builtin_qpx_qvstfsa, "vV4df*", "") 
     342BUILTIN(__builtin_qpx_qvstfs, "vV4df*", "") 
     343 
    209344#undef BUILTIN 
  • lib/Basic/Targets.cpp

    diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
    index 5856d1d..3ee14cc 100644
    a b  
    333333  } 
    334334}; 
    335335 
     336// CNK target 
     337template<typename Target> 
     338class CNKTargetInfo : public OSTargetInfo<Target> { 
     339protected: 
     340  virtual void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple, 
     341                            MacroBuilder &Builder) const { 
     342    // CNK defines; list based off of gcc output 
     343    DefineStd(Builder, "unix", Opts); 
     344    DefineStd(Builder, "cnk", Opts); 
     345    Builder.defineMacro("__gnu_cnk__"); 
     346    Builder.defineMacro("__ELF__"); 
     347    if (Opts.POSIXThreads) 
     348      Builder.defineMacro("_REENTRANT"); 
     349    if (Opts.CPlusPlus) 
     350      Builder.defineMacro("_GNU_SOURCE"); 
     351  } 
     352public: 
     353  CNKTargetInfo(const std::string& triple) 
     354    : OSTargetInfo<Target>(triple) { 
     355    this->UserLabelPrefix = ""; 
     356    this->WIntType = TargetInfo::UnsignedInt; 
     357  } 
     358}; 
     359 
    336360// NetBSD Target 
    337361template<typename Target> 
    338362class NetBSDTargetInfo : public OSTargetInfo<Target> { 
     
    573597  static const Builtin::Info BuiltinInfo[]; 
    574598  static const char * const GCCRegNames[]; 
    575599  static const TargetInfo::GCCRegAlias GCCRegAliases[]; 
     600  std::string CPU; 
    576601public: 
    577602  PPCTargetInfo(const std::string& triple) : TargetInfo(triple) { 
    578603    LongDoubleWidth = LongDoubleAlign = 128; 
    579604    LongDoubleFormat = &llvm::APFloat::PPCDoubleDouble; 
    580605  } 
    581606 
     607  virtual bool setCPU(const std::string &Name) { 
     608    if (Name == "440" || Name == "450") { 
     609      CPU = Name; 
     610      return true; 
     611    } else if (Name == "440fp2" || Name == "440d") { 
     612      CPU = "440fp2"; 
     613      return true; 
     614    } else if (Name == "450fp2" || Name == "450d") { 
     615      CPU = "450fp2"; 
     616      return true; 
     617    } else if (Name == "a2" || Name == "a2q") { 
     618      CPU = Name; 
     619      return true; 
     620    } 
     621 
     622    return false; 
     623  } 
     624 
    582625  virtual void getTargetBuiltins(const Builtin::Info *&Records, 
    583626                                 unsigned &NumRecords) const { 
    584627    Records = BuiltinInfo; 
     
    742785    Builder.defineMacro("__VEC__", "10206"); 
    743786    Builder.defineMacro("__ALTIVEC__"); 
    744787  } 
     788 
     789  if (CPU == "440") { 
     790    Builder.defineMacro("_ARCH_440"); 
     791  } else if (CPU == "450") { 
     792    Builder.defineMacro("_ARCH_440"); 
     793    Builder.defineMacro("_ARCH_450"); 
     794  } else if (CPU == "440fp2") { 
     795    Builder.defineMacro("_ARCH_440"); 
     796    Builder.defineMacro("_ARCH_440D"); 
     797    Builder.defineMacro("_ARCH_440FP2"); 
     798  } else if (CPU == "450fp2") { 
     799    Builder.defineMacro("_ARCH_440"); 
     800    Builder.defineMacro("_ARCH_440D"); 
     801    Builder.defineMacro("_ARCH_440FP2"); 
     802    Builder.defineMacro("_ARCH_450"); 
     803    Builder.defineMacro("_ARCH_450D"); 
     804    Builder.defineMacro("_ARCH_450FP2"); 
     805  } else if (CPU == "a2q") { 
     806    Builder.defineMacro("_ARCH_QP"); 
     807  } 
     808 
     809  bool isBG = false; 
     810  if (getTriple().getVendor() == llvm::Triple::BGP) { 
     811    isBG = true; 
     812    Builder.defineMacro("__bgp__"); 
     813    Builder.defineMacro("__TOS_BGP__"); 
     814  } else if (getTriple().getVendor() == llvm::Triple::BGQ) { 
     815    isBG = true; 
     816    Builder.defineMacro("__bgq__"); 
     817    Builder.defineMacro("__TOS_BGQ__"); 
     818  } 
     819  if (isBG) { 
     820    Builder.defineMacro("__bg__"); 
     821    Builder.defineMacro("__THW_BLUEGENE__"); 
     822  } 
    745823} 
    746824 
    747825bool PPCTargetInfo::hasFeature(StringRef Feature) const { 
     
    40114089    switch (os) { 
    40124090    case llvm::Triple::Linux: 
    40134091      return new LinuxTargetInfo<PPC32TargetInfo>(T); 
     4092    case llvm::Triple::CNK: 
     4093      return new CNKTargetInfo<PPC32TargetInfo>(T); 
    40144094    case llvm::Triple::FreeBSD: 
    40154095      return new FreeBSDTargetInfo<PPC32TargetInfo>(T); 
    40164096    case llvm::Triple::NetBSD: 
  • lib/CodeGen/CGBuiltin.cpp

    diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp
    index 7592f31..86f6bcd 100644
    a b  
    51145114    llvm::Function *F = CGM.getIntrinsic(ID); 
    51155115    return Builder.CreateCall(F, Ops, ""); 
    51165116  } 
     5117 
     5118  // FP2 (Double Hummer) 
     5119  case PPC::BI__builtin_fp2_fpadd: 
     5120  case PPC::BI__builtin_fp2_fpsub: 
     5121  case PPC::BI__builtin_fp2_fpre: 
     5122  case PPC::BI__builtin_fp2_fprsqrte: 
     5123  case PPC::BI__builtin_fp2_fpmul: 
     5124  case PPC::BI__builtin_fp2_fxmul: 
     5125  case PPC::BI__builtin_fp2_fxpmul: 
     5126  case PPC::BI__builtin_fp2_fxsmul: 
     5127  case PPC::BI__builtin_fp2_fpmadd: 
     5128  case PPC::BI__builtin_fp2_fpnmadd: 
     5129  case PPC::BI__builtin_fp2_fpmsub: 
     5130  case PPC::BI__builtin_fp2_fpnmsub: 
     5131  case PPC::BI__builtin_fp2_fxmadd: 
     5132  case PPC::BI__builtin_fp2_fxnmadd: 
     5133  case PPC::BI__builtin_fp2_fxmsub: 
     5134  case PPC::BI__builtin_fp2_fxnmsub: 
     5135  case PPC::BI__builtin_fp2_fxcpmadd: 
     5136  case PPC::BI__builtin_fp2_fxcsmadd: 
     5137  case PPC::BI__builtin_fp2_fxcpnmadd: 
     5138  case PPC::BI__builtin_fp2_fxcsnmadd: 
     5139  case PPC::BI__builtin_fp2_fxcpmsub: 
     5140  case PPC::BI__builtin_fp2_fxcsmsub: 
     5141  case PPC::BI__builtin_fp2_fxcpnmsub: 
     5142  case PPC::BI__builtin_fp2_fxcsnmsub: 
     5143  case PPC::BI__builtin_fp2_fxcpnpma: 
     5144  case PPC::BI__builtin_fp2_fxcsnpma: 
     5145  case PPC::BI__builtin_fp2_fxcpnsma: 
     5146  case PPC::BI__builtin_fp2_fxcsnsma: 
     5147  case PPC::BI__builtin_fp2_fxcxnpma: 
     5148  case PPC::BI__builtin_fp2_fxcxnsma: 
     5149  case PPC::BI__builtin_fp2_fxcxma: 
     5150  case PPC::BI__builtin_fp2_fxcxnms: 
     5151  case PPC::BI__builtin_fp2_fpsel: 
     5152  case PPC::BI__builtin_fp2_fpctiw: 
     5153  case PPC::BI__builtin_fp2_fpctiwz: 
     5154  case PPC::BI__builtin_fp2_fprsp: 
     5155  case PPC::BI__builtin_fp2_fpneg: 
     5156  case PPC::BI__builtin_fp2_fpabs: 
     5157  case PPC::BI__builtin_fp2_fpnabs: 
     5158  case PPC::BI__builtin_fp2_fxmr: 
     5159  case PPC::BI__builtin_fp2_lfps: 
     5160  case PPC::BI__builtin_fp2_lfxs: 
     5161  case PPC::BI__builtin_fp2_lfpd: 
     5162  case PPC::BI__builtin_fp2_lfxd: 
     5163  case PPC::BI__builtin_fp2_stfps: 
     5164  case PPC::BI__builtin_fp2_stfxs: 
     5165  case PPC::BI__builtin_fp2_stfpd: 
     5166  case PPC::BI__builtin_fp2_stfxd: 
     5167  case PPC::BI__builtin_fp2_stfpiw: 
     5168  { 
     5169    switch (BuiltinID) { 
     5170    default: llvm_unreachable("Unsupported fp2 intrinsic!"); 
     5171    case PPC::BI__builtin_fp2_fpadd: 
     5172      ID = Intrinsic::ppc_fp2_fpadd; 
     5173      break; 
     5174    case PPC::BI__builtin_fp2_fpsub: 
     5175      ID = Intrinsic::ppc_fp2_fpsub; 
     5176      break; 
     5177    case PPC::BI__builtin_fp2_fpre: 
     5178      ID = Intrinsic::ppc_fp2_fpre; 
     5179      break; 
     5180    case PPC::BI__builtin_fp2_fprsqrte: 
     5181      ID = Intrinsic::ppc_fp2_fprsqrte; 
     5182      break; 
     5183    case PPC::BI__builtin_fp2_fpmul: 
     5184      ID = Intrinsic::ppc_fp2_fpmul; 
     5185      break; 
     5186    case PPC::BI__builtin_fp2_fxmul: 
     5187      ID = Intrinsic::ppc_fp2_fxmul; 
     5188      break; 
     5189    case PPC::BI__builtin_fp2_fxpmul: 
     5190      ID = Intrinsic::ppc_fp2_fxpmul; 
     5191      break; 
     5192    case PPC::BI__builtin_fp2_fxsmul: 
     5193      ID = Intrinsic::ppc_fp2_fxsmul; 
     5194      break; 
     5195    case PPC::BI__builtin_fp2_fpmadd: 
     5196      ID = Intrinsic::ppc_fp2_fpmadd; 
     5197      break; 
     5198    case PPC::BI__builtin_fp2_fpnmadd: 
     5199      ID = Intrinsic::ppc_fp2_fpnmadd; 
     5200      break; 
     5201    case PPC::BI__builtin_fp2_fpmsub: 
     5202      ID = Intrinsic::ppc_fp2_fpmsub; 
     5203      break; 
     5204    case PPC::BI__builtin_fp2_fpnmsub: 
     5205      ID = Intrinsic::ppc_fp2_fpnmsub; 
     5206      break; 
     5207    case PPC::BI__builtin_fp2_fxmadd: 
     5208      ID = Intrinsic::ppc_fp2_fxmadd; 
     5209      break; 
     5210    case PPC::BI__builtin_fp2_fxnmadd: 
     5211      ID = Intrinsic::ppc_fp2_fxnmadd; 
     5212      break; 
     5213    case PPC::BI__builtin_fp2_fxmsub: 
     5214      ID = Intrinsic::ppc_fp2_fxmsub; 
     5215      break; 
     5216    case PPC::BI__builtin_fp2_fxnmsub: 
     5217      ID = Intrinsic::ppc_fp2_fxnmsub; 
     5218      break; 
     5219    case PPC::BI__builtin_fp2_fxcpmadd: 
     5220      ID = Intrinsic::ppc_fp2_fxcpmadd; 
     5221      break; 
     5222    case PPC::BI__builtin_fp2_fxcsmadd: 
     5223      ID = Intrinsic::ppc_fp2_fxcsmadd; 
     5224      break; 
     5225    case PPC::BI__builtin_fp2_fxcpnmadd: 
     5226      ID = Intrinsic::ppc_fp2_fxcpnmadd; 
     5227      break; 
     5228    case PPC::BI__builtin_fp2_fxcsnmadd: 
     5229      ID = Intrinsic::ppc_fp2_fxcsnmadd; 
     5230      break; 
     5231    case PPC::BI__builtin_fp2_fxcpmsub: 
     5232      ID = Intrinsic::ppc_fp2_fxcpmsub; 
     5233      break; 
     5234    case PPC::BI__builtin_fp2_fxcsmsub: 
     5235      ID = Intrinsic::ppc_fp2_fxcsmsub; 
     5236      break; 
     5237    case PPC::BI__builtin_fp2_fxcpnmsub: 
     5238      ID = Intrinsic::ppc_fp2_fxcpnmsub; 
     5239      break; 
     5240    case PPC::BI__builtin_fp2_fxcsnmsub: 
     5241      ID = Intrinsic::ppc_fp2_fxcsnmsub; 
     5242      break; 
     5243    case PPC::BI__builtin_fp2_fxcpnpma: 
     5244      ID = Intrinsic::ppc_fp2_fxcpnpma; 
     5245      break; 
     5246    case PPC::BI__builtin_fp2_fxcsnpma: 
     5247      ID = Intrinsic::ppc_fp2_fxcsnpma; 
     5248      break; 
     5249    case PPC::BI__builtin_fp2_fxcpnsma: 
     5250      ID = Intrinsic::ppc_fp2_fxcpnsma; 
     5251      break; 
     5252    case PPC::BI__builtin_fp2_fxcsnsma: 
     5253      ID = Intrinsic::ppc_fp2_fxcsnsma; 
     5254      break; 
     5255    case PPC::BI__builtin_fp2_fxcxnpma: 
     5256      ID = Intrinsic::ppc_fp2_fxcxnpma; 
     5257      break; 
     5258    case PPC::BI__builtin_fp2_fxcxnsma: 
     5259      ID = Intrinsic::ppc_fp2_fxcxnsma; 
     5260      break; 
     5261    case PPC::BI__builtin_fp2_fxcxma: 
     5262      ID = Intrinsic::ppc_fp2_fxcxma; 
     5263      break; 
     5264    case PPC::BI__builtin_fp2_fxcxnms: 
     5265      ID = Intrinsic::ppc_fp2_fxcxnms; 
     5266      break; 
     5267    case PPC::BI__builtin_fp2_fpsel: 
     5268      ID = Intrinsic::ppc_fp2_fpsel; 
     5269      break; 
     5270    case PPC::BI__builtin_fp2_fpctiw: 
     5271      ID = Intrinsic::ppc_fp2_fpctiw; 
     5272      break; 
     5273    case PPC::BI__builtin_fp2_fpctiwz: 
     5274      ID = Intrinsic::ppc_fp2_fpctiwz; 
     5275      break; 
     5276    case PPC::BI__builtin_fp2_fprsp: 
     5277      ID = Intrinsic::ppc_fp2_fprsp; 
     5278      break; 
     5279    case PPC::BI__builtin_fp2_fpneg: 
     5280      ID = Intrinsic::ppc_fp2_fpneg; 
     5281      break; 
     5282    case PPC::BI__builtin_fp2_fpabs: 
     5283      ID = Intrinsic::ppc_fp2_fpabs; 
     5284      break; 
     5285    case PPC::BI__builtin_fp2_fpnabs: 
     5286      ID = Intrinsic::ppc_fp2_fpnabs; 
     5287      break; 
     5288    case PPC::BI__builtin_fp2_fxmr: 
     5289      ID = Intrinsic::ppc_fp2_fxmr; 
     5290      break; 
     5291    case PPC::BI__builtin_fp2_lfps: 
     5292      ID = Intrinsic::ppc_fp2_lfps; 
     5293      break; 
     5294    case PPC::BI__builtin_fp2_lfxs: 
     5295      ID = Intrinsic::ppc_fp2_lfxs; 
     5296      break; 
     5297    case PPC::BI__builtin_fp2_lfpd: 
     5298      ID = Intrinsic::ppc_fp2_lfpd; 
     5299      break; 
     5300    case PPC::BI__builtin_fp2_lfxd: 
     5301      ID = Intrinsic::ppc_fp2_lfxd; 
     5302      break; 
     5303    case PPC::BI__builtin_fp2_stfps: 
     5304      ID = Intrinsic::ppc_fp2_stfps; 
     5305      break; 
     5306    case PPC::BI__builtin_fp2_stfxs: 
     5307      ID = Intrinsic::ppc_fp2_stfxs; 
     5308      break; 
     5309    case PPC::BI__builtin_fp2_stfpd: 
     5310      ID = Intrinsic::ppc_fp2_stfpd; 
     5311      break; 
     5312    case PPC::BI__builtin_fp2_stfxd: 
     5313      ID = Intrinsic::ppc_fp2_stfxd; 
     5314      break; 
     5315    case PPC::BI__builtin_fp2_stfpiw: 
     5316      ID = Intrinsic::ppc_fp2_stfpiw; 
     5317      break; 
     5318    } 
     5319    llvm::Function *F = CGM.getIntrinsic(ID); 
     5320    return Builder.CreateCall(F, Ops, ""); 
     5321  } 
     5322 
     5323  // QPX 
     5324  case PPC::BI__builtin_qpx_qvfabs: 
     5325  case PPC::BI__builtin_qpx_qvfctid: 
     5326  case PPC::BI__builtin_qpx_qvfcfid: 
     5327  case PPC::BI__builtin_qpx_qvfcfidu: 
     5328  case PPC::BI__builtin_qpx_qvfctidu: 
     5329  case PPC::BI__builtin_qpx_qvfctiduz: 
     5330  case PPC::BI__builtin_qpx_qvfctidz: 
     5331  case PPC::BI__builtin_qpx_qvfctiw: 
     5332  case PPC::BI__builtin_qpx_qvfctiwu: 
     5333  case PPC::BI__builtin_qpx_qvfctiwuz: 
     5334  case PPC::BI__builtin_qpx_qvfctiwz: 
     5335  case PPC::BI__builtin_qpx_qvfnabs: 
     5336  case PPC::BI__builtin_qpx_qvfneg: 
     5337  case PPC::BI__builtin_qpx_qvfre: 
     5338  case PPC::BI__builtin_qpx_qvfres: 
     5339  case PPC::BI__builtin_qpx_qvfrim: 
     5340  case PPC::BI__builtin_qpx_qvfrin: 
     5341  case PPC::BI__builtin_qpx_qvfrip: 
     5342  case PPC::BI__builtin_qpx_qvfriz: 
     5343  case PPC::BI__builtin_qpx_qvfrsp: 
     5344  case PPC::BI__builtin_qpx_qvfrsqrte: 
     5345  case PPC::BI__builtin_qpx_qvfrsqrtes: 
     5346  case PPC::BI__builtin_qpx_qvfadd: 
     5347  case PPC::BI__builtin_qpx_qvfcmpeq: 
     5348  case PPC::BI__builtin_qpx_qvfcmpgt: 
     5349  case PPC::BI__builtin_qpx_qvfcmplt: 
     5350  case PPC::BI__builtin_qpx_qvfcpsgn: 
     5351  case PPC::BI__builtin_qpx_qvfmadd: 
     5352  case PPC::BI__builtin_qpx_qvfmsub: 
     5353  case PPC::BI__builtin_qpx_qvfmul: 
     5354  case PPC::BI__builtin_qpx_qvfnmadd: 
     5355  case PPC::BI__builtin_qpx_qvfnmsub: 
     5356  case PPC::BI__builtin_qpx_qvfsel: 
     5357  case PPC::BI__builtin_qpx_qvfsub: 
     5358  case PPC::BI__builtin_qpx_qvftstnan: 
     5359  case PPC::BI__builtin_qpx_qvfxmadd: 
     5360  case PPC::BI__builtin_qpx_qvfxmul: 
     5361  case PPC::BI__builtin_qpx_qvfxxcpnmadd: 
     5362  case PPC::BI__builtin_qpx_qvfxxmadd: 
     5363  case PPC::BI__builtin_qpx_qvfxxnpmadd: 
     5364  case PPC::BI__builtin_qpx_qvflogical: 
     5365  case PPC::BI__builtin_qpx_qvfperm: 
     5366  case PPC::BI__builtin_qpx_qvlpcld: 
     5367  case PPC::BI__builtin_qpx_qvlpcls: 
     5368  case PPC::BI__builtin_qpx_qvlpcrd: 
     5369  case PPC::BI__builtin_qpx_qvlpcrs: 
     5370  case PPC::BI__builtin_qpx_qvgpci: 
     5371  case PPC::BI__builtin_qpx_qvlfcda: 
     5372  case PPC::BI__builtin_qpx_qvlfcd: 
     5373  case PPC::BI__builtin_qpx_qvlfcsa: 
     5374  case PPC::BI__builtin_qpx_qvlfcs: 
     5375  case PPC::BI__builtin_qpx_qvlfda: 
     5376  case PPC::BI__builtin_qpx_qvlfd: 
     5377  case PPC::BI__builtin_qpx_qvlfiwaa: 
     5378  case PPC::BI__builtin_qpx_qvlfiwa: 
     5379  case PPC::BI__builtin_qpx_qvlfiwza: 
     5380  case PPC::BI__builtin_qpx_qvlfiwz: 
     5381  case PPC::BI__builtin_qpx_qvlfsa: 
     5382  case PPC::BI__builtin_qpx_qvlfs: 
     5383  case PPC::BI__builtin_qpx_qvstfcda: 
     5384  case PPC::BI__builtin_qpx_qvstfcd: 
     5385  case PPC::BI__builtin_qpx_qvstfcsa: 
     5386  case PPC::BI__builtin_qpx_qvstfcs: 
     5387  case PPC::BI__builtin_qpx_qvstfda: 
     5388  case PPC::BI__builtin_qpx_qvstfd: 
     5389  case PPC::BI__builtin_qpx_qvstfiwa: 
     5390  case PPC::BI__builtin_qpx_qvstfiw: 
     5391  case PPC::BI__builtin_qpx_qvstfsa: 
     5392  case PPC::BI__builtin_qpx_qvstfs: 
     5393  { 
     5394    switch (BuiltinID) { 
     5395    default: llvm_unreachable("Unsupported qpx intrinsic!"); 
     5396    case PPC::BI__builtin_qpx_qvfabs: 
     5397      ID = Intrinsic::ppc_qpx_qvfabs; 
     5398      break; 
     5399    case PPC::BI__builtin_qpx_qvfctid: 
     5400      ID = Intrinsic::ppc_qpx_qvfctid; 
     5401      break; 
     5402    case PPC::BI__builtin_qpx_qvfcfid: 
     5403      ID = Intrinsic::ppc_qpx_qvfcfid; 
     5404      break; 
     5405    case PPC::BI__builtin_qpx_qvfcfidu: 
     5406      ID = Intrinsic::ppc_qpx_qvfcfidu; 
     5407      break; 
     5408    case PPC::BI__builtin_qpx_qvfctidu: 
     5409      ID = Intrinsic::ppc_qpx_qvfctidu; 
     5410      break; 
     5411    case PPC::BI__builtin_qpx_qvfctiduz: 
     5412      ID = Intrinsic::ppc_qpx_qvfctiduz; 
     5413      break; 
     5414    case PPC::BI__builtin_qpx_qvfctidz: 
     5415      ID = Intrinsic::ppc_qpx_qvfctidz; 
     5416      break; 
     5417    case PPC::BI__builtin_qpx_qvfctiw: 
     5418      ID = Intrinsic::ppc_qpx_qvfctiw; 
     5419      break; 
     5420    case PPC::BI__builtin_qpx_qvfctiwu: 
     5421      ID = Intrinsic::ppc_qpx_qvfctiwu; 
     5422      break; 
     5423    case PPC::BI__builtin_qpx_qvfctiwuz: 
     5424      ID = Intrinsic::ppc_qpx_qvfctiwuz; 
     5425      break; 
     5426    case PPC::BI__builtin_qpx_qvfctiwz: 
     5427      ID = Intrinsic::ppc_qpx_qvfctiwz; 
     5428      break; 
     5429    case PPC::BI__builtin_qpx_qvfnabs: 
     5430      ID = Intrinsic::ppc_qpx_qvfnabs; 
     5431      break; 
     5432    case PPC::BI__builtin_qpx_qvfneg: 
     5433      ID = Intrinsic::ppc_qpx_qvfneg; 
     5434      break; 
     5435    case PPC::BI__builtin_qpx_qvfre: 
     5436      ID = Intrinsic::ppc_qpx_qvfre; 
     5437      break; 
     5438    case PPC::BI__builtin_qpx_qvfres: 
     5439      ID = Intrinsic::ppc_qpx_qvfres; 
     5440      break; 
     5441    case PPC::BI__builtin_qpx_qvfrim: 
     5442      ID = Intrinsic::ppc_qpx_qvfrim; 
     5443      break; 
     5444    case PPC::BI__builtin_qpx_qvfrin: 
     5445      ID = Intrinsic::ppc_qpx_qvfrin; 
     5446      break; 
     5447    case PPC::BI__builtin_qpx_qvfrip: 
     5448      ID = Intrinsic::ppc_qpx_qvfrip; 
     5449      break; 
     5450    case PPC::BI__builtin_qpx_qvfriz: 
     5451      ID = Intrinsic::ppc_qpx_qvfriz; 
     5452      break; 
     5453    case PPC::BI__builtin_qpx_qvfrsp: 
     5454      ID = Intrinsic::ppc_qpx_qvfrsp; 
     5455      break; 
     5456    case PPC::BI__builtin_qpx_qvfrsqrte: 
     5457      ID = Intrinsic::ppc_qpx_qvfrsqrte; 
     5458      break; 
     5459    case PPC::BI__builtin_qpx_qvfrsqrtes: 
     5460      ID = Intrinsic::ppc_qpx_qvfrsqrtes; 
     5461      break; 
     5462    case PPC::BI__builtin_qpx_qvfadd: 
     5463      ID = Intrinsic::ppc_qpx_qvfadd; 
     5464      break; 
     5465    case PPC::BI__builtin_qpx_qvfcmpeq: 
     5466      ID = Intrinsic::ppc_qpx_qvfcmpeq; 
     5467      break; 
     5468    case PPC::BI__builtin_qpx_qvfcmpgt: 
     5469      ID = Intrinsic::ppc_qpx_qvfcmpgt; 
     5470      break; 
     5471    case PPC::BI__builtin_qpx_qvfcmplt: 
     5472      ID = Intrinsic::ppc_qpx_qvfcmplt; 
     5473      break; 
     5474    case PPC::BI__builtin_qpx_qvfcpsgn: 
     5475      ID = Intrinsic::ppc_qpx_qvfcpsgn; 
     5476      break; 
     5477    case PPC::BI__builtin_qpx_qvfmadd: 
     5478      ID = Intrinsic::ppc_qpx_qvfmadd; 
     5479      break; 
     5480    case PPC::BI__builtin_qpx_qvfmsub: 
     5481      ID = Intrinsic::ppc_qpx_qvfmsub; 
     5482      break; 
     5483    case PPC::BI__builtin_qpx_qvfmul: 
     5484      ID = Intrinsic::ppc_qpx_qvfmul; 
     5485      break; 
     5486    case PPC::BI__builtin_qpx_qvfnmadd: 
     5487      ID = Intrinsic::ppc_qpx_qvfnmadd; 
     5488      break; 
     5489    case PPC::BI__builtin_qpx_qvfnmsub: 
     5490      ID = Intrinsic::ppc_qpx_qvfnmsub; 
     5491      break; 
     5492    case PPC::BI__builtin_qpx_qvfsel: 
     5493      ID = Intrinsic::ppc_qpx_qvfsel; 
     5494      break; 
     5495    case PPC::BI__builtin_qpx_qvfsub: 
     5496      ID = Intrinsic::ppc_qpx_qvfsub; 
     5497      break; 
     5498    case PPC::BI__builtin_qpx_qvftstnan: 
     5499      ID = Intrinsic::ppc_qpx_qvftstnan; 
     5500      break; 
     5501    case PPC::BI__builtin_qpx_qvfxmadd: 
     5502      ID = Intrinsic::ppc_qpx_qvfxmadd; 
     5503      break; 
     5504    case PPC::BI__builtin_qpx_qvfxmul: 
     5505      ID = Intrinsic::ppc_qpx_qvfxmul; 
     5506      break; 
     5507    case PPC::BI__builtin_qpx_qvfxxcpnmadd: 
     5508      ID = Intrinsic::ppc_qpx_qvfxxcpnmadd; 
     5509      break; 
     5510    case PPC::BI__builtin_qpx_qvfxxmadd: 
     5511      ID = Intrinsic::ppc_qpx_qvfxxmadd; 
     5512      break; 
     5513    case PPC::BI__builtin_qpx_qvfxxnpmadd: 
     5514      ID = Intrinsic::ppc_qpx_qvfxxnpmadd; 
     5515      break; 
     5516    case PPC::BI__builtin_qpx_qvflogical: 
     5517      ID = Intrinsic::ppc_qpx_qvflogical; 
     5518      break; 
     5519    case PPC::BI__builtin_qpx_qvfperm: 
     5520      ID = Intrinsic::ppc_qpx_qvfperm; 
     5521      break; 
     5522    case PPC::BI__builtin_qpx_qvlpcld: 
     5523      ID = Intrinsic::ppc_qpx_qvlpcld; 
     5524      break; 
     5525    case PPC::BI__builtin_qpx_qvlpcls: 
     5526      ID = Intrinsic::ppc_qpx_qvlpcls; 
     5527      break; 
     5528    case PPC::BI__builtin_qpx_qvlpcrd: 
     5529      ID = Intrinsic::ppc_qpx_qvlpcrd; 
     5530      break; 
     5531    case PPC::BI__builtin_qpx_qvlpcrs: 
     5532      ID = Intrinsic::ppc_qpx_qvlpcrs; 
     5533      break; 
     5534    case PPC::BI__builtin_qpx_qvgpci: 
     5535      ID = Intrinsic::ppc_qpx_qvgpci; 
     5536      break; 
     5537    case PPC::BI__builtin_qpx_qvlfcda: 
     5538      ID = Intrinsic::ppc_qpx_qvlfcda; 
     5539      break; 
     5540    case PPC::BI__builtin_qpx_qvlfcd: 
     5541      ID = Intrinsic::ppc_qpx_qvlfcd; 
     5542      break; 
     5543    case PPC::BI__builtin_qpx_qvlfcsa: 
     5544      ID = Intrinsic::ppc_qpx_qvlfcsa; 
     5545      break; 
     5546    case PPC::BI__builtin_qpx_qvlfcs: 
     5547      ID = Intrinsic::ppc_qpx_qvlfcs; 
     5548      break; 
     5549    case PPC::BI__builtin_qpx_qvlfda: 
     5550      ID = Intrinsic::ppc_qpx_qvlfda; 
     5551      break; 
     5552    case PPC::BI__builtin_qpx_qvlfd: 
     5553      ID = Intrinsic::ppc_qpx_qvlfd; 
     5554      break; 
     5555    case PPC::BI__builtin_qpx_qvlfiwaa: 
     5556      ID = Intrinsic::ppc_qpx_qvlfiwaa; 
     5557      break; 
     5558    case PPC::BI__builtin_qpx_qvlfiwa: 
     5559      ID = Intrinsic::ppc_qpx_qvlfiwa; 
     5560      break; 
     5561    case PPC::BI__builtin_qpx_qvlfiwza: 
     5562      ID = Intrinsic::ppc_qpx_qvlfiwza; 
     5563      break; 
     5564    case PPC::BI__builtin_qpx_qvlfiwz: 
     5565      ID = Intrinsic::ppc_qpx_qvlfiwz; 
     5566      break; 
     5567    case PPC::BI__builtin_qpx_qvlfsa: 
     5568      ID = Intrinsic::ppc_qpx_qvlfsa; 
     5569      break; 
     5570    case PPC::BI__builtin_qpx_qvlfs: 
     5571      ID = Intrinsic::ppc_qpx_qvlfs; 
     5572      break; 
     5573    case PPC::BI__builtin_qpx_qvstfcda: 
     5574      ID = Intrinsic::ppc_qpx_qvstfcda; 
     5575      break; 
     5576    case PPC::BI__builtin_qpx_qvstfcd: 
     5577      ID = Intrinsic::ppc_qpx_qvstfcd; 
     5578      break; 
     5579    case PPC::BI__builtin_qpx_qvstfcsa: 
     5580      ID = Intrinsic::ppc_qpx_qvstfcsa; 
     5581      break; 
     5582    case PPC::BI__builtin_qpx_qvstfcs: 
     5583      ID = Intrinsic::ppc_qpx_qvstfcs; 
     5584      break; 
     5585    case PPC::BI__builtin_qpx_qvstfda: 
     5586      ID = Intrinsic::ppc_qpx_qvstfda; 
     5587      break; 
     5588    case PPC::BI__builtin_qpx_qvstfd: 
     5589      ID = Intrinsic::ppc_qpx_qvstfd; 
     5590      break; 
     5591    case PPC::BI__builtin_qpx_qvstfiwa: 
     5592      ID = Intrinsic::ppc_qpx_qvstfiwa; 
     5593      break; 
     5594    case PPC::BI__builtin_qpx_qvstfiw: 
     5595      ID = Intrinsic::ppc_qpx_qvstfiw; 
     5596      break; 
     5597    case PPC::BI__builtin_qpx_qvstfsa: 
     5598      ID = Intrinsic::ppc_qpx_qvstfsa; 
     5599      break; 
     5600    case PPC::BI__builtin_qpx_qvstfs: 
     5601      ID = Intrinsic::ppc_qpx_qvstfs; 
     5602      break; 
     5603    } 
     5604    llvm::Function *F = CGM.getIntrinsic(ID); 
     5605    return Builder.CreateCall(F, Ops, ""); 
     5606  } 
    51175607  } 
    51185608} 
  • lib/Driver/Driver.cpp

    diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
    index 3ddac69..42bb75d 100644
    a b  
    16831683    case llvm::Triple::Minix: 
    16841684      TC = new toolchains::Minix(*this, Target, Args); 
    16851685      break; 
     1686    case llvm::Triple::CNK: 
     1687      // fall through: same as Linux 
    16861688    case llvm::Triple::Linux: 
    16871689      if (Target.getArch() == llvm::Triple::hexagon) 
    16881690        TC = new toolchains::Hexagon_TC(*this, Target); 
  • lib/Driver/ToolChains.cpp

    diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
    index 27102d8..b60bdea 100644
    a b  
    19881988Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) 
    19891989  : Generic_ELF(D, Triple, Args) { 
    19901990  llvm::Triple::ArchType Arch = Triple.getArch(); 
     1991 
    19911992  const std::string &SysRoot = getDriver().SysRoot; 
    19921993 
    19931994  // OpenSuse stores the linker with the compiler, add that to the search 
    1994   // path. 
     1995  // path. This is needed for the BG/P as well. 
    19951996  ToolChain::path_list &PPaths = getProgramPaths(); 
    19961997  PPaths.push_back(Twine(GCCInstallation.getParentLibPath() + "/../" + 
    19971998                         GCCInstallation.getTriple().str() + "/bin").str()); 
  • lib/Driver/Tools.cpp

    diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
    index 3d17c81..ea9a904 100644
    a b  
    892892  } 
    893893} 
    894894 
     895void Clang::AddPPCTargetArgs(const ArgList &Args, 
     896                             ArgStringList &CmdArgs) const { 
     897  // Set target cpu. 
     898  if (Arg *A = Args.getLastArg(options::OPT_mcpu_EQ)) { 
     899    const char *CPUName; 
     900    CPUName = A->getValue(Args); 
     901 
     902    CmdArgs.push_back("-target-cpu"); 
     903    CmdArgs.push_back(CPUName); 
     904  } 
     905} 
     906  
     907  
    895908void Clang::AddSparcTargetArgs(const ArgList &Args, 
    896909                             ArgStringList &CmdArgs) const { 
    897910  const Driver &D = getToolChain().getDriver(); 
     
    17471760    AddMIPSTargetArgs(Args, CmdArgs); 
    17481761    break; 
    17491762 
     1763  case llvm::Triple::ppc: 
     1764  case llvm::Triple::ppc64: 
     1765    AddPPCTargetArgs(Args, CmdArgs); 
     1766    break; 
     1767 
    17501768  case llvm::Triple::sparc: 
    17511769    AddSparcTargetArgs(Args, CmdArgs); 
    17521770    break; 
     
    50975115      CmdArgs.push_back("-EL"); 
    50985116  } 
    50995117 
    5100   Args.AddLastArg(CmdArgs, options::OPT_march_EQ); 
    5101   Args.AddLastArg(CmdArgs, options::OPT_mcpu_EQ); 
    5102   Args.AddLastArg(CmdArgs, options::OPT_mfpu_EQ); 
     5118  if (getToolChain().getArch() != llvm::Triple::ppc && 
     5119      getToolChain().getArch() != llvm::Triple::ppc64) { 
     5120    Args.AddLastArg(CmdArgs, options::OPT_march_EQ); 
     5121    Args.AddLastArg(CmdArgs, options::OPT_mcpu_EQ); 
     5122    Args.AddLastArg(CmdArgs, options::OPT_mfpu_EQ); 
     5123  } 
    51035124 
    51045125  Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, 
    51055126                       options::OPT_Xassembler); 
  • lib/Driver/Tools.h

    diff --git a/lib/Driver/Tools.h b/lib/Driver/Tools.h
    index 651a8f2..aa15f35 100644
    a b  
    3939    void AddARMTargetArgs(const ArgList &Args, ArgStringList &CmdArgs, 
    4040                          bool KernelOrKext) const; 
    4141    void AddMIPSTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const; 
     42    void AddPPCTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const; 
    4243    void AddSparcTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const; 
    4344    void AddX86TargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const; 
    4445    void AddHexagonTargetArgs (const ArgList &Args, ArgStringList &CmdArgs) const; 
  • (a) /dev/null vs. (b) b/lib/Headers/fp2intrin.h

    diff --git a/lib/Headers/fp2intrin.h b/lib/Headers/fp2intrin.h
    new file mode 100644
    index 0000000..1f59249
    a b  
     1/*===---- fp2intrin.h - PPC FP2 (Double Hummer) intrinsics -----------------=== 
     2 * 
     3 * Permission is hereby granted, free of charge, to any person obtaining a copy 
     4 * of this software and associated documentation files (the "Software"), to deal 
     5 * in the Software without restriction, including without limitation the rights 
     6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
     7 * copies of the Software, and to permit persons to whom the Software is 
     8 * furnished to do so, subject to the following conditions: 
     9 * 
     10 * The above copyright notice and this permission notice shall be included in 
     11 * all copies or substantial portions of the Software. 
     12 * 
     13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
     14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
     15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
     16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
     17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
     18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
     19 * THE SOFTWARE. 
     20 * 
     21 *===-----------------------------------------------------------------------=== 
     22 */ 
     23 
     24#ifndef _FP2INTRIN_H_INCLUDED 
     25#define _FP2INTRIN_H_INCLUDED 
     26 
     27typedef double __v2df __attribute__((__vector_size__(16))); 
     28 
     29static __inline__ float _Complex __attribute__((__always_inline__, __nodebug__)) 
     30__cmplxf (float a, float b) { 
     31  float _Complex r = { a, b }; 
     32  return r; 
     33} 
     34 
     35static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     36__cmplx (double a, double b) { 
     37  double _Complex r = { a, b }; 
     38  return r; 
     39} 
     40 
     41static __inline__ long double _Complex __attribute__((__always_inline__, __nodebug__)) 
     42__cmplxl (long double a, long double b) { 
     43  long double _Complex r = { a, b }; 
     44  return r; 
     45} 
     46 
     47static __inline__ float __attribute__((__always_inline__, __nodebug__)) 
     48__crealf (float _Complex a) { 
     49  return __real__ a; 
     50} 
     51 
     52static __inline__ double __attribute__((__always_inline__, __nodebug__)) 
     53__creal (double _Complex a) { 
     54  return __real__ a; 
     55} 
     56 
     57static __inline__ long double __attribute__((__always_inline__, __nodebug__)) 
     58__creall (long double _Complex a) { 
     59  return __real__ a; 
     60} 
     61 
     62static __inline__ float __attribute__((__always_inline__, __nodebug__)) 
     63__cimagf (float _Complex a) { 
     64  return __imag__ a; 
     65} 
     66 
     67static __inline__ double __attribute__((__always_inline__, __nodebug__)) 
     68__cimag (double _Complex a) { 
     69  return __imag__ a; 
     70} 
     71 
     72static __inline__ long double __attribute__((__always_inline__, __nodebug__)) 
     73__cimagl (long double _Complex a) { 
     74  return __imag__ a; 
     75} 
     76 
     77static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     78__lfps (const float * a) { 
     79  __v2df b_ = __builtin_fp2_lfps(a); 
     80  return *((double _Complex *) &b_); 
     81} 
     82 
     83static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     84__lfxs (const float * a) { 
     85  __v2df b_ = __builtin_fp2_lfxs(a); 
     86  return *((double _Complex *) &b_); 
     87} 
     88 
     89static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     90__lfpd (const double * a) { 
     91  __v2df b_ = __builtin_fp2_lfpd(a); 
     92  return *((double _Complex *) &b_); 
     93} 
     94 
     95static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     96__lfxd (const double * a) { 
     97  __v2df b_ = __builtin_fp2_lfxd(a); 
     98  return *((double _Complex *) &b_); 
     99} 
     100 
     101static __inline__ void __attribute__((__always_inline__, __nodebug__)) 
     102__stfps (float * b, double _Complex a) { 
     103  __builtin_fp2_stfps(*((__v2df *) &a), b); 
     104} 
     105 
     106static __inline__ void __attribute__((__always_inline__, __nodebug__)) 
     107__stfxs (float * b, double _Complex a) { 
     108  __builtin_fp2_stfxs(*((__v2df *) &a), b); 
     109} 
     110 
     111static __inline__ void __attribute__((__always_inline__, __nodebug__)) 
     112__stfpd (double * b, double _Complex a) { 
     113  __builtin_fp2_stfpd(*((__v2df *) &a), b); 
     114} 
     115 
     116static __inline__ void __attribute__((__always_inline__, __nodebug__)) 
     117__stfxd (double * b, double _Complex a) { 
     118  __builtin_fp2_stfxd(*((__v2df *) &a), b); 
     119} 
     120 
     121static __inline__ void __attribute__((__always_inline__, __nodebug__)) 
     122__stfpiw (int * b, double _Complex a) { 
     123  __builtin_fp2_stfpiw(*((__v2df *) &a), b); 
     124} 
     125 
     126static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     127__fxmr (double _Complex a) { 
     128  __v2df b_ = __builtin_fp2_fxmr(*((__v2df *) &a)); 
     129  return *((double _Complex *) &b_); 
     130} 
     131 
     132static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     133__fpctiw (double _Complex a) { 
     134  __v2df b_ = __builtin_fp2_fpctiw(*((__v2df *) &a)); 
     135  return *((double _Complex *) &b_); 
     136} 
     137 
     138static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     139__fpctiwz (double _Complex a) { 
     140  __v2df b_ = __builtin_fp2_fpctiwz(*((__v2df *) &a)); 
     141  return *((double _Complex *) &b_); 
     142} 
     143 
     144static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     145__fprsp (double _Complex a) { 
     146  __v2df b_ = __builtin_fp2_fprsp(*((__v2df *) &a)); 
     147  return *((double _Complex *) &b_); 
     148} 
     149 
     150static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     151__fpre (double _Complex a) { 
     152  __v2df b_ = __builtin_fp2_fpre(*((__v2df *) &a)); 
     153  return *((double _Complex *) &b_); 
     154} 
     155 
     156static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     157__fprsqrte (double _Complex a) { 
     158  __v2df b_ = __builtin_fp2_fprsqrte(*((__v2df *) &a)); 
     159  return *((double _Complex *) &b_); 
     160} 
     161 
     162static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     163__fpneg (double _Complex a) { 
     164  __v2df b_ = __builtin_fp2_fpneg(*((__v2df *) &a)); 
     165  return *((double _Complex *) &b_); 
     166} 
     167 
     168static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     169__fpabs (double _Complex a) { 
     170  __v2df b_ = __builtin_fp2_fpabs(*((__v2df *) &a)); 
     171  return *((double _Complex *) &b_); 
     172} 
     173 
     174static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     175__fpnabs (double _Complex a) { 
     176  __v2df b_ = __builtin_fp2_fpnabs(*((__v2df *) &a)); 
     177  return *((double _Complex *) &b_); 
     178} 
     179 
     180static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     181__fpadd (double _Complex a, double _Complex b) { 
     182  __v2df c_ = __builtin_fp2_fpadd(*((__v2df *) &a), *((__v2df *) &b)); 
     183  return *((double _Complex *) &c_); 
     184} 
     185 
     186static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     187__fpsub (double _Complex a, double _Complex b) { 
     188  __v2df c_ = __builtin_fp2_fpsub(*((__v2df *) &a), *((__v2df *) &b)); 
     189  return *((double _Complex *) &c_); 
     190} 
     191 
     192static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     193__fpmul (double _Complex a, double _Complex b) { 
     194  __v2df c_ = __builtin_fp2_fpmul(*((__v2df *) &a), *((__v2df *) &b)); 
     195  return *((double _Complex *) &c_); 
     196} 
     197 
     198static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     199__fxmul (double _Complex a, double _Complex b) { 
     200  __v2df c_ = __builtin_fp2_fxmul(*((__v2df *) &a), *((__v2df *) &b)); 
     201  return *((double _Complex *) &c_); 
     202} 
     203 
     204static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     205__fxpmul (double _Complex a, double _Complex b) { 
     206  __v2df c_ = __builtin_fp2_fxpmul(*((__v2df *) &a), *((__v2df *) &b)); 
     207  return *((double _Complex *) &c_); 
     208} 
     209 
     210static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     211__fxsmul (double _Complex a, double _Complex b) { 
     212  __v2df c_ = __builtin_fp2_fxsmul(*((__v2df *) &a), *((__v2df *) &b)); 
     213  return *((double _Complex *) &c_); 
     214} 
     215 
     216static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     217__fpmadd (double _Complex a, double _Complex b, double _Complex c) { 
     218  __v2df d_ = __builtin_fp2_fpmadd(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     219  return *((double _Complex *) &d_); 
     220} 
     221 
     222static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     223__fpnmadd (double _Complex a, double _Complex b, double _Complex c) { 
     224  __v2df d_ = __builtin_fp2_fpnmadd(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     225  return *((double _Complex *) &d_); 
     226} 
     227 
     228static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     229__fpmsub (double _Complex a, double _Complex b, double _Complex c) { 
     230  __v2df d_ = __builtin_fp2_fpmsub(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     231  return *((double _Complex *) &d_); 
     232} 
     233 
     234static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     235__fpnmsub (double _Complex a, double _Complex b, double _Complex c) { 
     236  __v2df d_ = __builtin_fp2_fpnmsub(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     237  return *((double _Complex *) &d_); 
     238} 
     239 
     240static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     241__fxmadd (double _Complex a, double _Complex b, double _Complex c) { 
     242  __v2df d_ = __builtin_fp2_fxmadd(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     243  return *((double _Complex *) &d_); 
     244} 
     245 
     246static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     247__fxnmadd (double _Complex a, double _Complex b, double _Complex c) { 
     248  __v2df d_ = __builtin_fp2_fxnmadd(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     249  return *((double _Complex *) &d_); 
     250} 
     251 
     252static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     253__fxmsub (double _Complex a, double _Complex b, double _Complex c) { 
     254  __v2df d_ = __builtin_fp2_fxmsub(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     255  return *((double _Complex *) &d_); 
     256} 
     257 
     258static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     259__fxnmsub (double _Complex a, double _Complex b, double _Complex c) { 
     260  __v2df d_ = __builtin_fp2_fxnmsub(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     261  return *((double _Complex *) &d_); 
     262} 
     263 
     264static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     265__fxcpmadd (double _Complex a, double _Complex b, double _Complex c) { 
     266  __v2df d_ = __builtin_fp2_fxcpmadd(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     267  return *((double _Complex *) &d_); 
     268} 
     269 
     270static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     271__fxcsmadd (double _Complex a, double _Complex b, double _Complex c) { 
     272  __v2df d_ = __builtin_fp2_fxcsmadd(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     273  return *((double _Complex *) &d_); 
     274} 
     275 
     276static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     277__fxcpnmadd (double _Complex a, double _Complex b, double _Complex c) { 
     278  __v2df d_ = __builtin_fp2_fxcpnmadd(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     279  return *((double _Complex *) &d_); 
     280} 
     281 
     282static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     283__fxcsnmadd (double _Complex a, double _Complex b, double _Complex c) { 
     284  __v2df d_ = __builtin_fp2_fxcsnmadd(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     285  return *((double _Complex *) &d_); 
     286} 
     287 
     288static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     289__fxcpmsub (double _Complex a, double _Complex b, double _Complex c) { 
     290  __v2df d_ = __builtin_fp2_fxcpmsub(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     291  return *((double _Complex *) &d_); 
     292} 
     293 
     294static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     295__fxcsmsub (double _Complex a, double _Complex b, double _Complex c) { 
     296  __v2df d_ = __builtin_fp2_fxcsmsub(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     297  return *((double _Complex *) &d_); 
     298} 
     299 
     300static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     301__fxcpnmsub (double _Complex a, double _Complex b, double _Complex c) { 
     302  __v2df d_ = __builtin_fp2_fxcpnmsub(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     303  return *((double _Complex *) &d_); 
     304} 
     305 
     306static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     307__fxcsnmsub (double _Complex a, double _Complex b, double _Complex c) { 
     308  __v2df d_ = __builtin_fp2_fxcsnmsub(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     309  return *((double _Complex *) &d_); 
     310} 
     311 
     312static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     313__fxcpnpma (double _Complex a, double _Complex b, double _Complex c) { 
     314  __v2df d_ = __builtin_fp2_fxcpnpma(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     315  return *((double _Complex *) &d_); 
     316} 
     317 
     318static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     319__fxcsnpma (double _Complex a, double _Complex b, double _Complex c) { 
     320  __v2df d_ = __builtin_fp2_fxcsnpma(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     321  return *((double _Complex *) &d_); 
     322} 
     323 
     324static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     325__fxcpnsma (double _Complex a, double _Complex b, double _Complex c) { 
     326  __v2df d_ = __builtin_fp2_fxcpnsma(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     327  return *((double _Complex *) &d_); 
     328} 
     329 
     330static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     331__fxcsnsma (double _Complex a, double _Complex b, double _Complex c) { 
     332  __v2df d_ = __builtin_fp2_fxcsnsma(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     333  return *((double _Complex *) &d_); 
     334} 
     335 
     336static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     337__fxcxma (double _Complex a, double _Complex b, double _Complex c) { 
     338  __v2df d_ = __builtin_fp2_fxcxma(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     339  return *((double _Complex *) &d_); 
     340} 
     341 
     342static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     343__fxcxnms (double _Complex a, double _Complex b, double _Complex c) { 
     344  __v2df d_ = __builtin_fp2_fxcxnms(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     345  return *((double _Complex *) &d_); 
     346} 
     347 
     348static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     349__fxcxnpma (double _Complex a, double _Complex b, double _Complex c) { 
     350  __v2df d_ = __builtin_fp2_fxcxnpma(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     351  return *((double _Complex *) &d_); 
     352} 
     353 
     354static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     355__fxcxnsma (double _Complex a, double _Complex b, double _Complex c) { 
     356  __v2df d_ = __builtin_fp2_fxcxnsma(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     357  return *((double _Complex *) &d_); 
     358} 
     359 
     360static __inline__ double _Complex __attribute__((__always_inline__, __nodebug__)) 
     361__fpsel (double _Complex a, double _Complex b, double _Complex c) { 
     362  __v2df d_ = __builtin_fp2_fpsel(*((__v2df *) &a), *((__v2df *) &b), *((__v2df *) &c)); 
     363  return *((double _Complex *) &d_); 
     364} 
     365 
     366#endif 
     367 
  • (a) /dev/null vs. (b) b/lib/Headers/qpxintrin.h

    diff --git a/lib/Headers/qpxintrin.h b/lib/Headers/qpxintrin.h
    new file mode 100644
    index 0000000..99ea3d4
    a b  
     1/*===---- qpxintrin.h - PPC QPX intrinsics ---------------------------------=== 
     2 * 
     3 * Permission is hereby granted, free of charge, to any person obtaining a copy 
     4 * of this software and associated documentation files (the "Software"), to deal 
     5 * in the Software without restriction, including without limitation the rights 
     6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
     7 * copies of the Software, and to permit persons to whom the Software is 
     8 * furnished to do so, subject to the following conditions: 
     9 * 
     10 * The above copyright notice and this permission notice shall be included in 
     11 * all copies or substantial portions of the Software. 
     12 * 
     13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
     14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
     15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
     16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
     17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
     18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
     19 * THE SOFTWARE. 
     20 * 
     21 *===-----------------------------------------------------------------------=== 
     22 */ 
     23 
     24#ifndef _QPXINTRIN_H_INCLUDED 
     25#define _QPXINTRIN_H_INCLUDED 
     26 
     27typedef double vector4double __attribute__((__vector_size__(32))); 
     28 
     29#ifndef __VECTOR4DOUBLE__  
     30#define __VECTOR4DOUBLE__ 1 
     31#endif 
     32 
     33static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     34vec_ld (long a, long *b) { 
     35  return __builtin_qpx_qvlfd((double *) &((char *) b)[a]); 
     36} 
     37 
     38static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     39vec_lda (long a, long *b) { 
     40  return __builtin_qpx_qvlfda((double *) &((char *) b)[a]); 
     41} 
     42 
     43static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     44vec_ld (long a, unsigned long *b) { 
     45  return __builtin_qpx_qvlfd((double *) &((char *) b)[a]); 
     46} 
     47 
     48static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     49vec_lda (long a, unsigned long *b) { 
     50  return __builtin_qpx_qvlfda((double *) &((char *) b)[a]); 
     51} 
     52 
     53static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     54vec_ld (long a, long long *b) { 
     55  return __builtin_qpx_qvlfd((double *) &((char *) b)[a]); 
     56} 
     57 
     58static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     59vec_lda (long a, long long *b) { 
     60  return __builtin_qpx_qvlfda((double *) &((char *) b)[a]); 
     61} 
     62 
     63static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     64vec_ld (long a, unsigned long long *b) { 
     65  return __builtin_qpx_qvlfd((double *) &((char *) b)[a]); 
     66} 
     67 
     68static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     69vec_lda (long a, unsigned long long *b) { 
     70  return __builtin_qpx_qvlfda((double *) &((char *) b)[a]); 
     71} 
     72 
     73static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     74vec_ld (long a, float *b) { 
     75  return __builtin_qpx_qvlfs((float *) &((char *) b)[a]); 
     76} 
     77 
     78static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     79vec_lda (long a, float *b) { 
     80  return __builtin_qpx_qvlfsa((float *) &((char *) b)[a]); 
     81} 
     82 
     83static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     84vec_ld (long a, float _Complex *b) { 
     85  return __builtin_qpx_qvlfs((float *) &((char *) b)[a]); 
     86} 
     87 
     88static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     89vec_lda (long a, float _Complex *b) { 
     90  return __builtin_qpx_qvlfsa((float *) &((char *) b)[a]); 
     91} 
     92 
     93static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     94vec_ld (long a, double *b) { 
     95  return __builtin_qpx_qvlfd((double *) &((char *) b)[a]); 
     96} 
     97 
     98static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     99vec_lda (long a, double *b) { 
     100  return __builtin_qpx_qvlfda((double *) &((char *) b)[a]); 
     101} 
     102 
     103static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     104vec_ld (long a, double _Complex *b) { 
     105  return __builtin_qpx_qvlfd((double *) &((char *) b)[a]); 
     106} 
     107 
     108static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     109vec_lda (long a, double _Complex *b) { 
     110  return __builtin_qpx_qvlfda((double *) &((char *) b)[a]); 
     111} 
     112 
     113static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     114vec_ldia (long a, int *b) { 
     115  return __builtin_qpx_qvlfiwa((int *) &((char *) b)[a]); 
     116} 
     117 
     118static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     119vec_ldiaa (long a, int *b) { 
     120  return __builtin_qpx_qvlfiwaa((int *) &((char *) b)[a]); 
     121} 
     122 
     123static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     124vec_ldiz (long a, unsigned *b) { 
     125  return __builtin_qpx_qvlfiwz((unsigned *) &((char *) b)[a]); 
     126} 
     127 
     128static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     129vec_ldiza (long a, unsigned *b) { 
     130  return __builtin_qpx_qvlfiwza((unsigned *) &((char *) b)[a]); 
     131} 
     132 
     133static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     134vec_lds (long a, float *b) { 
     135  return (vector4double) { (double) *((float *) &((char *) b)[a]) }; 
     136} 
     137 
     138static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     139vec_lds (long a, double *b) { 
     140  return (vector4double) { *((double *) &((char *) b)[a]) }; 
     141} 
     142 
     143static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     144vec_lds (long a, float _Complex *b) { 
     145  return __builtin_qpx_qvlfcs((float _Complex *) &((char *) b)[a]); 
     146} 
     147 
     148static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     149vec_ldsa (long a, float _Complex *b) { 
     150  return __builtin_qpx_qvlfcsa((float _Complex *) &((char *) b)[a]); 
     151} 
     152 
     153static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     154vec_lds (long a, double _Complex *b) { 
     155  return __builtin_qpx_qvlfcd((double _Complex *) &((char *) b)[a]); 
     156} 
     157 
     158static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     159vec_ldsa (long a, double _Complex *b) { 
     160  return __builtin_qpx_qvlfcda((double _Complex *) &((char *) b)[a]); 
     161} 
     162 
     163static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     164vec_ld2 (long a, float *b) { 
     165  return __builtin_qpx_qvlfcs((float _Complex *) &((char *) b)[a]); 
     166} 
     167 
     168static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     169vec_ld2a (long a, float *b) { 
     170  return __builtin_qpx_qvlfcsa((float _Complex *) &((char *) b)[a]); 
     171} 
     172 
     173static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     174vec_ld2 (long a, double *b) { 
     175  return __builtin_qpx_qvlfcd((double _Complex *) &((char *) b)[a]); 
     176} 
     177 
     178static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     179vec_ld2a (long a, double *b) { 
     180  return __builtin_qpx_qvlfcda((double _Complex *) &((char *) b)[a]); 
     181} 
     182 
     183static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     184vec_st (vector4double a, long b, int *c) { 
     185  return __builtin_qpx_qvstfiw(a, (unsigned *) &((char *) c)[b]); 
     186} 
     187 
     188static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     189vec_sta (vector4double a, long b, int *c) { 
     190  return __builtin_qpx_qvstfiwa(a, (unsigned *) &((char *) c)[b]); 
     191} 
     192 
     193static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     194vec_st (vector4double a, long b, unsigned *c) { 
     195  return __builtin_qpx_qvstfiw(a, (unsigned *) &((char *) c)[b]); 
     196} 
     197 
     198static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     199vec_sta (vector4double a, long b, unsigned *c) { 
     200  return __builtin_qpx_qvstfiwa(a, (unsigned *) &((char *) c)[b]); 
     201} 
     202 
     203static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     204vec_st (vector4double a, long b, long *c) { 
     205  return __builtin_qpx_qvstfd(a, (double *) &((char *) c)[b]); 
     206} 
     207 
     208static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     209vec_sta (vector4double a, long b, long *c) { 
     210  return __builtin_qpx_qvstfda(a, (double *) &((char *) c)[b]); 
     211} 
     212 
     213static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     214vec_st (vector4double a, long b, unsigned long *c) { 
     215  return __builtin_qpx_qvstfd(a, (double *) &((char *) c)[b]); 
     216} 
     217 
     218static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     219vec_sta (vector4double a, long b, unsigned long *c) { 
     220  return __builtin_qpx_qvstfda(a, (double *) &((char *) c)[b]); 
     221} 
     222 
     223static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     224vec_st (vector4double a, long b, long long *c) { 
     225  return __builtin_qpx_qvstfd(a, (double *) &((char *) c)[b]); 
     226} 
     227 
     228static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     229vec_sta (vector4double a, long b, long long *c) { 
     230  return __builtin_qpx_qvstfda(a, (double *) &((char *) c)[b]); 
     231} 
     232 
     233static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     234vec_st (vector4double a, long b, unsigned long long *c) { 
     235  return __builtin_qpx_qvstfd(a, (double *) &((char *) c)[b]); 
     236} 
     237 
     238static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     239vec_sta (vector4double a, long b, unsigned long long *c) { 
     240  return __builtin_qpx_qvstfda(a, (double *) &((char *) c)[b]); 
     241} 
     242 
     243static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     244vec_st (vector4double a, long b, float *c) { 
     245  return __builtin_qpx_qvstfs(a, (float *) &((char *) c)[b]); 
     246} 
     247 
     248static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     249vec_sta (vector4double a, long b, float *c) { 
     250  return __builtin_qpx_qvstfsa(a, (float *) &((char *) c)[b]); 
     251} 
     252 
     253static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     254vec_st (vector4double a, long b, float _Complex *c) { 
     255  return __builtin_qpx_qvstfs(a, (float *) &((char *) c)[b]); 
     256} 
     257 
     258static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     259vec_sta (vector4double a, long b, float _Complex *c) { 
     260  return __builtin_qpx_qvstfsa(a, (float *) &((char *) c)[b]); 
     261} 
     262 
     263static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     264vec_st (vector4double a, long b, double *c) { 
     265  return __builtin_qpx_qvstfd(a, (double *) &((char *) c)[b]); 
     266} 
     267 
     268static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     269vec_sta (vector4double a, long b, double *c) { 
     270  return __builtin_qpx_qvstfda(a, (double *) &((char *) c)[b]); 
     271} 
     272 
     273static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     274vec_st (vector4double a, long b, double _Complex *c) { 
     275  return __builtin_qpx_qvstfd(a, (double *) &((char *) c)[b]); 
     276} 
     277 
     278static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     279vec_sta (vector4double a, long b, double _Complex *c) { 
     280  return __builtin_qpx_qvstfda(a, (double *) &((char *) c)[b]); 
     281} 
     282 
     283static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     284vec_sts (vector4double a, long b, float *c) { 
     285  *((float *) &((char *) c)[b]) = (float) a[0]; 
     286} 
     287 
     288static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     289vec_sts (vector4double a, long b, double *c) { 
     290  *((double *) &((char *) c)[b]) = a[0]; 
     291} 
     292 
     293static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     294vec_sts (vector4double a, long b, float _Complex *c) { 
     295  return __builtin_qpx_qvstfcs(a, (float _Complex *) &((char *) c)[b]); 
     296} 
     297 
     298static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     299vec_stsa (vector4double a, long b, float _Complex *c) { 
     300  return __builtin_qpx_qvstfcsa(a, (float _Complex *) &((char *) c)[b]); 
     301} 
     302 
     303static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     304vec_sts (vector4double a, long b, double _Complex *c) { 
     305  return __builtin_qpx_qvstfcd(a, (double _Complex *) &((char *) c)[b]); 
     306} 
     307 
     308static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     309vec_stsa (vector4double a, long b, double _Complex *c) { 
     310  return __builtin_qpx_qvstfcda(a, (double _Complex *) &((char *) c)[b]); 
     311} 
     312 
     313static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     314vec_st2 (vector4double a, long b, float *c) { 
     315  return __builtin_qpx_qvstfcs(a, (float _Complex *) &((char *) c)[b]); 
     316} 
     317 
     318static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     319vec_st2a (vector4double a, long b, float *c) { 
     320  return __builtin_qpx_qvstfcsa(a, (float _Complex *) &((char *) c)[b]); 
     321} 
     322 
     323static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     324vec_st2 (vector4double a, long b, double *c) { 
     325  return __builtin_qpx_qvstfcd(a, (double _Complex *) &((char *) c)[b]); 
     326} 
     327 
     328static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     329vec_st2a (vector4double a, long b, double *c) { 
     330  return __builtin_qpx_qvstfcda(a, (double _Complex *) &((char *) c)[b]); 
     331} 
     332 
     333static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     334vec_abs (vector4double a) { 
     335  return __builtin_qpx_qvfabs(a); 
     336} 
     337 
     338static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     339vec_neg (vector4double a) { 
     340  return __builtin_qpx_qvfneg(a); 
     341} 
     342 
     343static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     344vec_nabs (vector4double a) { 
     345  return __builtin_qpx_qvfnabs(a); 
     346} 
     347 
     348static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     349vec_re (vector4double a) { 
     350  return __builtin_qpx_qvfre(a); 
     351} 
     352 
     353static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     354vec_res (vector4double a) { 
     355  return __builtin_qpx_qvfres(a); 
     356} 
     357 
     358static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     359vec_rsqrte (vector4double a) { 
     360  return __builtin_qpx_qvfrsqrte(a); 
     361} 
     362 
     363static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     364vec_rsqrtes (vector4double a) { 
     365  return __builtin_qpx_qvfrsqrtes(a); 
     366} 
     367 
     368static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     369vec_swsqrt (vector4double a) { 
     370  return (vector4double) 
     371         { __builtin_sqrt(a[0]), __builtin_sqrt(a[1]), 
     372           __builtin_sqrt(a[2]), __builtin_sqrt(a[3]) }; 
     373} 
     374 
     375static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     376vec_swsqrt_nochk (vector4double a) { 
     377  return (vector4double) 
     378         { __builtin_sqrt(a[0]), __builtin_sqrt(a[1]), 
     379           __builtin_sqrt(a[2]), __builtin_sqrt(a[3]) }; 
     380} 
     381 
     382static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     383vec_swsqrts (vector4double a) { 
     384  return (vector4double) 
     385         { __builtin_sqrtf((float) a[0]), __builtin_sqrtf((float) a[1]), 
     386           __builtin_sqrtf((float) a[2]), __builtin_sqrtf((float) a[3]) }; 
     387} 
     388 
     389static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     390vec_swsqrts_nochk (vector4double a) { 
     391  return (vector4double) 
     392         { __builtin_sqrtf((float) a[0]), __builtin_sqrtf((float) a[1]), 
     393           __builtin_sqrtf((float) a[2]), __builtin_sqrtf((float) a[3]) }; 
     394} 
     395 
     396static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     397vec_add (vector4double a, vector4double b) { 
     398  return __builtin_qpx_qvfadd(a, b); 
     399} 
     400 
     401static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     402vec_cpsgn (vector4double a, vector4double b) { 
     403  return __builtin_qpx_qvfcpsgn(a, b); 
     404} 
     405 
     406static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     407vec_mul (vector4double a, vector4double b) { 
     408  return __builtin_qpx_qvfmul(a, b); 
     409} 
     410 
     411static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     412vec_sub (vector4double a, vector4double b) { 
     413  return __builtin_qpx_qvfsub(a, b); 
     414} 
     415 
     416static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     417vec_swdiv (vector4double a, vector4double b) { 
     418  return (vector4double) { a[0]/b[0], a[1]/b[1], a[2]/b[2], a[3]/b[3] }; 
     419} 
     420 
     421static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     422vec_swdiv_nochk (vector4double a, vector4double b) { 
     423  return (vector4double) { a[0]/b[0], a[1]/b[1], a[2]/b[2], a[3]/b[3] }; 
     424} 
     425 
     426static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     427vec_swdivs (vector4double a, vector4double b) { 
     428 
     429  return (vector4double) 
     430         { (double) ((float) a[0]/ (float) b[0]), 
     431           (double) ((float) a[1]/ (float) b[1]), 
     432           (double) ((float) a[2]/ (float) b[2]), 
     433           (double) ((float) a[3]/ (float) b[3]) }; 
     434} 
     435 
     436static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     437vec_swdivs_nochk (vector4double a, vector4double b) { 
     438  return (vector4double) 
     439         { (double) ((float) a[0]/ (float) b[0]), 
     440           (double) ((float) a[1]/ (float) b[1]), 
     441           (double) ((float) a[2]/ (float) b[2]), 
     442           (double) ((float) a[3]/ (float) b[3]) }; 
     443} 
     444 
     445static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     446vec_xmul (vector4double a, vector4double b) { 
     447  return __builtin_qpx_qvfxmul(a, b); 
     448} 
     449 
     450static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     451vec_madd (vector4double a, vector4double b, vector4double c) { 
     452  return __builtin_qpx_qvfmadd(a, b, c); 
     453} 
     454 
     455static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     456vec_msub (vector4double a, vector4double b, vector4double c) { 
     457  return __builtin_qpx_qvfmsub(a, b, c); 
     458} 
     459 
     460static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     461vec_nmadd (vector4double a, vector4double b, vector4double c) { 
     462  return __builtin_qpx_qvfnmadd(a, b, c); 
     463} 
     464 
     465static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     466vec_nmsub (vector4double a, vector4double b, vector4double c) { 
     467  return __builtin_qpx_qvfnmsub(a, b, c); 
     468} 
     469 
     470static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     471vec_xmadd (vector4double a, vector4double b, vector4double c) { 
     472  return __builtin_qpx_qvfxmadd(a, b, c); 
     473} 
     474 
     475static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     476vec_xxmadd (vector4double a, vector4double b, vector4double c) { 
     477  return __builtin_qpx_qvfxxmadd(a, b, c); 
     478} 
     479 
     480static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     481vec_xxcpnmadd (vector4double a, vector4double b, vector4double c) { 
     482  return __builtin_qpx_qvfxxcpnmadd(a, b, c); 
     483} 
     484 
     485static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     486vec_xxnpmadd (vector4double a, vector4double b, vector4double c) { 
     487  return __builtin_qpx_qvfxxnpmadd(a, b, c); 
     488} 
     489 
     490static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     491vec_ceil (vector4double a) { 
     492  return __builtin_qpx_qvfrip(a); 
     493} 
     494 
     495static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     496vec_floor (vector4double a) { 
     497  return __builtin_qpx_qvfrim(a); 
     498} 
     499 
     500static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     501vec_round (vector4double a) { 
     502  return __builtin_qpx_qvfrin(a); 
     503} 
     504 
     505static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     506vec_rsp (vector4double a) { 
     507  return __builtin_qpx_qvfrsp(a); 
     508} 
     509 
     510static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     511vec_trunc (vector4double a) { 
     512  return __builtin_qpx_qvfriz(a); 
     513} 
     514 
     515static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     516vec_cfid (vector4double a) { 
     517  return __builtin_qpx_qvfcfid(a); 
     518} 
     519 
     520static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     521vec_cfidu (vector4double a) { 
     522  return __builtin_qpx_qvfcfidu(a); 
     523} 
     524 
     525static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     526vec_ctid (vector4double a) { 
     527  return __builtin_qpx_qvfctid(a); 
     528} 
     529 
     530static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     531vec_ctidu (vector4double a) { 
     532  return __builtin_qpx_qvfctidu(a); 
     533} 
     534 
     535static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     536vec_ctidz (vector4double a) { 
     537  return __builtin_qpx_qvfctidz(a); 
     538} 
     539 
     540static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     541vec_ctiduz (vector4double a) { 
     542  return __builtin_qpx_qvfctiduz(a); 
     543} 
     544 
     545static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     546vec_ctiw (vector4double a) { 
     547  return __builtin_qpx_qvfctiw(a); 
     548} 
     549 
     550static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     551vec_ctiwu (vector4double a) { 
     552  return __builtin_qpx_qvfctiwu(a); 
     553} 
     554 
     555static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     556vec_ctiwz (vector4double a) { 
     557  return __builtin_qpx_qvfctiwz(a); 
     558} 
     559 
     560static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     561vec_ctiwuz (vector4double a) { 
     562  return __builtin_qpx_qvfctiwuz(a); 
     563} 
     564 
     565static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     566vec_cmpgt (vector4double a, vector4double b) { 
     567  return __builtin_qpx_qvfcmpgt(a, b); 
     568} 
     569 
     570static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     571vec_cmplt (vector4double a, vector4double b) { 
     572  return __builtin_qpx_qvfcmplt(a, b); 
     573} 
     574 
     575static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     576vec_cmpeq (vector4double a, vector4double b) { 
     577  return __builtin_qpx_qvfcmpeq(a, b); 
     578} 
     579 
     580static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     581vec_sel (vector4double a, vector4double b, vector4double c) { 
     582  return __builtin_qpx_qvfsel(a, b, c); 
     583} 
     584 
     585static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     586vec_tstnan (vector4double a, vector4double b) { 
     587  return __builtin_qpx_qvftstnan(a, b); 
     588} 
     589 
     590static __inline__ double __attribute__((__always_inline__, __nodebug__)) 
     591vec_extract (vector4double a, int b) { 
     592  return a[b & 3]; 
     593} 
     594 
     595static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     596vec_insert (double a, vector4double b, int c) { 
     597  vector4double r = b; 
     598  r[c & 3] = a; 
     599  return r; 
     600} 
     601 
     602#define vec_gpci(a) __builtin_qpx_qvgpci(a) 
     603 
     604static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     605vec_lvsl (long a, float *b) { 
     606  return __builtin_qpx_qvlpcls((float *) &((char *) b)[a]); 
     607} 
     608 
     609static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     610vec_lvsl (long a, float _Complex *b) { 
     611  return __builtin_qpx_qvlpcls((float *) &((char *) b)[a]); 
     612} 
     613 
     614static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     615vec_lvsl (long a, double *b) { 
     616  return __builtin_qpx_qvlpcld((double *) &((char *) b)[a]); 
     617} 
     618 
     619static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     620vec_lvsl (long a, double _Complex *b) { 
     621  return __builtin_qpx_qvlpcld((double *) &((char *) b)[a]); 
     622} 
     623 
     624static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     625vec_lvsr (long a, float *b) { 
     626  return __builtin_qpx_qvlpcrs((float *) &((char *) b)[a]); 
     627} 
     628 
     629static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     630vec_lvsr (long a, float _Complex *b) { 
     631  return __builtin_qpx_qvlpcrs((float *) &((char *) b)[a]); 
     632} 
     633 
     634static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     635vec_lvsr (long a, double *b) { 
     636  return __builtin_qpx_qvlpcrd((double *) &((char *) b)[a]); 
     637} 
     638 
     639static __inline__ vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) 
     640vec_lvsr (long a, double _Complex *b) { 
     641  return __builtin_qpx_qvlpcrd((double *) &((char *) b)[a]); 
     642} 
     643 
     644static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     645vec_perm (vector4double a, vector4double b, vector4double c) { 
     646  return __builtin_qpx_qvfperm(a, b, c); 
     647} 
     648 
     649static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     650vec_promote (double a, int b) { 
     651  vector4double r; 
     652  r[b & 3] = a; 
     653  return r; 
     654} 
     655 
     656#define vec_sldw(a, b, c) __builtin_shufflevector(a, b, c, (c)+1, (c)+2, (c)+3); 
     657 
     658static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     659vec_splat (vector4double a, int b) { 
     660  return (vector4double) { a[b] }; 
     661} 
     662 
     663static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     664vec_splats (double a) { 
     665  return (vector4double) { a }; 
     666} 
     667 
     668static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     669vec_and (vector4double a, vector4double b) { 
     670  return __builtin_qpx_qvflogical(a, b, 0x1); 
     671} 
     672 
     673static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     674vec_andc (vector4double a, vector4double b) { 
     675  return __builtin_qpx_qvflogical(a, b, 0x4); 
     676} 
     677 
     678#define vec_logical(a, b, c) __builtin_qpx_qvflogical(a, b, c) 
     679 
     680static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     681vec_nand (vector4double a, vector4double b) { 
     682  return __builtin_qpx_qvflogical(a, b, 0xE); 
     683} 
     684 
     685static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     686vec_nor (vector4double a, vector4double b) { 
     687  return __builtin_qpx_qvflogical(a, b, 0x8); 
     688} 
     689 
     690static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     691vec_not (vector4double a) { 
     692  return vec_nor(a, a); 
     693} 
     694 
     695static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     696vec_or (vector4double a, vector4double b) { 
     697  return __builtin_qpx_qvflogical(a, b, 0x7); 
     698} 
     699 
     700static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     701vec_orc (vector4double a, vector4double b) { 
     702  return __builtin_qpx_qvflogical(a, b, 0xD); 
     703} 
     704 
     705static __inline__ vector4double __attribute__((__always_inline__, __nodebug__)) 
     706vec_xor (vector4double a, vector4double b) { 
     707  return __builtin_qpx_qvflogical(a, b, 0x6); 
     708} 
     709 
     710#if !QPXINTRIN_DONT_DEFINE_DCBT 
     711static __inline__ void __attribute__((__always_inline__, __nodebug__)) 
     712__dcbt (void *p) { 
     713  __builtin_prefetch(p); 
     714} 
     715#endif 
     716 
     717#endif 
     718