]> git.ipfire.org Git - thirdparty/glibc.git/commit
i386: Use __seg_gs qualifiers in PTR_{MANGLE,DEMANGLE}() macros
authorUros Bizjak <ubizjak@gmail.com>
Thu, 9 Oct 2025 18:44:59 +0000 (20:44 +0200)
committerUros Bizjak <ubizjak@gmail.com>
Sun, 12 Oct 2025 15:48:55 +0000 (17:48 +0200)
commitbb019bc68f228963dc5d31c84cbe41662791792e
tree808c85c6f95e02db089803dccdcfec6ad76d36a3
parent60e3ada68d316828adcf50f81ef290ed15f1512d
i386: Use __seg_gs qualifiers in PTR_{MANGLE,DEMANGLE}() macros

Use __seg_gs named address space qualifiers in PTR_MANGLE() and
PTR_DEMANGLE() macros to access the pointer_guard field in the TCB.

This change allows the compiler to eliminate redundant reads of
the variable, reducing the number of reads from 105 to 94 and
decreasing the text size of the library by 280 bytes.

While at it, fix a few trivial whitespace issues as well

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
sysdeps/unix/sysv/linux/i386/pointer_guard.h