This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH] x86/cet: Use unsigned integer to unwind shadow stack
- From: "Tsimbalist, Igor V" <igor dot v dot tsimbalist at intel dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, "Tsimbalist, Igor V" <igor dot v dot tsimbalist at intel dot com>
- Date: Mon, 23 Apr 2018 12:23:10 +0000
- Subject: RE: [PATCH] x86/cet: Use unsigned integer to unwind shadow stack
- Dlp-product: dlpe-windows
- Dlp-reaction: no-action
- Dlp-version: 11.0.200.100
- References: <20180423115606.GA63789@intel.com>
> -----Original Message-----
> From: Lu, Hongjiu
> Sent: Monday, April 23, 2018 1:56 PM
> To: gccpatche@intel.com
> Cc: Tsimbalist, Igor V <igor.v.tsimbalist@intel.com>; Uros Bizjak
> <ubizjak@gmail.com>
> Subject: [PATCH] x86/cet: Use unsigned integer to unwind shadow stack
>
> Use unsigned integer to unwind shadow stack by replacing jle with jbe and
> jg with ja.
>
> OK for trunk?
OK.
Igor
> H.J.
> ----
> PR target/85489
> * config/x86/sjlj.S (GTM_longjmp): Replace jle/jg with jbe/ja.
> ---
> libitm/config/x86/sjlj.S | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/libitm/config/x86/sjlj.S b/libitm/config/x86/sjlj.S
> index 3cac9099c9e..e5cdbab48a7 100644
> --- a/libitm/config/x86/sjlj.S
> +++ b/libitm/config/x86/sjlj.S
> @@ -235,7 +235,7 @@ SYM(GTM_longjmp):
> /* If # of frames is greater 255 then loop
> and adjust. */
> cmpq $255, %rcx
> - jle .L3
> + jbe .L3
> movl $255, %edi
> .p2align 4,,10
> .p2align 3
> @@ -243,7 +243,7 @@ SYM(GTM_longjmp):
> incsspq %rdi
> subq $255, %rcx
> cmpq $255, %rcx
> - jg .L4
> + ja .L4
> .L3:
> incsspq %rcx
> .L1:
> @@ -273,7 +273,7 @@ SYM(GTM_longjmp):
> /* If # of frames is greater 255 then loop
> and adjust. */
> cmpl $255, %ecx
> - jle .L3
> + jbe .L3
> pushl %eax
> movl $255, %eax
> .p2align 4,,10
> @@ -282,7 +282,7 @@ SYM(GTM_longjmp):
> incsspd %eax
> subl $255, %ecx
> cmpl $255, %ecx
> - jg .L4
> + ja .L4
> popl %eax
> .L3:
> incsspd %ecx
> --
> 2.14.3