summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/Arch/PPC64.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/ELF/Arch/PPC64.cpp b/lld/ELF/Arch/PPC64.cpp
index 3c511e14d50..a12d714dc4c 100644
--- a/lld/ELF/Arch/PPC64.cpp
+++ b/lld/ELF/Arch/PPC64.cpp
@@ -849,7 +849,8 @@ bool PPC64::adjustPrologueForCrossSplitStack(uint8_t *Loc, uint8_t *End,
int32_t StackFrameSize = (HiImm * 65536) + LoImm;
// Check that the adjusted size doesn't overflow what we can represent with 2
// instructions.
- if (StackFrameSize < -2147483648 + Config->SplitStackAdjustSize) {
+ if (StackFrameSize <
+ std::numeric_limits<int32_t>::min() + Config->SplitStackAdjustSize) {
error(getErrorLocation(Loc) + "split-stack prologue adjustment overflows");
return false;
}
OpenPOWER on IntegriCloud