rustc: add new intrinsics - atomic_cxchg{_acq,_rel}

This commit is contained in:
Luqman Aden 2012-10-21 22:23:50 -04:00
parent 082d3d5167
commit e1db959ec2
9 changed files with 73 additions and 6 deletions

View file

@ -482,6 +482,14 @@ extern "C" LLVMTypeRef LLVMMetadataType(void) {
return LLVMMetadataTypeInContext(LLVMGetGlobalContext());
}
extern "C" LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B,
LLVMValueRef target,
LLVMValueRef old,
LLVMValueRef source,
AtomicOrdering order) {
return wrap(unwrap(B)->CreateAtomicCmpXchg(unwrap(target), unwrap(old),
unwrap(source), order));
}
extern "C" LLVMValueRef LLVMBuildAtomicRMW(LLVMBuilderRef B,
AtomicRMWInst::BinOp op,
LLVMValueRef target,