| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
tianocore EDK2 have the NASM file format alternative to ASM based On
which compiler user is using.
https://github.com/tianocore/edk2
NASM are same as ASM file format
Signed-off-by: Ashraf Ali S <ashraf.ali.s@intel.com>
|
|
|
|
| |
Reference: https://llvm.org/docs/OpaquePointers.html
|
| |
|
|
|
|
|
| |
This allows lexing instructions like:
vpscatterqd %ymm0, 0x404050(,%zmm2,4) {%k1}
|
|
|
|
| |
Adds support for SSE/AVX/AVX-512 registers and 'rel' and 'abs' address
operators.
|
|
|
|
|
|
|
|
| |
This commit adds a new url field to a lexer, which can be used to link
to the language website, instead of relying on having the link in either
languages.rst or the docstring of the lexer. Additionally, it changes the
languages.rst file to auto-generate the list of lexers from the actual
source code, using the provided URL.
|
| |
|
| |
|
|
|
|
|
|
|
| |
* Update asm lexer for --no-show-raw-insn
* Update asm lexer for #-style comments in Nasm
Co-authored-by: Pierre Wilke <pierre.wilke@centralesupelec.fr>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Whitespace token modernization - ambient lexer
* Whitespace token modernization - ampl lexer
* Whitespace token modernization - apdlexer lexer
* Whitespace token modernization - apl lexer
* Whitespace token modernization - adl lexer
* Whitespace token modernization - arrow lexer
* Whitespace token modernization - asm lexer
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The keywords are based on the extraction of keywords the LLVM 12.0 lexer
source code. They were taken from the `KEYWORD` and `INSTKEYWORD` macros
for the 'Keyword' tokens, and 'Type' tokens were from the `TYPEKEYWORD`
macro. The keywords were then sorted against the current set.
Due to formatting issues in the arrays, the actual Type diff is:
``` diff
+x86_mmx
+x86_amx
```
and the Keyword diff is:
``` diff
+aarch64_sve_vector_pcs
+aarch64_vector_pcs
+alwaysInline
+amdgpu_gfx
+blockcount
+byref
+callbr
+canAutoHide
+cfguard_checkcc
+dso_local_equivalent
+fneg
+mustprogress
+nocallback
+nofree
+noInline
+nomerge
+noprofile
+nosync
+noundef
+null_pointer_is_valid
+param
+params
+partition
+preallocated
+sanitize_memtag
+speculative_load_hardening
+tailcc
+typeidCompatibleVTable
+varFlags
+vcall_visibility
+virtFunc
+vscale
+vTableFuncs
+x
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pyupgrade is a tool to automatically upgrade syntax for newer versions
of the Python language.
The project has been Python 3 only since
35544e2fc6eed0ce4a27ec7285aac71ff0ddc473, allowing for several cleanups:
- Remove unnecessary "-*- coding: utf-8 -*-" cookie. Python 3 reads all
source files as utf-8 by default.
- Replace IOError/EnvironmentError with OSError. Python 3 unified these
exceptions. The old names are aliases only.
- Use the Python 3 shorter super() syntax.
- Remove "utf8" argument form encode/decode. In Python 3, this value is
the default.
- Remove "r" from open() calls. In Python 3, this value is the default.
- Remove u prefix from Unicode strings. In Python 3, all strings are
Unicode.
- Replace io.open() with builtin open(). In Python 3, these functions
are functionally equivalent.
Co-authored-by: Matthäus G. Chajdas <Anteru@users.noreply.github.com>
|
| |
|
| |
|
| |
|
|
|
|
| |
... which is not equivalent in Unicode mode
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GNU supports ARM syntax which uses notation like #1 for constants.
Currently this is handled like a comment which is incorrect.
Take the case of:
ldr r0, [r1, #0]
Right now the #0] would be treated like a comment and looks
very poor.
Was referenced in issue #627
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
|
| |
|
|
|
|
|
|
|
| |
x86_64 has 8 registers r8-r15. The current syntax only accepts them with
a trailing letter. The letter is used to indicate the register size.
However, r8 is also a valid register, for a 64 bit wide register.
For reference on the register names see https://www.cs.uaf.edu/2017/fall/cs301/reference/x86_64.html
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MIR is a human readable serialization format that's used to represent LLVM's
machine specific intermediate representation. It allows LLVM's developers to
see the state of the compilation process at various points, as well as test
individual pieces of the compiler. Our documentation for the format can be
found at https://llvm.org/docs/MIRLangRef.html.
Adding a lexer for this format will allow the LLVM documentation to contain
syntax highlighted examples of LLVM-MIR. Two lexers are included in this
change. 'llvm-mir' lexes the overall document format and delegates to 'llvm' and
'llvm-mir-body' as appropriate. 'llvm-mir-body' lexes the contents of the 'body:'
attribute and can be used directly to syntax highlight code examples without
including the document boilerplate.
Since the 'llvm-mir' lexer delegates to the 'llvm' lexer at times, this change
also adds the 'immarg' and 'willreturn' keywords to the 'llvm' lexer as these
were missing.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
NASM is much more popular than TASM, but get_lexer_for_filename('.asm') would
return TASM. Resolved by changing the NASM priority to 1, and adding an
analyse_text implementation to both NasmLexer and TasmLexer to help resolve
which one to use (PROC should be fairly common in TASM code.)
|
| |
|
|
|
|
|
|
|
| |
Directives were parsed independent of whitespace after them, which caused the
cpuid instruction to be parsed as CPU & id, instead of cpuid. We now expect a
whitespace character after a directive, which seems to match the Nasm
documentation.
|
| |
|
|
|
|
|
| |
Add to CHANGES, languages, add versionadded, recreate mappings, fix DASM16
alias.
|
|
|
|
|
|
|
|
|
| |
Lexers copied unmodified from
https://github.com/liluo/pygments-github-lexers
which is available under a 2-clause BSD license (same as pygments),
copyright 2012 to GitHub, Inc.
Fixes #1391 and #1150.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The keywords are based extracted from the source code
of the LLVM lexer (llvm-7.0.0.src/lib/AsmParser) and
is based on the first argument to the KEYWORD,
TYPEKEYWORD and INSTKEYWORD macros. The list of keywords
were then sorted in lexicographic order.
A diff with added and removed keywords is made available
at https://gist.github.com/mewmew/508e090a361095eeb60ffa88321e878a
Specifically the following 10 keywords were removed:
begin, dbg, end, free, getresult, linker_private,
linker_private, malloc, singlethread and x86_64_win64cc
And 96 new keywords were added.
|
|\
| |
| |
| | |
Fix handling of end-of-line comments in asm lexer
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When there is a comment after an instruction, e.g.
mov $1,%eax ; move 1 to eax
ret
the next instruction (ret above) is not properly highlighted. This
patch fixes that.
This was also reported in #1477.
|
|/
|
|
| |
Also, raise on warnings from Pygments only.
|
| |
|
|\ |
|
| | |
|
|\ \
| |/
|/|
| | |
LLVMLexer: added 58 keywords and 'token' type to match LLVM 4.0 (Issue #1263)
|
| | |
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|