x32 is a 64-bit process with 32-bit software pointer and kernel may
place x32 shadow stack above 4GB.  We need to save and restore 64-bit
shadow stack register for x32. builtin jmp buf size is 5 pointers.  We
have space to save 64-bit shadow stack pointer: 32-bit SP, 32-bit FP,
32-bit IP, 64-bit SSP for x32.

        PR target/84066
        * gcc/config/i386/i386.md: Replace Pmode with word_mode in
        builtin_setjmp_setup and builtin_longjmp to support x32.
        * gcc/testsuite/gcc.target/i386/cet-sjlj-6.c: New test.

Ok for trunk?

Igor


Attachment: 0001-PR84066-Wrong-shadow-stack-register-size-is-saved-fo.patch
Description: 0001-PR84066-Wrong-shadow-stack-register-size-is-saved-fo.patch

Reply via email to