@@ -39,7 +39,8 @@ arguments as a tuple-type in `argtyp`.
39
39
:(@asmcall )
40
40
41
41
macro asmcall (asm:: String , constraints:: String , side_effects:: Bool ,
42
- rettyp:: Union{Expr,Symbol} = :(Nothing), argtyp:: Expr = :(Tuple{}), args... )
42
+ rettyp:: Union{Expr,Symbol,Type} = :(Nothing),
43
+ argtyp:: Union{Expr,Type} = :(Tuple{}), args... )
43
44
asm_val = Val {Symbol(asm)} ()
44
45
constraints_val = Val {Symbol(constraints)} ()
45
46
return esc (:(LLVM. Interop. _asmcall ($ asm_val, $ constraints_val,
49
50
50
51
# shorthand: no side_effects
51
52
macro asmcall (asm:: String , constraints:: String ,
52
- rettyp:: Union{Expr,Symbol} = :(Nothing), argtyp:: Expr = :(Tuple{}), args... )
53
+ rettyp:: Union{Expr,Symbol,Type} = :(Nothing),
54
+ argtyp:: Union{Expr,Type} = :(Tuple{}), args... )
53
55
esc (:(LLVM. Interop. @asmcall $ asm $ constraints false $ rettyp $ argtyp $ (args... )))
54
56
end
55
57
56
58
# shorthand: no side_effects or constraints
57
59
macro asmcall (asm:: String ,
58
- rettyp:: Union{Expr,Symbol} = :(Nothing), argtyp:: Expr = :(Tuple{}), args... )
60
+ rettyp:: Union{Expr,Symbol,Type} = :(Nothing),
61
+ argtyp:: Union{Expr,Type} = :(Tuple{}), args... )
59
62
esc (:(LLVM. Interop. @asmcall $ asm " " $ rettyp $ argtyp $ (args... )))
60
63
end
0 commit comments