Commit f774f813 authored by Pierre Langlois's avatar Pierre Langlois Committed by Commit Bot

[arm64][perf-prof] Fix detection of the stack pointer register.

On Arm64, the 31 encoding refers to either the zero register or the stack
pointer depending on the instruction. However, in order to distinguish them in
the assembler, the stack pointer has an internal code which isn't 31.

As a result, we need to use the internal code when converting a Register to a
DWARF code.

Bug: v8:6644
Change-Id: If8a6b6c94badd7d10c22664c7081733258b07a31
Reviewed-on: https://chromium-review.googlesource.com/866870Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#50583}
parent 56fa0a53
......@@ -35,7 +35,7 @@ int EhFrameWriter::RegisterToDwarfCode(Register name) {
return kFpDwarfCode;
case kRegCode_x30:
return kLrDwarfCode;
case kRegCode_x31:
case kSPRegInternalCode:
return kCSpDwarfCode;
case kRegCode_x0:
return kX0DwarfCode;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment