|
clang 24.0.0git
|
#include "CGBuiltin.h"#include "CodeGenFunction.h"#include "clang/Basic/TargetBuiltins.h"#include "llvm/IR/IntrinsicsS390.h"Go to the source code of this file.
Macros | |
| #define | INTRINSIC_WITH_CC(NAME) |
Functions | |
| static Value * | EmitSystemZIntrinsicWithCC (CodeGenFunction &CGF, unsigned IntrinsicID, const CallExpr *E) |
| Handle a SystemZ function in which the final argument is a pointer to an int that receives the post-instruction CC value. | |
| static Value * | EmitAtomicCmpXchgForZOSIntrin (CodeGenFunction &CGF, const CallExpr *E, llvm::Type *IntType, bool HasAddr) |
| For z/OS, the builtin __cs1 has the following signature: int __cs1(void * Comparand,
void * Destination,
void * Exchange); Whereas the llvm 'cmpxchg' instruction has the following syntax: compxchg *Destination, Comparand, Exchange. | |
| #define INTRINSIC_WITH_CC | ( | NAME | ) |
Referenced by clang::CodeGen::CodeGenFunction::EmitSystemZBuiltinExpr().
|
static |
For z/OS, the builtin __cs1 has the following signature: int __cs1(void * Comparand, void * Destination, void * Exchange); Whereas the llvm 'cmpxchg' instruction has the following syntax: compxchg *Destination, Comparand, Exchange.
So we need to swap Comparand & Destination and dereference Comparand & Exchange when invoking CreateAtomicCmpXchg. For this reason we can not use the utility function MakeAtomicCmpXchgValue.
Definition at line 49 of file SystemZ.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CGBuilderTy::CreateAtomicCmpXchg(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CallExpr::getArg(), clang::CodeGen::CodeGenFunction::getContext(), clang::Expr::getType(), and clang::ASTContext::toCharUnitsFromBits().
Referenced by clang::CodeGen::CodeGenFunction::EmitSystemZBuiltinExpr().
|
static |
Handle a SystemZ function in which the final argument is a pointer to an int that receives the post-instruction CC value.
At the LLVM level this is represented as a function that returns a {result, cc} pair.
Definition at line 25 of file SystemZ.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::Call, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CallExpr::getArg(), clang::CodeGen::CodeGenModule::getIntrinsic(), and clang::CallExpr::getNumArgs().