summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2018-10-02 16:43:52 +0000
committerReid Kleckner <rnk@google.com>2018-10-02 16:43:52 +0000
commitd5e4ec74e3daa50dc6f174d9b6f8951be09694a5 (patch)
treeae4b16ec4884b3f7f850c1db183cdb0586d10704 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
parent6f40e21a1601aa1b83a13282918ddae47e58b7d5 (diff)
downloadbcm5719-llvm-d5e4ec74e3daa50dc6f174d9b6f8951be09694a5.tar.gz
bcm5719-llvm-d5e4ec74e3daa50dc6f174d9b6f8951be09694a5.zip
[codeview] Fix 32-bit x86 variable locations in realigned stack frames
Add the .cv_fpo_stackalign directive so that we can define $T0, or the VFRAME virtual register, with it. This was overlooked in the initial implementation because unlike MSVC, we push CSRs before allocating stack space, so this value is only needed to describe local variable locations. Variables that the compiler now addresses via ESP are instead described as being stored at offsets from VFRAME, which for us is ESP after alignment in the prologue. This adds tests that show that we use the VFRAME register properly in our S_DEFRANGE records, and that we emit the correct FPO data to define it. Fixes PR38857 llvm-svn: 343603
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
index 3836862f0a8..b2864306e50 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
@@ -165,6 +165,8 @@ class LLVM_LIBRARY_VISIBILITY CodeViewDebug : public DebugHandlerBase {
codeview::FrameProcedureOptions FrameProcOpts;
+ bool HasStackRealignment = false;
+
bool HaveLineInfo = false;
};
FunctionInfo *CurFn = nullptr;
OpenPOWER on IntegriCloud