When compiling to binary and with the demangling enabled, the assembler parser
was not correctly matching the "labels". The labelRe regex is tailored from
matching against the real symbol names, before any demangling. In the
binary+demangle context, we rely on objdump doing both at once, feeding our
parser with demangled names.
Make the labelRe match anything of the form:
00000000123af <every thing here is the label>:
fixes#3235
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
* Treat data definitions in the middle of functions as "strong"
Things like ARM jump tables put important data inline within a function. Such
data should be treated as a "strong" reference (e.g. a root use). For example:
```
sub r3, r0, #65
cmp r3, #19
ldrls pc, [pc, r3, asl #2]
b .L7
.word .L8
.word .L7
.word .L6
.word .L7
....etc...
.L7: some things
.L8: some other things
```
Without this change, the `.L8` label would be dropped as unused. But it's implicitly used
by the sequence of `.word`s in the middle of the function.
Closes#2788
* Keep curly bracket style of existing if-else block
Co-authored-by: RabsRincon <ruben@rinconblanco.es>
* Added support for HIP compilation for AMD GPUs.
At the moment it only supports stand-alone compilation w/o ROCm SDK.
* Enable barebones HIP compilation.
Clang by itself is good enough to compile simple kernels that do not need ROCm
SDK headers and bitcode libraries.
Closes#2760
The KVX assembly uses ;; as the bundle separator, which can be a problem to
parse as ; is also commonly used as a comment marker.
Latest compiler version also adds cycle information for opt level >= 1, which
confuses the current comment filter that treats the bundle separator as comment.
Tune the regex to treat the following :
addd $r12 = $r12, -96
get $r16 = $ra
;; # (end cycle 0)
as non-comment. The ';; #' is special-cased as non-comment.
* Highlight the lines in LLVM-IR corresponding to specific tokens
In addition to the highlighting of all the IR lines corresponding to the given
source line (using blue background), also make the lines corresponding to the
given token on that source line.
* Parse the optional source column number in the text asm
* Bolden the asm lines corresponding to the given token and vice-versa
* Ignore column number if it is 0; add a test with no column specified
* Report back an estimate of filtered lines
The commit is tested, but I had to remove an eslint check and
not run the filter tests because I forgot how to bless them.
* Implement proposed wording change
* Add filtered report in compile info label
* Simplify and add reporting to binary mode filter
* Fix bad git stash shenanigans
* ignore filteredCount when testing
* filteredCount is not guaranteed to be returned
* extra check
Co-authored-by: partouf <partouf@gmail.com>
* time executeDirect in ms
* measure library download and extract time
* time package download
* download timings when using execution checkbox
* proof of concept timing graph implementation
* use vertical bars for graph
* add objdump time
* add timing for asm parsing
* add timing graph to execution pane as well
* download timings on execution pane
* things
The largest changes here are:
- enforcing single quotes for strings
- enforcing trailing commas where possible
In addition to those we have enabled several eslint plugins:
- plugin:requirejs/recommended, to enforce some conventions in require statements
- plugin:node/recommended, to enforce correct usage of various node.js APIs
- plugin:unicorn/recommended, which contains a pretty mixed bag of useful rules
This PR attempts to not change code behavior when possible. In cases where fixing
existing code would change semantics, a linting exclusion has been placed in the
code base to silence the error. You can find these by searching for `eslint-disable-next-line`.
Co-authored-by: Austin Morton <austinpmorton@gmail.com>
* Recognize globals emitted for the Motorola M*CORE target
* Recognize globals emitted for the Renesas RX target
Co-authored-by: Patrick Quist <partouf@gmail.com>
- Use `const` where it is possible.
- Move regexes into variables and give them a name.
- Eliminate `lineNumber` variable and use the length of the asm array.
- Use `updateDecorations()` function to decorate label usages.
- Update and fix test cases.
Parsing the labels on the server-side is more general, more flexible
and it can be easily tested.
- Store label definitions in a map. The key will be the label name and
the value will be the line number where the label definition can be
found.
- For each line get the labels which are used in the given line and
remove labels which do not have a definition.
- Modify the return value of the `processBinaryAsm` and `process`
function to return with the label definition too.
- Demangle the label usages and the label definitions too.
K1 MPPA uses ;; as a bundle separator (same syntax as IA64,
if it gets added to CE someday...).
The bundle separator must be alone on the line, see for example:
```
ld $r6 = 16[$r20]
addx8d $r9 = $r2, $r5
addw $r10 = $r2, -1
;;
addd $r0 = $r6, $r9
addd $r17 = $r10, 1
cb.wlez $r2? .L3
;;
copyd $r15 = $r0
;;
maddd $r15 = $r17, -8
;;
```
Single ; or ;; followed by any non whitespace before eol still
considered a comment.
E.g. for such directive
.file 1 "/home/user" "example.c"
now will be constructed valid path:
'/home/user/example.c'
instead of this broken path:
'/home/user/ "example.c"'
This commit adds support for hosting on windows, as well as better
support for the Visual C++ compiler. Specific interesting changes are:
- switch from /FAsc to /FA
- order functions in file order
- support demangling win32-style identifiers with undname
- clang++ and vc++ on win32 host are both supported