mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-30 01:44:36 +00:00
Inline asm expression (-llvm-api)
See https://llvm.org/docs/LangRef.html#inline-assembler-expressions Example: ``` x := asm(i32) -> i32 { "bswap $0", "=r,r", }(123); ``` Allowed directives `#side_effect`, `#align_stack`, `#att`, `#intel` e.g. `asm() #side_effect #intel {...}`
This commit is contained in:
@@ -1210,6 +1210,10 @@ bool is_type_proc(Type *t) {
|
||||
t = base_type(t);
|
||||
return t->kind == Type_Proc;
|
||||
}
|
||||
bool is_type_asm_proc(Type *t) {
|
||||
t = base_type(t);
|
||||
return t->kind == Type_Proc && t->Proc.calling_convention == ProcCC_InlineAsm;
|
||||
}
|
||||
bool is_type_poly_proc(Type *t) {
|
||||
t = base_type(t);
|
||||
return t->kind == Type_Proc && t->Proc.is_polymorphic;
|
||||
|
||||
Reference in New Issue
Block a user