summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARFRelocMap.h
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2014-07-11 17:19:31 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2014-07-11 17:19:31 +0000
commitea147a9d4331af26cb0c5ec558dd93e2f44cedaf (patch)
tree04170cb5efcba814cb793ddfcf3937164ccff600 /llvm/lib/DebugInfo/DWARFRelocMap.h
parenteac5062cc0fef587581d3242bd22f3da3dbfaf58 (diff)
downloadbcm5719-llvm-ea147a9d4331af26cb0c5ec558dd93e2f44cedaf.tar.gz
bcm5719-llvm-ea147a9d4331af26cb0c5ec558dd93e2f44cedaf.zip
[PowerPC] Fix invalid displacement created by LocalStackAlloc
This commit fixes a bug in PPCRegisterInfo::isFrameOffsetLegal that could result in the LocalStackAlloc pass creating an MI instruction out-of-range displacement: %vreg17<def> = LD 33184, %vreg31; mem:LD8[%g](align=32) %G8RC:%vreg17 G8RC_and_G8RC_NOX0:%vreg31 (In final assembler output the top bits are stripped off, resulting in a negative offset loading from below the stack pointer.) Common code expects the isFrameOffsetLegal routine to verify whether adding a given offset to the offset already present in the instruction results in a valid displacement. However, on PowerPC the routine did not take the already present instruction offset into account. This commit fixes isFrameOffsetLegal to add the instruction offset, and updates a local caller (needsFrameBaseReg) to no longer add the instruction offset itself before calling isFrameOffsetLegal. Reviewed by Hal Finkel. llvm-svn: 212832
Diffstat (limited to 'llvm/lib/DebugInfo/DWARFRelocMap.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud