]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386.c (x86_print_call_or_nop): Emit 5 byte nop explicitly as a stream of bytes.
authorUros Bizjak <ubizjak@gmail.com>
Thu, 16 Nov 2017 19:22:17 +0000 (20:22 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Thu, 16 Nov 2017 19:22:17 +0000 (20:22 +0100)
* config/i386/i386.c (x86_print_call_or_nop): Emit 5 byte nop
explicitly as a stream of bytes.

From-SVN: r254842

gcc/ChangeLog
gcc/config/i386/i386.c

index 809adfcd915878f28c8789e13290f83e42051752..c44e8ce5cb94d49bc081aa8fa539f6e0f1be0870 100644 (file)
@@ -1,3 +1,8 @@
+2017-11-16  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.c (x86_print_call_or_nop): Emit 5 byte nop
+       explicitly as a stream of bytes.
+
 2017-11-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        Backport from mainline
index 2f313bd646461c210769538482731ca7de5dad29..7449f39729cd1791c60b162589924f290da8ca14 100644 (file)
@@ -45211,7 +45211,8 @@ static void
 x86_print_call_or_nop (FILE *file, const char *target)
 {
   if (flag_nop_mcount)
-    fprintf (file, "1:\tnopl 0x00(%%eax,%%eax,1)\n"); /* 5 byte nop.  */
+    /* 5 byte nop: nopl 0(%[re]ax,%[re]ax,1) */
+    fprintf (file, "1:" ASM_BYTE "0x0f, 0x1f, 0x44, 0x00, 0x00\n");
   else
     fprintf (file, "1:\tcall\t%s\n", target);
 }