mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-12 03:32:10 +00:00
add load/store volatility control to the C API, patch by Yiannis Tsiouris!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153238 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1fe6bfca59
commit
eabe3ad57d
@ -2398,6 +2398,8 @@ LLVMValueRef LLVMBuildGlobalString(LLVMBuilderRef B, const char *Str,
|
|||||||
const char *Name);
|
const char *Name);
|
||||||
LLVMValueRef LLVMBuildGlobalStringPtr(LLVMBuilderRef B, const char *Str,
|
LLVMValueRef LLVMBuildGlobalStringPtr(LLVMBuilderRef B, const char *Str,
|
||||||
const char *Name);
|
const char *Name);
|
||||||
|
LLVMBool LLVMGetVolatile(LLVMValueRef MemoryAccessInst);
|
||||||
|
void LLVMSetVolatile(LLVMValueRef MemoryAccessInst, LLVMBool IsVolatile);
|
||||||
|
|
||||||
/* Casts */
|
/* Casts */
|
||||||
LLVMValueRef LLVMBuildTrunc(LLVMBuilderRef, LLVMValueRef Val,
|
LLVMValueRef LLVMBuildTrunc(LLVMBuilderRef, LLVMValueRef Val,
|
||||||
|
@ -2066,6 +2066,20 @@ LLVMValueRef LLVMBuildGlobalStringPtr(LLVMBuilderRef B, const char *Str,
|
|||||||
return wrap(unwrap(B)->CreateGlobalStringPtr(Str, Name));
|
return wrap(unwrap(B)->CreateGlobalStringPtr(Str, Name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLVMBool LLVMGetVolatile(LLVMValueRef MemAccessInst) {
|
||||||
|
Value *P = unwrap<Value>(MemAccessInst);
|
||||||
|
if (LoadInst *LI = dyn_cast<LoadInst>(P))
|
||||||
|
return LI->isVolatile();
|
||||||
|
return cast<StoreInst>(P)->isVolatile();
|
||||||
|
}
|
||||||
|
|
||||||
|
void LLVMSetVolatile(LLVMValueRef MemAccessInst, LLVMBool isVolatile) {
|
||||||
|
Value *P = unwrap<Value>(MemAccessInst);
|
||||||
|
if (LoadInst *LI = dyn_cast<LoadInst>(P))
|
||||||
|
return LI->setVolatile(isVolatile);
|
||||||
|
return cast<StoreInst>(P)->setVolatile(isVolatile);
|
||||||
|
}
|
||||||
|
|
||||||
/*--.. Casts ...............................................................--*/
|
/*--.. Casts ...............................................................--*/
|
||||||
|
|
||||||
LLVMValueRef LLVMBuildTrunc(LLVMBuilderRef B, LLVMValueRef Val,
|
LLVMValueRef LLVMBuildTrunc(LLVMBuilderRef B, LLVMValueRef Val,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user