diff options
author | Craig Topper <craig.topper@sifive.com> | 2024-03-26 21:37:19 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-26 21:37:19 -0700 |
commit | 8a9c1701704182d551bf9df1ff43363db56caab4 (patch) | |
tree | e7063646bc0b4de8a163a82ec8d467de2d28be98 /llvm/lib/Object/COFFImportFile.cpp | |
parent | ecf6bb2b4dbd26bbff2cee79db010369faa2fe90 (diff) | |
download | llvm-8a9c1701704182d551bf9df1ff43363db56caab4.zip llvm-8a9c1701704182d551bf9df1ff43363db56caab4.tar.gz llvm-8a9c1701704182d551bf9df1ff43363db56caab4.tar.bz2 |
[RISCV] Align stack size down to a multiple of 16 before using cm.push/pop. (#86073)
This an alternative to #84935 to fix the miscompile, but not be optimal.
The immediate for cm.push/pop must be a multiple of 16. For RVE, it
might not be. It's not easy to increase the stack size without messing
up cfa directives and maybe other things.
This patch rounds the stack size down to a multiple of 16 before
clamping it to 48. This causes an extra addi to be emitted to handle the
remainder.
Once this commited, I can commit #84989 to add verification for these
instructions being generated with valid offsets.
Diffstat (limited to 'llvm/lib/Object/COFFImportFile.cpp')
0 files changed, 0 insertions, 0 deletions