[ARM] Fix 8-bit immediate overflow in the instruction of segmented stack prologue.
authorZhiyao Ma <zhiyao.ma.98@gmail.com>
Thu, 10 Mar 2022 23:13:41 +0000 (15:13 -0800)
committerEli Friedman <efriedma@quicinc.com>
Thu, 10 Mar 2022 23:15:24 +0000 (15:15 -0800)
commitadc26b4eaedc50f1b99d5af5c7e248966fced660
tree17d39a6f33112011e8ea3e5e760bb3419a8a6efc
parent26cd258420c774254cc48330b1f4d23d353baf05
[ARM] Fix 8-bit immediate overflow in the instruction of segmented stack prologue.

It fixes the overflow of 8-bit immediate field in the emitted
instruction that allocates large stacklet.

For thumb2 targets, load large immediate by a pair of movw and movt
instruction. For thumb1 and ARM targets, load large immediate by reading
from literal pool.

Differential Revision: https://reviews.llvm.org/D118545
llvm/lib/Target/ARM/ARMFrameLowering.cpp
llvm/test/CodeGen/ARM/segmented-stacks.ll
llvm/test/CodeGen/Thumb/segmented-stacks.ll
llvm/test/CodeGen/Thumb2/segmented-stacks.ll