|
|
|||
File indexing completed on 2026-05-10 08:37:05
0001 //===----- SemaPPC.h ------- PPC target-specific routines -----*- C++ -*---===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 /// \file 0009 /// This file declares semantic analysis functions specific to PowerPC. 0010 /// 0011 //===----------------------------------------------------------------------===// 0012 0013 #ifndef LLVM_CLANG_SEMA_SEMAPPC_H 0014 #define LLVM_CLANG_SEMA_SEMAPPC_H 0015 0016 #include "clang/AST/ASTFwd.h" 0017 #include "clang/AST/Type.h" 0018 #include "clang/Basic/SourceLocation.h" 0019 #include "clang/Sema/SemaBase.h" 0020 0021 namespace clang { 0022 class TargetInfo; 0023 0024 class SemaPPC : public SemaBase { 0025 public: 0026 SemaPPC(Sema &S); 0027 0028 bool CheckPPCBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID, 0029 CallExpr *TheCall); 0030 // 16 byte ByVal alignment not due to a vector member is not honoured by XL 0031 // on AIX. Emit a warning here that users are generating binary incompatible 0032 // code to be safe. 0033 // Here we try to get information about the alignment of the struct member 0034 // from the struct passed to the caller function. We only warn when the struct 0035 // is passed byval, hence the series of checks and early returns if we are a 0036 // not passing a struct byval. 0037 void checkAIXMemberAlignment(SourceLocation Loc, const Expr *Arg); 0038 0039 /// BuiltinPPCMMACall - Check the call to a PPC MMA builtin for validity. 0040 /// Emit an error and return true on failure; return false on success. 0041 /// TypeStr is a string containing the type descriptor of the value returned 0042 /// by the builtin and the descriptors of the expected type of the arguments. 0043 bool BuiltinPPCMMACall(CallExpr *TheCall, unsigned BuiltinID, 0044 const char *TypeDesc); 0045 0046 bool CheckPPCMMAType(QualType Type, SourceLocation TypeLoc); 0047 0048 // Customized Sema Checking for VSX builtins that have the following 0049 // signature: vector [...] builtinName(vector [...], vector [...], const int); 0050 // Which takes the same type of vectors (any legal vector type) for the first 0051 // two arguments and takes compile time constant for the third argument. 0052 // Example builtins are : 0053 // vector double vec_xxpermdi(vector double, vector double, int); 0054 // vector short vec_xxsldwi(vector short, vector short, int); 0055 bool BuiltinVSX(CallExpr *TheCall); 0056 }; 0057 } // namespace clang 0058 0059 #endif // LLVM_CLANG_SEMA_SEMAPPC_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|