[all-commits] [llvm/llvm-project] 2e47b9: [ARM] Honour -mno-movt in stack protector handling...
Ard Biesheuvel via All-commits
all-commits at lists.llvm.org
Wed Oct 9 09:34:43 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2e47b93fd29ad6ef13a4134f3b0be3c42e91180c
https://github.com/llvm/llvm-project/commit/2e47b93fd29ad6ef13a4134f3b0be3c42e91180c
Author: Ard Biesheuvel <ardb at kernel.org>
Date: 2024-10-09 (Wed, 09 Oct 2024)
Changed paths:
M llvm/lib/Target/ARM/Thumb2InstrInfo.cpp
A llvm/test/CodeGen/ARM/stack-guard-nomovt.ll
Log Message:
-----------
[ARM] Honour -mno-movt in stack protector handling (#109022)
When -mno-movt is passed to Clang, the ARM codegen correctly avoids
movt/movw pairs to take the address of __stack_chk_guard in the stack
protector code emitted into the function pro- and epilogues. However,
the Thumb2 codegen fails to do so, and happily emits movw/movt pairs
unless it is generating an ELF binary and the symbol might be in a
different DSO. Let's incorporate a check for useMovt() in the logic
here, so movt/movw are never emitted when -mno-movt is specified.
Suggestions welcome for how/where to add a test case for this.
Signed-off-by: Ard Biesheuvel <ardb at kernel.org>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list