Fri Jan 31 13:15:05 1997 Alan Modra <alan@spri.levels.unisa.edu.au>
authorIan Lance Taylor <ian@airs.com>
Fri, 31 Jan 1997 18:16:15 +0000 (18:16 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 31 Jan 1997 18:16:15 +0000 (18:16 +0000)
* config/tc-i386.c (i386_align_code): Add comments explaining the
nop instructions.

gas/ChangeLog
gas/config/tc-i386.c

index 171ea2db5551b59abdf41dc39131de8df9914488..fdac6541689634b0e359dad509413d421e965963 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jan 31 13:15:05 1997  Alan Modra  <alan@spri.levels.unisa.edu.au>
+
+       * config/tc-i386.c (i386_align_code): Add comments explaining the
+       nop instructions.
+
 Fri Jan 31 10:46:14 1997  Ian Lance Taylor  <ian@cygnus.com>
 
        * write.c (relax_segment): Give an error if a .space symbol is
index 61099d085295a68961f9d3a19c1c0806a972b444..d07764ec4b3528c66071f331f1a21a1cbea10d39 100644 (file)
@@ -248,39 +248,61 @@ i386_align_code (fragP, count)
      int count;
 {
   /* Various efficient no-op patterns for aligning code labels.  */
-  static const char f32_1[] = {0x90};
-  static const char f32_2[] = {0x89,0xf6};
-  static const char f32_3[] = {0x8d,0x76,0x00};
-  static const char f32_4[] = {0x8d,0x74,0x26,0x00};
-  static const char f32_5[] = {0x90,
-                              0x8d,0x74,0x26,0x00};
-  static const char f32_6[] = {0x8d,0xb6,0x00,0x00,0x00,0x00};
-  static const char f32_7[] = {0x8d,0xb4,0x26,0x00,0x00,0x00,0x00};
-  static const char f32_8[] = {0x90,
-                              0x8d,0xb4,0x26,0x00,0x00,0x00,0x00};
-  static const char f32_9[] = {0x89,0xf6,
-                              0x8d,0xbc,0x27,0x00,0x00,0x00,0x00};
-  static const char f32_10[] = {0x8d,0x76,0x00,
-                               0x8d,0xbc,0x27,0x00,0x00,0x00,0x00};
-  static const char f32_11[] = {0x8d,0x74,0x26,0x00,
-                               0x8d,0xbc,0x27,0x00,0x00,0x00,0x00};
-  static const char f32_12[] = {0x8d,0xb6,0x00,0x00,0x00,0x00,
-                               0x8d,0xbf,0x00,0x00,0x00,0x00};
-  static const char f32_13[] = {0x8d,0xb6,0x00,0x00,0x00,0x00,
-                               0x8d,0xbc,0x27,0x00,0x00,0x00,0x00};
-  static const char f32_14[] = {0x8d,0xb4,0x26,0x00,0x00,0x00,0x00,
-                               0x8d,0xbc,0x27,0x00,0x00,0x00,0x00};
-  static const char f32_15[] = {0xeb,0x0d,0x90,0x90,0x90,0x90,0x90,
-                               0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90};
-  static const char f16_4[] = {0x8d,0xb6,0x00,0x00};
-  static const char f16_5[] = {0x90,
-                              0x8d,0xb6,0x00,0x00};
-  static const char f16_6[] = {0x89,0xf6,
-                              0x8d,0xbd,0x00,0x00};
-  static const char f16_7[] = {0x8d,0x76,0x00,
-                              0x8d,0xbd,0x00,0x00};
-  static const char f16_8[] = {0x8d,0xb6,0x00,0x00,
-                              0x8d,0xbd,0x00,0x00};
+  /* Note: Don't try to assemble the instructions in the comments. */
+  /*       0L and 0w are not legal */
+  static const char f32_1[] =
+    {0x90};                                    /* nop                  */
+  static const char f32_2[] =
+    {0x89,0xf6};                               /* movl %esi,%esi       */
+  static const char f32_3[] =
+    {0x8d,0x76,0x00};                          /* leal 0(%esi),%esi    */
+  static const char f32_4[] =
+    {0x8d,0x74,0x26,0x00};                     /* leal 0(%esi,1),%esi  */
+  static const char f32_5[] =
+    {0x90,                                     /* nop                  */
+     0x8d,0x74,0x26,0x00};                     /* leal 0(%esi,1),%esi  */
+  static const char f32_6[] =
+    {0x8d,0xb6,0x00,0x00,0x00,0x00};           /* leal 0L(%esi),%esi   */
+  static const char f32_7[] =
+    {0x8d,0xb4,0x26,0x00,0x00,0x00,0x00};      /* leal 0L(%esi,1),%esi */
+  static const char f32_8[] =
+    {0x90,                                     /* nop                  */
+     0x8d,0xb4,0x26,0x00,0x00,0x00,0x00};      /* leal 0L(%esi,1),%esi */
+  static const char f32_9[] =
+    {0x89,0xf6,                                        /* movl %esi,%esi       */
+     0x8d,0xbc,0x27,0x00,0x00,0x00,0x00};      /* leal 0L(%edi,1),%edi */
+  static const char f32_10[] =
+    {0x8d,0x76,0x00,                           /* leal 0(%esi),%esi    */
+     0x8d,0xbc,0x27,0x00,0x00,0x00,0x00};      /* leal 0L(%edi,1),%edi */
+  static const char f32_11[] =
+    {0x8d,0x74,0x26,0x00,                      /* leal 0(%esi,1),%esi  */
+     0x8d,0xbc,0x27,0x00,0x00,0x00,0x00};      /* leal 0L(%edi,1),%edi */
+  static const char f32_12[] =
+    {0x8d,0xb6,0x00,0x00,0x00,0x00,            /* leal 0L(%esi),%esi   */
+     0x8d,0xbf,0x00,0x00,0x00,0x00};           /* leal 0L(%edi),%edi   */
+  static const char f32_13[] =
+    {0x8d,0xb6,0x00,0x00,0x00,0x00,            /* leal 0L(%esi),%esi   */
+     0x8d,0xbc,0x27,0x00,0x00,0x00,0x00};      /* leal 0L(%edi,1),%edi */
+  static const char f32_14[] =
+    {0x8d,0xb4,0x26,0x00,0x00,0x00,0x00,       /* leal 0L(%esi,1),%esi */
+     0x8d,0xbc,0x27,0x00,0x00,0x00,0x00};      /* leal 0L(%edi,1),%edi */
+  static const char f32_15[] =
+    {0xeb,0x0d,0x90,0x90,0x90,0x90,0x90,       /* jmp .+15; lotsa nops */
+     0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90};
+  static const char f16_4[] =
+    {0x8d,0xb6,0x00,0x00};                     /* lea 0w(%si),%si      */
+  static const char f16_5[] =
+    {0x90,                                     /* nop                  */
+     0x8d,0xb6,0x00,0x00};                     /* lea 0w(%si),%si      */
+  static const char f16_6[] =
+    {0x89,0xf6,                                        /* mov %si,%si          */
+     0x8d,0xbd,0x00,0x00};                     /* lea 0w(%di),%di      */
+  static const char f16_7[] =
+    {0x8d,0x76,0x00,                           /* lea 0(%si),%si       */
+     0x8d,0xbd,0x00,0x00};                     /* lea 0w(%di),%di      */
+  static const char f16_8[] =
+    {0x8d,0xb6,0x00,0x00,                      /* lea 0w(%si),%si      */
+     0x8d,0xbd,0x00,0x00};                     /* lea 0w(%di),%di      */
   static const char *const f32_patt[] = {
     f32_1, f32_2, f32_3, f32_4, f32_5, f32_6, f32_7, f32_8,
     f32_9, f32_10, f32_11, f32_12, f32_13, f32_14, f32_15
This page took 0.03612 seconds and 4 git commands to generate.