WikiStart: clang_bgq_r155764-20120307.patch

File clang_bgq_r155764-20120307.patch, 70.1 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 b4e1781..8ae9e06 100644
    a b  
    335335  } 
    336336}; 
    337337 
     338// CNK target 
     339template<typename Target> 
     340class CNKTargetInfo : public OSTargetInfo<Target> { 
     341protected: 
     342  virtual void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple, 
     343                            MacroBuilder &Builder) const { 
     344    // CNK defines; list based off of gcc output 
     345    DefineStd(Builder, "unix", Opts); 
     346    DefineStd(Builder, "cnk", Opts); 
     347    Builder.defineMacro("__gnu_cnk__"); 
     348    Builder.defineMacro("__ELF__"); 
     349    if (Opts.POSIXThreads) 
     350      Builder.defineMacro("_REENTRANT"); 
     351    if (Opts.CPlusPlus) 
     352      Builder.defineMacro("_GNU_SOURCE"); 
     353  } 
     354public: 
     355  CNKTargetInfo(const std::string& triple) 
     356    : OSTargetInfo<Target>(triple) { 
     357    this->UserLabelPrefix = ""; 
     358    this->WIntType = TargetInfo::UnsignedInt; 
     359  } 
     360}; 
     361 
    338362// NetBSD Target 
    339363template<typename Target> 
    340364class NetBSDTargetInfo : public OSTargetInfo<Target> { 
     
    575599  static const Builtin::Info BuiltinInfo[]; 
    576600  static const char * const GCCRegNames[]; 
    577601  static const TargetInfo::GCCRegAlias GCCRegAliases[]; 
     602  std::string CPU; 
    578603public: 
    579604  PPCTargetInfo(const std::string& triple) : TargetInfo(triple) { 
    580605    LongDoubleWidth = LongDoubleAlign = 128; 
    581606    LongDoubleFormat = &llvm::APFloat::PPCDoubleDouble; 
    582607  } 
    583608 
     609  virtual bool setCPU(const std::string &Name) { 
     610    if (Name == "440" || Name == "450") { 
     611      CPU = Name; 
     612      return true; 
     613    } else if (Name == "440fp2" || Name == "440d") { 
     614      CPU = "440fp2"; 
     615      return true; 
     616    } else if (Name == "450fp2" || Name == "450d") { 
     617      CPU = "450fp2"; 
     618      return true; 
     619    } else if (Name == "a2" || Name == "a2q") { 
     620      CPU = Name; 
     621      return true; 
     622    } 
     623 
     624    return false; 
     625  } 
     626 
    584627  virtual void getTargetBuiltins(const Builtin::Info *&Records, 
    585628                                 unsigned &NumRecords) const { 
    586629    Records = BuiltinInfo; 
     
    744787    Builder.defineMacro("__VEC__", "10206"); 
    745788    Builder.defineMacro("__ALTIVEC__"); 
    746789  } 
     790 
     791  if (CPU == "440") { 
     792    Builder.defineMacro("_ARCH_440"); 
     793  } else if (CPU == "450") { 
     794    Builder.defineMacro("_ARCH_440"); 
     795    Builder.defineMacro("_ARCH_450"); 
     796  } else if (CPU == "440fp2") { 
     797    Builder.defineMacro("_ARCH_440"); 
     798    Builder.defineMacro("_ARCH_440D"); 
     799    Builder.defineMacro("_ARCH_440FP2"); 
     800  } else if (CPU == "450fp2") { 
     801    Builder.defineMacro("_ARCH_440"); 
     802    Builder.defineMacro("_ARCH_440D"); 
     803    Builder.defineMacro("_ARCH_440FP2"); 
     804    Builder.defineMacro("_ARCH_450"); 
     805    Builder.defineMacro("_ARCH_450D"); 
     806    Builder.defineMacro("_ARCH_450FP2"); 
     807  } else if (CPU == "a2q") { 
     808    Builder.defineMacro("_ARCH_QP"); 
     809  } 
     810 
     811  bool isBG = false; 
     812  if (getTriple().getVendor() == llvm::Triple::BGP) { 
     813    isBG = true; 
     814    Builder.defineMacro("__bgp__"); 
     815    Builder.defineMacro("__TOS_BGP__"); 
     816  } else if (getTriple().getVendor() == llvm::Triple::BGQ) { 
     817    isBG = true; 
     818    Builder.defineMacro("__bgq__"); 
     819    Builder.defineMacro("__TOS_BGQ__"); 
     820  } 
     821  if (isBG) { 
     822    Builder.defineMacro("__bg__"); 
     823    Builder.defineMacro("__THW_BLUEGENE__"); 
     824  } 
    747825} 
    748826 
    749827bool PPCTargetInfo::hasFeature(StringRef Feature) const { 
     
    40054083    switch (os) { 
    40064084    case llvm::Triple::Linux: 
    40074085      return new LinuxTargetInfo<PPC32TargetInfo>(T); 
     4086    case llvm::Triple::CNK: 
     4087      return new CNKTargetInfo<PPC32TargetInfo>(T); 
    40084088    case llvm::Triple::FreeBSD: 
    40094089      return new FreeBSDTargetInfo<PPC32TargetInfo>(T); 
    40104090    case llvm::Triple::NetBSD: 
  • lib/CodeGen/CGBuiltin.cpp

    diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp
    index e30b513..5f98489 100644
    a b  
    45204520    llvm::Function *F = CGM.getIntrinsic(ID); 
    45214521    return Builder.CreateCall(F, Ops, ""); 
    45224522  } 
     4523 
     4524  // FP2 (Double Hummer) 
     4525  case PPC::BI__builtin_fp2_fpadd: 
     4526  case PPC::BI__builtin_fp2_fpsub: 
     4527  case PPC::BI__builtin_fp2_fpre: 
     4528  case PPC::BI__builtin_fp2_fprsqrte: 
     4529  case PPC::BI__builtin_fp2_fpmul: 
     4530  case PPC::BI__builtin_fp2_fxmul: 
     4531  case PPC::BI__builtin_fp2_fxpmul: 
     4532  case PPC::BI__builtin_fp2_fxsmul: 
     4533  case PPC::BI__builtin_fp2_fpmadd: 
     4534  case PPC::BI__builtin_fp2_fpnmadd: 
     4535  case PPC::BI__builtin_fp2_fpmsub: 
     4536  case PPC::BI__builtin_fp2_fpnmsub: 
     4537  case PPC::BI__builtin_fp2_fxmadd: 
     4538  case PPC::BI__builtin_fp2_fxnmadd: 
     4539  case PPC::BI__builtin_fp2_fxmsub: 
     4540  case PPC::BI__builtin_fp2_fxnmsub: 
     4541  case PPC::BI__builtin_fp2_fxcpmadd: 
     4542  case PPC::BI__builtin_fp2_fxcsmadd: 
     4543  case PPC::BI__builtin_fp2_fxcpnmadd: 
     4544  case PPC::BI__builtin_fp2_fxcsnmadd: 
     4545  case PPC::BI__builtin_fp2_fxcpmsub: 
     4546  case PPC::BI__builtin_fp2_fxcsmsub: 
     4547  case PPC::BI__builtin_fp2_fxcpnmsub: 
     4548  case PPC::BI__builtin_fp2_fxcsnmsub: 
     4549  case PPC::BI__builtin_fp2_fxcpnpma: 
     4550  case PPC::BI__builtin_fp2_fxcsnpma: 
     4551  case PPC::BI__builtin_fp2_fxcpnsma: 
     4552  case PPC::BI__builtin_fp2_fxcsnsma: 
     4553  case PPC::BI__builtin_fp2_fxcxnpma: 
     4554  case PPC::BI__builtin_fp2_fxcxnsma: 
     4555  case PPC::BI__builtin_fp2_fxcxma: 
     4556  case PPC::BI__builtin_fp2_fxcxnms: 
     4557  case PPC::BI__builtin_fp2_fpsel: 
     4558  case PPC::BI__builtin_fp2_fpctiw: 
     4559  case PPC::BI__builtin_fp2_fpctiwz: 
     4560  case PPC::BI__builtin_fp2_fprsp: 
     4561  case PPC::BI__builtin_fp2_fpneg: 
     4562  case PPC::BI__builtin_fp2_fpabs: 
     4563  case PPC::BI__builtin_fp2_fpnabs: 
     4564  case PPC::BI__builtin_fp2_fxmr: 
     4565  case PPC::BI__builtin_fp2_lfps: 
     4566  case PPC::BI__builtin_fp2_lfxs: 
     4567  case PPC::BI__builtin_fp2_lfpd: 
     4568  case PPC::BI__builtin_fp2_lfxd: 
     4569  case PPC::BI__builtin_fp2_stfps: 
     4570  case PPC::BI__builtin_fp2_stfxs: 
     4571  case PPC::BI__builtin_fp2_stfpd: 
     4572  case PPC::BI__builtin_fp2_stfxd: 
     4573  case PPC::BI__builtin_fp2_stfpiw: 
     4574  { 
     4575    switch (BuiltinID) { 
     4576    default: llvm_unreachable("Unsupported fp2 intrinsic!"); 
     4577    case PPC::BI__builtin_fp2_fpadd: 
     4578      ID = Intrinsic::ppc_fp2_fpadd; 
     4579      break; 
     4580    case PPC::BI__builtin_fp2_fpsub: 
     4581      ID = Intrinsic::ppc_fp2_fpsub; 
     4582      break; 
     4583    case PPC::BI__builtin_fp2_fpre: 
     4584      ID = Intrinsic::ppc_fp2_fpre; 
     4585      break; 
     4586    case PPC::BI__builtin_fp2_fprsqrte: 
     4587      ID = Intrinsic::ppc_fp2_fprsqrte; 
     4588      break; 
     4589    case PPC::BI__builtin_fp2_fpmul: 
     4590      ID = Intrinsic::ppc_fp2_fpmul; 
     4591      break; 
     4592    case PPC::BI__builtin_fp2_fxmul: 
     4593      ID = Intrinsic::ppc_fp2_fxmul; 
     4594      break; 
     4595    case PPC::BI__builtin_fp2_fxpmul: 
     4596      ID = Intrinsic::ppc_fp2_fxpmul; 
     4597      break; 
     4598    case PPC::BI__builtin_fp2_fxsmul: 
     4599      ID = Intrinsic::ppc_fp2_fxsmul; 
     4600      break; 
     4601    case PPC::BI__builtin_fp2_fpmadd: 
     4602      ID = Intrinsic::ppc_fp2_fpmadd; 
     4603      break; 
     4604    case PPC::BI__builtin_fp2_fpnmadd: 
     4605      ID = Intrinsic::ppc_fp2_fpnmadd; 
     4606      break; 
     4607    case PPC::BI__builtin_fp2_fpmsub: 
     4608      ID = Intrinsic::ppc_fp2_fpmsub; 
     4609      break; 
     4610    case PPC::BI__builtin_fp2_fpnmsub: 
     4611      ID = Intrinsic::ppc_fp2_fpnmsub; 
     4612      break; 
     4613    case PPC::BI__builtin_fp2_fxmadd: 
     4614      ID = Intrinsic::ppc_fp2_fxmadd; 
     4615      break; 
     4616    case PPC::BI__builtin_fp2_fxnmadd: 
     4617      ID = Intrinsic::ppc_fp2_fxnmadd; 
     4618      break; 
     4619    case PPC::BI__builtin_fp2_fxmsub: 
     4620      ID = Intrinsic::ppc_fp2_fxmsub; 
     4621      break; 
     4622    case PPC::BI__builtin_fp2_fxnmsub: 
     4623      ID = Intrinsic::ppc_fp2_fxnmsub; 
     4624      break; 
     4625    case PPC::BI__builtin_fp2_fxcpmadd: 
     4626      ID = Intrinsic::ppc_fp2_fxcpmadd; 
     4627      break; 
     4628    case PPC::BI__builtin_fp2_fxcsmadd: 
     4629      ID = Intrinsic::ppc_fp2_fxcsmadd; 
     4630      break; 
     4631    case PPC::BI__builtin_fp2_fxcpnmadd: 
     4632      ID = Intrinsic::ppc_fp2_fxcpnmadd; 
     4633      break; 
     4634    case PPC::BI__builtin_fp2_fxcsnmadd: 
     4635      ID = Intrinsic::ppc_fp2_fxcsnmadd; 
     4636      break; 
     4637    case PPC::BI__builtin_fp2_fxcpmsub: 
     4638      ID = Intrinsic::ppc_fp2_fxcpmsub; 
     4639      break; 
     4640    case PPC::BI__builtin_fp2_fxcsmsub: 
     4641      ID = Intrinsic::ppc_fp2_fxcsmsub; 
     4642      break; 
     4643    case PPC::BI__builtin_fp2_fxcpnmsub: 
     4644      ID = Intrinsic::ppc_fp2_fxcpnmsub; 
     4645      break; 
     4646    case PPC::BI__builtin_fp2_fxcsnmsub: 
     4647      ID = Intrinsic::ppc_fp2_fxcsnmsub; 
     4648      break; 
     4649    case PPC::BI__builtin_fp2_fxcpnpma: 
     4650      ID = Intrinsic::ppc_fp2_fxcpnpma; 
     4651      break; 
     4652    case PPC::BI__builtin_fp2_fxcsnpma: 
     4653      ID = Intrinsic::ppc_fp2_fxcsnpma; 
     4654      break; 
     4655    case PPC::BI__builtin_fp2_fxcpnsma: 
     4656      ID = Intrinsic::ppc_fp2_fxcpnsma; 
     4657      break; 
     4658    case PPC::BI__builtin_fp2_fxcsnsma: 
     4659      ID = Intrinsic::ppc_fp2_fxcsnsma; 
     4660      break; 
     4661    case PPC::BI__builtin_fp2_fxcxnpma: 
     4662      ID = Intrinsic::ppc_fp2_fxcxnpma; 
     4663      break; 
     4664    case PPC::BI__builtin_fp2_fxcxnsma: 
     4665      ID = Intrinsic::ppc_fp2_fxcxnsma; 
     4666      break; 
     4667    case PPC::BI__builtin_fp2_fxcxma: 
     4668      ID = Intrinsic::ppc_fp2_fxcxma; 
     4669      break; 
     4670    case PPC::BI__builtin_fp2_fxcxnms: 
     4671      ID = Intrinsic::ppc_fp2_fxcxnms; 
     4672      break; 
     4673    case PPC::BI__builtin_fp2_fpsel: 
     4674      ID = Intrinsic::ppc_fp2_fpsel; 
     4675      break; 
     4676    case PPC::BI__builtin_fp2_fpctiw: 
     4677      ID = Intrinsic::ppc_fp2_fpctiw; 
     4678      break; 
     4679    case PPC::BI__builtin_fp2_fpctiwz: 
     4680      ID = Intrinsic::ppc_fp2_fpctiwz; 
     4681      break; 
     4682    case PPC::BI__builtin_fp2_fprsp: 
     4683      ID = Intrinsic::ppc_fp2_fprsp; 
     4684      break; 
     4685    case PPC::BI__builtin_fp2_fpneg: 
     4686      ID = Intrinsic::ppc_fp2_fpneg; 
     4687      break; 
     4688    case PPC::BI__builtin_fp2_fpabs: 
     4689      ID = Intrinsic::ppc_fp2_fpabs; 
     4690      break; 
     4691    case PPC::BI__builtin_fp2_fpnabs: 
     4692      ID = Intrinsic::ppc_fp2_fpnabs; 
     4693      break; 
     4694    case PPC::BI__builtin_fp2_fxmr: 
     4695      ID = Intrinsic::ppc_fp2_fxmr; 
     4696      break; 
     4697    case PPC::BI__builtin_fp2_lfps: 
     4698      ID = Intrinsic::ppc_fp2_lfps; 
     4699      break; 
     4700    case PPC::BI__builtin_fp2_lfxs: 
     4701      ID = Intrinsic::ppc_fp2_lfxs; 
     4702      break; 
     4703    case PPC::BI__builtin_fp2_lfpd: 
     4704      ID = Intrinsic::ppc_fp2_lfpd; 
     4705      break; 
     4706    case PPC::BI__builtin_fp2_lfxd: 
     4707      ID = Intrinsic::ppc_fp2_lfxd; 
     4708      break; 
     4709    case PPC::BI__builtin_fp2_stfps: 
     4710      ID = Intrinsic::ppc_fp2_stfps; 
     4711      break; 
     4712    case PPC::BI__builtin_fp2_stfxs: 
     4713      ID = Intrinsic::ppc_fp2_stfxs; 
     4714      break; 
     4715    case PPC::BI__builtin_fp2_stfpd: 
     4716      ID = Intrinsic::ppc_fp2_stfpd; 
     4717      break; 
     4718    case PPC::BI__builtin_fp2_stfxd: 
     4719      ID = Intrinsic::ppc_fp2_stfxd; 
     4720      break; 
     4721    case PPC::BI__builtin_fp2_stfpiw: 
     4722      ID = Intrinsic::ppc_fp2_stfpiw; 
     4723      break; 
     4724    } 
     4725    llvm::Function *F = CGM.getIntrinsic(ID); 
     4726    return Builder.CreateCall(F, Ops, ""); 
     4727  } 
     4728 
     4729  // QPX 
     4730  case PPC::BI__builtin_qpx_qvfabs: 
     4731  case PPC::BI__builtin_qpx_qvfctid: 
     4732  case PPC::BI__builtin_qpx_qvfcfid: 
     4733  case PPC::BI__builtin_qpx_qvfcfidu: 
     4734  case PPC::BI__builtin_qpx_qvfctidu: 
     4735  case PPC::BI__builtin_qpx_qvfctiduz: 
     4736  case PPC::BI__builtin_qpx_qvfctidz: 
     4737  case PPC::BI__builtin_qpx_qvfctiw: 
     4738  case PPC::BI__builtin_qpx_qvfctiwu: 
     4739  case PPC::BI__builtin_qpx_qvfctiwuz: 
     4740  case PPC::BI__builtin_qpx_qvfctiwz: 
     4741  case PPC::BI__builtin_qpx_qvfnabs: 
     4742  case PPC::BI__builtin_qpx_qvfneg: 
     4743  case PPC::BI__builtin_qpx_qvfre: 
     4744  case PPC::BI__builtin_qpx_qvfres: 
     4745  case PPC::BI__builtin_qpx_qvfrim: 
     4746  case PPC::BI__builtin_qpx_qvfrin: 
     4747  case PPC::BI__builtin_qpx_qvfrip: 
     4748  case PPC::BI__builtin_qpx_qvfriz: 
     4749  case PPC::BI__builtin_qpx_qvfrsp: 
     4750  case PPC::BI__builtin_qpx_qvfrsqrte: 
     4751  case PPC::BI__builtin_qpx_qvfrsqrtes: 
     4752  case PPC::BI__builtin_qpx_qvfadd: 
     4753  case PPC::BI__builtin_qpx_qvfcmpeq: 
     4754  case PPC::BI__builtin_qpx_qvfcmpgt: 
     4755  case PPC::BI__builtin_qpx_qvfcmplt: 
     4756  case PPC::BI__builtin_qpx_qvfcpsgn: 
     4757  case PPC::BI__builtin_qpx_qvfmadd: 
     4758  case PPC::BI__builtin_qpx_qvfmsub: 
     4759  case PPC::BI__builtin_qpx_qvfmul: 
     4760  case PPC::BI__builtin_qpx_qvfnmadd: 
     4761  case PPC::BI__builtin_qpx_qvfnmsub: 
     4762  case PPC::BI__builtin_qpx_qvfsel: 
     4763  case PPC::BI__builtin_qpx_qvfsub: 
     4764  case PPC::BI__builtin_qpx_qvftstnan: 
     4765  case PPC::BI__builtin_qpx_qvfxmadd: 
     4766  case PPC::BI__builtin_qpx_qvfxmul: 
     4767  case PPC::BI__builtin_qpx_qvfxxcpnmadd: 
     4768  case PPC::BI__builtin_qpx_qvfxxmadd: 
     4769  case PPC::BI__builtin_qpx_qvfxxnpmadd: 
     4770  case PPC::BI__builtin_qpx_qvflogical: 
     4771  case PPC::BI__builtin_qpx_qvfperm: 
     4772  case PPC::BI__builtin_qpx_qvlpcld: 
     4773  case PPC::BI__builtin_qpx_qvlpcls: 
     4774  case PPC::BI__builtin_qpx_qvlpcrd: 
     4775  case PPC::BI__builtin_qpx_qvlpcrs: 
     4776  case PPC::BI__builtin_qpx_qvgpci: 
     4777  case PPC::BI__builtin_qpx_qvlfcda: 
     4778  case PPC::BI__builtin_qpx_qvlfcd: 
     4779  case PPC::BI__builtin_qpx_qvlfcsa: 
     4780  case PPC::BI__builtin_qpx_qvlfcs: 
     4781  case PPC::BI__builtin_qpx_qvlfda: 
     4782  case PPC::BI__builtin_qpx_qvlfd: 
     4783  case PPC::BI__builtin_qpx_qvlfiwaa: 
     4784  case PPC::BI__builtin_qpx_qvlfiwa: 
     4785  case PPC::BI__builtin_qpx_qvlfiwza: 
     4786  case PPC::BI__builtin_qpx_qvlfiwz: 
     4787  case PPC::BI__builtin_qpx_qvlfsa: 
     4788  case PPC::BI__builtin_qpx_qvlfs: 
     4789  case PPC::BI__builtin_qpx_qvstfcda: 
     4790  case PPC::BI__builtin_qpx_qvstfcd: 
     4791  case PPC::BI__builtin_qpx_qvstfcsa: 
     4792  case PPC::BI__builtin_qpx_qvstfcs: 
     4793  case PPC::BI__builtin_qpx_qvstfda: 
     4794  case PPC::BI__builtin_qpx_qvstfd: 
     4795  case PPC::BI__builtin_qpx_qvstfiwa: 
     4796  case PPC::BI__builtin_qpx_qvstfiw: 
     4797  case PPC::BI__builtin_qpx_qvstfsa: 
     4798  case PPC::BI__builtin_qpx_qvstfs: 
     4799  { 
     4800    switch (BuiltinID) { 
     4801    default: llvm_unreachable("Unsupported qpx intrinsic!"); 
     4802    case PPC::BI__builtin_qpx_qvfabs: 
     4803      ID = Intrinsic::ppc_qpx_qvfabs; 
     4804      break; 
     4805    case PPC::BI__builtin_qpx_qvfctid: 
     4806      ID = Intrinsic::ppc_qpx_qvfctid; 
     4807      break; 
     4808    case PPC::BI__builtin_qpx_qvfcfid: 
     4809      ID = Intrinsic::ppc_qpx_qvfcfid; 
     4810      break; 
     4811    case PPC::BI__builtin_qpx_qvfcfidu: 
     4812      ID = Intrinsic::ppc_qpx_qvfcfidu; 
     4813      break; 
     4814    case PPC::BI__builtin_qpx_qvfctidu: 
     4815      ID = Intrinsic::ppc_qpx_qvfctidu; 
     4816      break; 
     4817    case PPC::BI__builtin_qpx_qvfctiduz: 
     4818      ID = Intrinsic::ppc_qpx_qvfctiduz; 
     4819      break; 
     4820    case PPC::BI__builtin_qpx_qvfctidz: 
     4821      ID = Intrinsic::ppc_qpx_qvfctidz; 
     4822      break; 
     4823    case PPC::BI__builtin_qpx_qvfctiw: 
     4824      ID = Intrinsic::ppc_qpx_qvfctiw; 
     4825      break; 
     4826    case PPC::BI__builtin_qpx_qvfctiwu: 
     4827      ID = Intrinsic::ppc_qpx_qvfctiwu; 
     4828      break; 
     4829    case PPC::BI__builtin_qpx_qvfctiwuz: 
     4830      ID = Intrinsic::ppc_qpx_qvfctiwuz; 
     4831      break; 
     4832    case PPC::BI__builtin_qpx_qvfctiwz: 
     4833      ID = Intrinsic::ppc_qpx_qvfctiwz; 
     4834      break; 
     4835    case PPC::BI__builtin_qpx_qvfnabs: 
     4836      ID = Intrinsic::ppc_qpx_qvfnabs; 
     4837      break; 
     4838    case PPC::BI__builtin_qpx_qvfneg: 
     4839      ID = Intrinsic::ppc_qpx_qvfneg; 
     4840      break; 
     4841    case PPC::BI__builtin_qpx_qvfre: 
     4842      ID = Intrinsic::ppc_qpx_qvfre; 
     4843      break; 
     4844    case PPC::BI__builtin_qpx_qvfres: 
     4845      ID = Intrinsic::ppc_qpx_qvfres; 
     4846      break; 
     4847    case PPC::BI__builtin_qpx_qvfrim: 
     4848      ID = Intrinsic::ppc_qpx_qvfrim; 
     4849      break; 
     4850    case PPC::BI__builtin_qpx_qvfrin: 
     4851      ID = Intrinsic::ppc_qpx_qvfrin; 
     4852      break; 
     4853    case PPC::BI__builtin_qpx_qvfrip: 
     4854      ID = Intrinsic::ppc_qpx_qvfrip; 
     4855      break; 
     4856    case PPC::BI__builtin_qpx_qvfriz: 
     4857      ID = Intrinsic::ppc_qpx_qvfriz; 
     4858      break; 
     4859    case PPC::BI__builtin_qpx_qvfrsp: 
     4860      ID = Intrinsic::ppc_qpx_qvfrsp; 
     4861      break; 
     4862    case PPC::BI__builtin_qpx_qvfrsqrte: 
     4863      ID = Intrinsic::ppc_qpx_qvfrsqrte; 
     4864      break; 
     4865    case PPC::BI__builtin_qpx_qvfrsqrtes: 
     4866      ID = Intrinsic::ppc_qpx_qvfrsqrtes; 
     4867      break; 
     4868    case PPC::BI__builtin_qpx_qvfadd: 
     4869      ID = Intrinsic::ppc_qpx_qvfadd; 
     4870      break; 
     4871    case PPC::BI__builtin_qpx_qvfcmpeq: 
     4872      ID = Intrinsic::ppc_qpx_qvfcmpeq; 
     4873      break; 
     4874    case PPC::BI__builtin_qpx_qvfcmpgt: 
     4875      ID = Intrinsic::ppc_qpx_qvfcmpgt; 
     4876      break; 
     4877    case PPC::BI__builtin_qpx_qvfcmplt: 
     4878      ID = Intrinsic::ppc_qpx_qvfcmplt; 
     4879      break; 
     4880    case PPC::BI__builtin_qpx_qvfcpsgn: 
     4881      ID = Intrinsic::ppc_qpx_qvfcpsgn; 
     4882      break; 
     4883    case PPC::BI__builtin_qpx_qvfmadd: 
     4884      ID = Intrinsic::ppc_qpx_qvfmadd; 
     4885      break; 
     4886    case PPC::BI__builtin_qpx_qvfmsub: 
     4887      ID = Intrinsic::ppc_qpx_qvfmsub; 
     4888      break; 
     4889    case PPC::BI__builtin_qpx_qvfmul: 
     4890      ID = Intrinsic::ppc_qpx_qvfmul; 
     4891      break; 
     4892    case PPC::BI__builtin_qpx_qvfnmadd: 
     4893      ID = Intrinsic::ppc_qpx_qvfnmadd; 
     4894      break; 
     4895    case PPC::BI__builtin_qpx_qvfnmsub: 
     4896      ID = Intrinsic::ppc_qpx_qvfnmsub; 
     4897      break; 
     4898    case PPC::BI__builtin_qpx_qvfsel: 
     4899      ID = Intrinsic::ppc_qpx_qvfsel; 
     4900      break; 
     4901    case PPC::BI__builtin_qpx_qvfsub: 
     4902      ID = Intrinsic::ppc_qpx_qvfsub; 
     4903      break; 
     4904    case PPC::BI__builtin_qpx_qvftstnan: 
     4905      ID = Intrinsic::ppc_qpx_qvftstnan; 
     4906      break; 
     4907    case PPC::BI__builtin_qpx_qvfxmadd: 
     4908      ID = Intrinsic::ppc_qpx_qvfxmadd; 
     4909      break; 
     4910    case PPC::BI__builtin_qpx_qvfxmul: 
     4911      ID = Intrinsic::ppc_qpx_qvfxmul; 
     4912      break; 
     4913    case PPC::BI__builtin_qpx_qvfxxcpnmadd: 
     4914      ID = Intrinsic::ppc_qpx_qvfxxcpnmadd; 
     4915      break; 
     4916    case PPC::BI__builtin_qpx_qvfxxmadd: 
     4917      ID = Intrinsic::ppc_qpx_qvfxxmadd; 
     4918      break; 
     4919    case PPC::BI__builtin_qpx_qvfxxnpmadd: 
     4920      ID = Intrinsic::ppc_qpx_qvfxxnpmadd; 
     4921      break; 
     4922    case PPC::BI__builtin_qpx_qvflogical: 
     4923      ID = Intrinsic::ppc_qpx_qvflogical; 
     4924      break; 
     4925    case PPC::BI__builtin_qpx_qvfperm: 
     4926      ID = Intrinsic::ppc_qpx_qvfperm; 
     4927      break; 
     4928    case PPC::BI__builtin_qpx_qvlpcld: 
     4929      ID = Intrinsic::ppc_qpx_qvlpcld; 
     4930      break; 
     4931    case PPC::BI__builtin_qpx_qvlpcls: 
     4932      ID = Intrinsic::ppc_qpx_qvlpcls; 
     4933      break; 
     4934    case PPC::BI__builtin_qpx_qvlpcrd: 
     4935      ID = Intrinsic::ppc_qpx_qvlpcrd; 
     4936      break; 
     4937    case PPC::BI__builtin_qpx_qvlpcrs: 
     4938      ID = Intrinsic::ppc_qpx_qvlpcrs; 
     4939      break; 
     4940    case PPC::BI__builtin_qpx_qvgpci: 
     4941      ID = Intrinsic::ppc_qpx_qvgpci; 
     4942      break; 
     4943    case PPC::BI__builtin_qpx_qvlfcda: 
     4944      ID = Intrinsic::ppc_qpx_qvlfcda; 
     4945      break; 
     4946    case PPC::BI__builtin_qpx_qvlfcd: 
     4947      ID = Intrinsic::ppc_qpx_qvlfcd; 
     4948      break; 
     4949    case PPC::BI__builtin_qpx_qvlfcsa: 
     4950      ID = Intrinsic::ppc_qpx_qvlfcsa; 
     4951      break; 
     4952    case PPC::BI__builtin_qpx_qvlfcs: 
     4953      ID = Intrinsic::ppc_qpx_qvlfcs; 
     4954      break; 
     4955    case PPC::BI__builtin_qpx_qvlfda: 
     4956      ID = Intrinsic::ppc_qpx_qvlfda; 
     4957      break; 
     4958    case PPC::BI__builtin_qpx_qvlfd: 
     4959      ID = Intrinsic::ppc_qpx_qvlfd; 
     4960      break; 
     4961    case PPC::BI__builtin_qpx_qvlfiwaa: 
     4962      ID = Intrinsic::ppc_qpx_qvlfiwaa; 
     4963      break; 
     4964    case PPC::BI__builtin_qpx_qvlfiwa: 
     4965      ID = Intrinsic::ppc_qpx_qvlfiwa; 
     4966      break; 
     4967    case PPC::BI__builtin_qpx_qvlfiwza: 
     4968      ID = Intrinsic::ppc_qpx_qvlfiwza; 
     4969      break; 
     4970    case PPC::BI__builtin_qpx_qvlfiwz: 
     4971      ID = Intrinsic::ppc_qpx_qvlfiwz; 
     4972      break; 
     4973    case PPC::BI__builtin_qpx_qvlfsa: 
     4974      ID = Intrinsic::ppc_qpx_qvlfsa; 
     4975      break; 
     4976    case PPC::BI__builtin_qpx_qvlfs: 
     4977      ID = Intrinsic::ppc_qpx_qvlfs; 
     4978      break; 
     4979    case PPC::BI__builtin_qpx_qvstfcda: 
     4980      ID = Intrinsic::ppc_qpx_qvstfcda; 
     4981      break; 
     4982    case PPC::BI__builtin_qpx_qvstfcd: 
     4983      ID = Intrinsic::ppc_qpx_qvstfcd; 
     4984      break; 
     4985    case PPC::BI__builtin_qpx_qvstfcsa: 
     4986      ID = Intrinsic::ppc_qpx_qvstfcsa; 
     4987      break; 
     4988    case PPC::BI__builtin_qpx_qvstfcs: 
     4989      ID = Intrinsic::ppc_qpx_qvstfcs; 
     4990      break; 
     4991    case PPC::BI__builtin_qpx_qvstfda: 
     4992      ID = Intrinsic::ppc_qpx_qvstfda; 
     4993      break; 
     4994    case PPC::BI__builtin_qpx_qvstfd: 
     4995      ID = Intrinsic::ppc_qpx_qvstfd; 
     4996      break; 
     4997    case PPC::BI__builtin_qpx_qvstfiwa: 
     4998      ID = Intrinsic::ppc_qpx_qvstfiwa; 
     4999      break; 
     5000    case PPC::BI__builtin_qpx_qvstfiw: 
     5001      ID = Intrinsic::ppc_qpx_qvstfiw; 
     5002      break; 
     5003    case PPC::BI__builtin_qpx_qvstfsa: 
     5004      ID = Intrinsic::ppc_qpx_qvstfsa; 
     5005      break; 
     5006    case PPC::BI__builtin_qpx_qvstfs: 
     5007      ID = Intrinsic::ppc_qpx_qvstfs; 
     5008      break; 
     5009    } 
     5010    llvm::Function *F = CGM.getIntrinsic(ID); 
     5011    return Builder.CreateCall(F, Ops, ""); 
     5012  } 
    45235013  } 
    45245014} 
  • lib/Driver/Driver.cpp

    diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
    index 44521a1..b66be2d 100644
    a b  
    17091709    case llvm::Triple::Minix: 
    17101710      TC = new toolchains::Minix(*this, Target, Args); 
    17111711      break; 
     1712    case llvm::Triple::CNK: 
     1713      // fall through: same as Linux 
    17121714    case llvm::Triple::Linux: 
    17131715      if (Target.getArch() == llvm::Triple::hexagon) 
    17141716        TC = new toolchains::Hexagon_TC(*this, Target); 
  • lib/Driver/ToolChains.cpp

    diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
    index c883e44..cdf46b8 100644
    a b  
    20252025Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) 
    20262026  : Generic_ELF(D, Triple, Args) { 
    20272027  llvm::Triple::ArchType Arch = Triple.getArch(); 
     2028 
    20282029  const std::string &SysRoot = getDriver().SysRoot; 
    20292030 
    20302031  // OpenSuse stores the linker with the compiler, add that to the search 
    2031   // path. 
     2032  // path. This is needed for the BG/P as well. 
    20322033  ToolChain::path_list &PPaths = getProgramPaths(); 
    20332034  PPaths.push_back(Twine(GCCInstallation.getParentLibPath() + "/../" + 
    20342035                         GCCInstallation.getTriple().str() + "/bin").str()); 
  • lib/Driver/Tools.cpp

    diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
    index 13d9820..911baa8 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(); 
     
    17511764    AddMIPSTargetArgs(Args, CmdArgs); 
    17521765    break; 
    17531766 
     1767  case llvm::Triple::ppc: 
     1768  case llvm::Triple::ppc64: 
     1769    AddPPCTargetArgs(Args, CmdArgs); 
     1770    break; 
     1771 
    17541772  case llvm::Triple::sparc: 
    17551773    AddSparcTargetArgs(Args, CmdArgs); 
    17561774    break; 
  • 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