]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
x86/cet: Use unsigned integer to unwind shadow stack
authorH.J. Lu <hongjiu.lu@intel.com>
Mon, 23 Apr 2018 12:29:00 +0000 (12:29 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Mon, 23 Apr 2018 12:29:00 +0000 (05:29 -0700)
Use unsigned integer to unwind shadow stack by replacing jle with jbe and
jg with ja.

PR target/85489
* config/x86/sjlj.S (GTM_longjmp): Replace jle/jg with jbe/ja.

From-SVN: r259559

libitm/ChangeLog
libitm/config/x86/sjlj.S

index 53fe89749a9fa7b3b0c495f674ba4281eba17630..7f6a24f1a604867eeb63a8060b2a0f6134715e50 100644 (file)
@@ -1,3 +1,8 @@
+2018-04-23  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR target/85489
+       * config/x86/sjlj.S (GTM_longjmp): Replace jle/jg with jbe/ja.
+
 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
 
        * configure: Regenerated.
index ee61451394a2ff8cbdd13f8d10b11fbfc472b5cb..2345b2f4ec489a689ea9fa5f483c8d5eee0063b8 100644 (file)
@@ -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