[lld] r341999 - [codeview] Decode and dump FP regs from S_FRAMEPROC records
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 11 15:00:51 PDT 2018
Author: rnk
Date: Tue Sep 11 15:00:50 2018
New Revision: 341999
URL: http://llvm.org/viewvc/llvm-project?rev=341999&view=rev
Log:
[codeview] Decode and dump FP regs from S_FRAMEPROC records
Summary:
There are two registers encoded in the S_FRAMEPROC flags: one for locals
and one for parameters. The encoding is described by the
ExpandEncodedBasePointerReg function in cvinfo.h. Two bits are used to
indicate one of four possible values:
0: no register - Used when there are no variables.
1: SP / standard - Variables are stored relative to the standard SP
for the ISA.
2: FP - Variables are addressed relative to the ISA frame
pointer, i.e. EBP on x86. If realignment is required, parameters
use this. If a dynamic alloca is used, locals will be EBP relative.
3: Alternative - Variables are stored relative to some alternative
third callee-saved register. This is required to address highly
aligned locals when there are dynamic stack adjustments. In this
case, both the incoming SP saved in the standard FP and the current
SP are at some dynamic offset from the locals. LLVM uses ESI in
this case, MSVC uses EBX.
Most of the changes in this patch are to pass around the CPU so that we
can decode these into real, named architectural registers.
Subscribers: hiraditya
Differential Revision: https://reviews.llvm.org/D51894
Modified:
lld/trunk/test/COFF/pdb-procid-remapping.test
Modified: lld/trunk/test/COFF/pdb-procid-remapping.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/pdb-procid-remapping.test?rev=341999&r1=341998&r2=341999&view=diff
==============================================================================
--- lld/trunk/test/COFF/pdb-procid-remapping.test (original)
+++ lld/trunk/test/COFF/pdb-procid-remapping.test Tue Sep 11 15:00:50 2018
@@ -14,6 +14,7 @@ CHECK-NEXT: type = `0x100
CHECK-NEXT: 136 | S_FRAMEPROC [size = 32]
CHECK-NEXT: size = 40, padding size = 0, offset to padding = 0
CHECK-NEXT: bytes of callee saved registers = 0, exception handler addr = 0000:0000
+CHECK-NEXT: local fp reg = NONE, param fp reg = NONE
CHECK-NEXT: flags = has async eh | opt speed
CHECK-NEXT: 168 | S_END [size = 4]
CHECK-LABEL: Mod 0001 |
@@ -23,6 +24,7 @@ CHECK-NEXT: type = `0x100
CHECK-NEXT: 136 | S_FRAMEPROC [size = 32]
CHECK-NEXT: size = 0, padding size = 0, offset to padding = 0
CHECK-NEXT: bytes of callee saved registers = 0, exception handler addr = 0000:0000
+CHECK-NEXT: local fp reg = NONE, param fp reg = NONE
CHECK-NEXT: flags = has async eh | opt speed
CHECK-NEXT: 168 | S_END [size = 4]
CHECK-LABEL: Mod 0002 |
More information about the llvm-commits
mailing list