[PATCH] D109575: [LNT] Fixed relative addresses parsing in ASM code
Pavel Kosov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 10 08:15:48 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rLNT003fda785d99: [LNT] Fixed relative addresses parsing in ASM code (authored by kpdev42).
Repository:
rLNT LNT
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109575/new/
https://reviews.llvm.org/D109575
Files:
lnt/server/ui/static/lnt_profile.js
Index: lnt/server/ui/static/lnt_profile.js
===================================================================
--- lnt/server/ui/static/lnt_profile.js
+++ lnt/server/ui/static/lnt_profile.js
@@ -122,7 +122,7 @@
if (!noFallThru && nextInstruction)
targets.push(nextInstruction.address);
if (match.length > 1)
- targets.push(cfg.convertToAddress(match[1]));
+ targets.push(cfg.convertToAddress(match[1], instruction.address));
return [noFallThru, targets];
}
}
@@ -134,8 +134,13 @@
CFG.prototype = {
// The following method will have different implementations depending
// on the profiler, or kind of profiling input.
- convertToAddress: function (addressString) {
- return parseInt(addressString, 16);
+ convertToAddress: function (addressString, addressCurrent) {
+ // If the address starts with '#' it is a relative one
+ // and should be processed differently
+ if (addressString.startsWith('#'))
+ return addressCurrent + parseInt(addressString.substring(1), 16);
+ else
+ return parseInt(addressString, 16);
},
parseDisassembly: function(counter) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109575.371931.patch
Type: text/x-patch
Size: 1257 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210910/1b61b8cc/attachment.bin>
More information about the llvm-commits
mailing list