diff options
Diffstat (limited to 'src/codegen/llvm')
| -rw-r--r-- | src/codegen/llvm/bindings.zig | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/codegen/llvm/bindings.zig b/src/codegen/llvm/bindings.zig index 6e480322e3..1e6201a42a 100644 --- a/src/codegen/llvm/bindings.zig +++ b/src/codegen/llvm/bindings.zig @@ -133,6 +133,9 @@ pub const Value = opaque { pub const constIntToPtr = LLVMConstIntToPtr; extern fn LLVMConstIntToPtr(ConstantVal: *const Value, ToType: *const Type) *const Value; + + pub const setWeak = LLVMSetWeak; + extern fn LLVMSetWeak(CmpXchgInst: *const Value, IsWeak: Bool) void; }; pub const Type = opaque { @@ -299,6 +302,14 @@ pub const Builder = opaque { Name: [*:0]const u8, ) *const Value; + pub const buildSExt = LLVMBuildSExt; + extern fn LLVMBuildSExt( + *const Builder, + Val: *const Value, + DestTy: *const Type, + Name: [*:0]const u8, + ) *const Value; + pub const buildCall = LLVMBuildCall; extern fn LLVMBuildCall( *const Builder, @@ -387,6 +398,15 @@ pub const Builder = opaque { pub const buildFDiv = LLVMBuildFDiv; extern fn LLVMBuildFDiv(*const Builder, LHS: *const Value, RHS: *const Value, Name: [*:0]const u8) *const Value; + pub const buildURem = LLVMBuildURem; + extern fn LLVMBuildURem(*const Builder, LHS: *const Value, RHS: *const Value, Name: [*:0]const u8) *const Value; + + pub const buildSRem = LLVMBuildSRem; + extern fn LLVMBuildSRem(*const Builder, LHS: *const Value, RHS: *const Value, Name: [*:0]const u8) *const Value; + + pub const buildFRem = LLVMBuildFRem; + extern fn LLVMBuildFRem(*const Builder, LHS: *const Value, RHS: *const Value, Name: [*:0]const u8) *const Value; + pub const buildAnd = LLVMBuildAnd; extern fn LLVMBuildAnd(*const Builder, LHS: *const Value, RHS: *const Value, Name: [*:0]const u8) *const Value; @@ -476,6 +496,35 @@ pub const Builder = opaque { DestTy: *const Type, Name: [*:0]const u8, ) *const Value; + + pub const buildInsertValue = LLVMBuildInsertValue; + extern fn LLVMBuildInsertValue( + *const Builder, + AggVal: *const Value, + EltVal: *const Value, + Index: c_uint, + Name: [*:0]const u8, + ) *const Value; + + pub const buildAtomicCmpXchg = LLVMBuildAtomicCmpXchg; + extern fn LLVMBuildAtomicCmpXchg( + builder: *const Builder, + ptr: *const Value, + cmp: *const Value, + new_val: *const Value, + success_ordering: AtomicOrdering, + failure_ordering: AtomicOrdering, + is_single_threaded: Bool, + ) *const Value; + + pub const buildSelect = LLVMBuildSelect; + extern fn LLVMBuildSelect( + *const Builder, + If: *const Value, + Then: *const Value, + Else: *const Value, + Name: [*:0]const u8, + ) *const Value; }; pub const IntPredicate = enum(c_uint) { @@ -856,3 +905,13 @@ pub const Linkage = enum(c_uint) { LinkerPrivate, LinkerPrivateWeak, }; + +pub const AtomicOrdering = enum(c_uint) { + NotAtomic = 0, + Unordered = 1, + Monotonic = 2, + Acquire = 4, + Release = 5, + AcquireRelease = 6, + SequentiallyConsistent = 7, +}; |
