mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-01 06:38:03 -06:00
Merge branch 'master' into storage
This commit is contained in:
@@ -160,7 +160,7 @@ compiler.clang_p1144.notification=Experimental __is_trivially_relocatable; see <
|
||||
compiler.clang_autonsdmi.exe=/opt/compiler-explorer/clang-autonsdmi-trunk/bin/clang++
|
||||
compiler.clang_autonsdmi.semver=(experimental auto NSDMI)
|
||||
compiler.clang_autonsdmi.options=-std=c++2a -stdlib=libc++
|
||||
compiler.clang_autonsdmi.notification=Experimental auto NSDMI
|
||||
compiler.clang_autonsdmi.notification=Experimental auto NSDMI; see <a href="https://cor3ntin.github.io/posts/auto_nsdmi/" target="_blank" rel="noopener noreferrer">this blog post <sup><small class="glyphicon glyphicon-new-window opens-new-window" title="Opens in a new window"></small></sup></a> for more information
|
||||
|
||||
# Clang for RISC-V
|
||||
group.rvclang.compilers=rv32clang
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ class Demangler extends AsmRegex {
|
||||
this.includeMetadata = true;
|
||||
this.compiler = compiler;
|
||||
|
||||
this.jumpDef = /(j.+|b|bl|blx)\s+([.a-z_$][a-z0-9$_@.]*)/i;
|
||||
this.jumpDef = /(j\w+|b|bl|blx)\s+([a-z_$][a-z0-9$_@]*)/i;
|
||||
this.callDef = /call[q]?\s+([.a-z_$][a-z0-9$_@.]*)/i;
|
||||
|
||||
// symbols in a mov or lea command starting with an underscore
|
||||
|
||||
@@ -209,6 +209,46 @@ describe('Basic demangling', function () {
|
||||
]
|
||||
);
|
||||
});
|
||||
|
||||
it('Should ignore comments after jmps', function () {
|
||||
const result = {};
|
||||
result.asm = [
|
||||
{"text": " jmp _Z1fP6mytype # TAILCALL"}
|
||||
];
|
||||
|
||||
const demangler = new Demangler(cppfiltpath, new DummyCompiler());
|
||||
demangler.demanglerArguments = ['-n'];
|
||||
demangler.result = result;
|
||||
demangler.symbolstore = new SymbolStore();
|
||||
demangler.collectLabels();
|
||||
|
||||
const output = demangler.othersymbols.listSymbols();
|
||||
output.should.deep.equal(
|
||||
[
|
||||
"_Z1fP6mytype"
|
||||
]
|
||||
);
|
||||
});
|
||||
|
||||
it('Should still work with normal jmps', function () {
|
||||
const result = {};
|
||||
result.asm = [
|
||||
{"text": " jmp _Z1fP6mytype"}
|
||||
];
|
||||
|
||||
const demangler = new Demangler(cppfiltpath, new DummyCompiler());
|
||||
demangler.demanglerArguments = ['-n'];
|
||||
demangler.result = result;
|
||||
demangler.symbolstore = new SymbolStore();
|
||||
demangler.collectLabels();
|
||||
|
||||
const output = demangler.othersymbols.listSymbols();
|
||||
output.should.deep.equal(
|
||||
[
|
||||
"_Z1fP6mytype"
|
||||
]
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
function DoDemangleTest(root, filename) {
|
||||
|
||||
Reference in New Issue
Block a user