@@ -394,6 +394,47 @@ class LLVM_LIBRARY_VISIBILITY MicrosoftX86_64_SPIR64TargetInfo
394394 }
395395};
396396
397+ // ARM64 SPIR64 Windows target
398+ class LLVM_LIBRARY_VISIBILITY WindowsARM64_SPIR64TargetInfo
399+ : public WindowsTargetInfo<SPIR64TargetInfo> {
400+ public:
401+ WindowsARM64_SPIR64TargetInfo (const llvm::Triple &Triple,
402+ const TargetOptions &Opts)
403+ : WindowsTargetInfo<SPIR64TargetInfo>(Triple, Opts) {
404+ LongWidth = LongAlign = 32 ;
405+ DoubleAlign = LongLongAlign = 64 ;
406+ IntMaxType = SignedLongLong;
407+ Int64Type = SignedLongLong;
408+ SizeType = UnsignedLongLong;
409+ PtrDiffType = SignedLongLong;
410+ IntPtrType = SignedLongLong;
411+ WCharType = UnsignedShort;
412+ }
413+
414+ BuiltinVaListKind getBuiltinVaListKind () const override {
415+ return TargetInfo::CharPtrBuiltinVaList;
416+ }
417+
418+ CallingConvCheckResult checkCallingConvention (CallingConv CC) const override {
419+ return (CC == CC_SpirFunction || CC == CC_OpenCLKernel) ? CCCR_OK
420+ : CCCR_Warning;
421+ }
422+ };
423+
424+ // ARM64 SPIR64 Windows Visual Studio target
425+ class LLVM_LIBRARY_VISIBILITY MicrosoftARM64_SPIR64TargetInfo
426+ : public WindowsARM64_SPIR64TargetInfo {
427+ public:
428+ MicrosoftARM64_SPIR64TargetInfo (const llvm::Triple &Triple,
429+ const TargetOptions &Opts)
430+ : WindowsARM64_SPIR64TargetInfo(Triple, Opts) {}
431+
432+ void getTargetDefines (const LangOptions &Opts,
433+ MacroBuilder &Builder) const override {
434+ WindowsARM64_SPIR64TargetInfo::getTargetDefines (Opts, Builder);
435+ }
436+ };
437+
397438class LLVM_LIBRARY_VISIBILITY BaseSPIRVTargetInfo : public BaseSPIRTargetInfo {
398439public:
399440 BaseSPIRVTargetInfo (const llvm::Triple &Triple, const TargetOptions &Opts)
@@ -591,6 +632,47 @@ class LLVM_LIBRARY_VISIBILITY MicrosoftX86_64_SPIRV64TargetInfo
591632 }
592633};
593634
635+ // ARM64 SPIRV64 Windows target
636+ class LLVM_LIBRARY_VISIBILITY WindowsARM64_SPIRV64TargetInfo
637+ : public WindowsTargetInfo<SPIRV64TargetInfo> {
638+ public:
639+ WindowsARM64_SPIRV64TargetInfo (const llvm::Triple &Triple,
640+ const TargetOptions &Opts)
641+ : WindowsTargetInfo<SPIRV64TargetInfo>(Triple, Opts) {
642+ LongWidth = LongAlign = 32 ;
643+ DoubleAlign = LongLongAlign = 64 ;
644+ IntMaxType = SignedLongLong;
645+ Int64Type = SignedLongLong;
646+ SizeType = UnsignedLongLong;
647+ PtrDiffType = SignedLongLong;
648+ IntPtrType = SignedLongLong;
649+ WCharType = UnsignedShort;
650+ }
651+
652+ BuiltinVaListKind getBuiltinVaListKind () const override {
653+ return TargetInfo::CharPtrBuiltinVaList;
654+ }
655+
656+ CallingConvCheckResult checkCallingConvention (CallingConv CC) const override {
657+ return (CC == CC_SpirFunction || CC == CC_OpenCLKernel) ? CCCR_OK
658+ : CCCR_Warning;
659+ }
660+ };
661+
662+ // ARM64 SPIRV64 Windows Visual Studio target
663+ class LLVM_LIBRARY_VISIBILITY MicrosoftARM64_SPIRV64TargetInfo
664+ : public WindowsARM64_SPIRV64TargetInfo {
665+ public:
666+ MicrosoftARM64_SPIRV64TargetInfo (const llvm::Triple &Triple,
667+ const TargetOptions &Opts)
668+ : WindowsARM64_SPIRV64TargetInfo(Triple, Opts) {}
669+
670+ void getTargetDefines (const LangOptions &Opts,
671+ MacroBuilder &Builder) const override {
672+ WindowsARM64_SPIRV64TargetInfo::getTargetDefines (Opts, Builder);
673+ }
674+ };
675+
594676class LLVM_LIBRARY_VISIBILITY SPIRV64AMDGCNTargetInfo final
595677 : public BaseSPIRVTargetInfo {
596678public:
0 commit comments