[PATCH] D46437: [bindings/go] Add Go bindings for inline assembly
whitequark via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 28 09:50:49 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL343339: [bindings/go] Add Go bindings for inline assembly (authored by whitequark, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D46437?vs=145209&id=167503#toc
Repository:
rL LLVM
https://reviews.llvm.org/D46437
Files:
llvm/trunk/bindings/go/llvm/ir.go
Index: llvm/trunk/bindings/go/llvm/ir.go
===================================================================
--- llvm/trunk/bindings/go/llvm/ir.go
+++ llvm/trunk/bindings/go/llvm/ir.go
@@ -74,6 +74,7 @@
IntPredicate C.LLVMIntPredicate
FloatPredicate C.LLVMRealPredicate
LandingPadClause C.LLVMLandingPadClauseTy
+ InlineAsmDialect C.LLVMInlineAsmDialect
)
func (c Context) IsNil() bool { return c.C == nil }
@@ -315,6 +316,15 @@
)
//-------------------------------------------------------------------------
+// llvm.InlineAsmDialect
+//-------------------------------------------------------------------------
+
+const (
+ InlineAsmDialectATT InlineAsmDialect = C.LLVMInlineAsmDialectATT
+ InlineAsmDialectIntel InlineAsmDialect = C.LLVMInlineAsmDialectIntel
+)
+
+//-------------------------------------------------------------------------
// llvm.Context
//-------------------------------------------------------------------------
@@ -1237,6 +1247,16 @@
return
}
+// Operations on inline assembly
+func InlineAsm(t Type, asmString, constraints string, hasSideEffects, isAlignStack bool, dialect InlineAsmDialect) (rv Value) {
+ casm := C.CString(asmString)
+ defer C.free(unsafe.Pointer(casm))
+ cconstraints := C.CString(constraints)
+ defer C.free(unsafe.Pointer(cconstraints))
+ rv.C = C.LLVMGetInlineAsm(t.C, casm, C.size_t(len(asmString)), cconstraints, C.size_t(len(constraints)), boolToLLVMBool(hasSideEffects), boolToLLVMBool(isAlignStack), C.LLVMInlineAsmDialect(dialect))
+ return
+}
+
//-------------------------------------------------------------------------
// llvm.Builder
//-------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46437.167503.patch
Type: text/x-patch
Size: 1719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180928/9a37ae7a/attachment.bin>
More information about the llvm-commits
mailing list