diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-03-18 06:40:16 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-04-01 11:16:14 -0700 |
commit | 354cabcb2634abe16da7a2ba5e648aac1204b58e (patch) | |
tree | d2f73645b9b07d52e18252cc68bbc535ebc0164f /configure | |
parent | 853e915fdd6ae6c5f1a7a68d2594ec8dbfef1286 (diff) | |
download | glibc-354cabcb2634abe16da7a2ba5e648aac1204b58e.tar.gz glibc-354cabcb2634abe16da7a2ba5e648aac1204b58e.tar.xz glibc-354cabcb2634abe16da7a2ba5e648aac1204b58e.zip |
x86-64: Allocate state buffer space for RDI, RSI and RBX
_dl_tlsdesc_dynamic preserves RDI, RSI and RBX before realigning stack. After realigning stack, it saves RCX, RDX, R8, R9, R10 and R11. Define TLSDESC_CALL_REGISTER_SAVE_AREA to allocate space for RDI, RSI and RBX to avoid clobbering saved RDI, RSI and RBX values on stack by xsave to STATE_SAVE_OFFSET(%rsp). +==================+<- stack frame start aligned at 8 or 16 bytes | |<- RDI saved in the red zone | |<- RSI saved in the red zone | |<- RBX saved in the red zone | |<- paddings for stack realignment of 64 bytes |------------------|<- xsave buffer end aligned at 64 bytes | |<- | |<- | |<- |------------------|<- xsave buffer start at STATE_SAVE_OFFSET(%rsp) | |<- 8-byte padding for 64-byte alignment | |<- 8-byte padding for 64-byte alignment | |<- R11 | |<- R10 | |<- R9 | |<- R8 | |<- RDX | |<- RCX +==================+<- RSP aligned at 64 bytes Define TLSDESC_CALL_REGISTER_SAVE_AREA, the total register save area size for all integer registers by adding 24 to STATE_SAVE_OFFSET since RDI, RSI and RBX are saved onto stack without adjusting stack pointer first, using the red-zone. This fixes BZ #31501. Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com> (cherry picked from commit 717ebfa85c8240d32d0d19d86a484c31c55c9617)
Diffstat (limited to 'configure')
0 files changed, 0 insertions, 0 deletions