diff options
| author | gingerBill <bill@gingerbill.org> | 2020-10-24 16:32:37 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-10-24 16:32:37 +0100 |
| commit | 4629754f7ced5df477eb017872ef65539db64a27 (patch) | |
| tree | fc2fc4b7a493c58adeb10bf54254fbbad66f2f67 /src/tokenizer.cpp | |
| parent | 0061e63db010cdb2043af63527b4c25f45652a51 (diff) | |
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 {...}`
Diffstat (limited to 'src/tokenizer.cpp')
| -rw-r--r-- | src/tokenizer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tokenizer.cpp b/src/tokenizer.cpp index 947e3e7a0..d89ec43b5 100644 --- a/src/tokenizer.cpp +++ b/src/tokenizer.cpp @@ -117,6 +117,7 @@ TOKEN_KIND(Token__KeywordBegin, ""), \ TOKEN_KIND(Token_inline, "inline"), \ TOKEN_KIND(Token_no_inline, "no_inline"), \ TOKEN_KIND(Token_context, "context"), \ + TOKEN_KIND(Token_asm, "asm"), \ TOKEN_KIND(Token_macro, "macro"), \ TOKEN_KIND(Token_const, "const"), \ TOKEN_KIND(Token__KeywordEnd, ""), \ |