Remove unnecessary power9 group terminating nop
authorAlan Modra <amodra@gmail.com>
Wed, 7 Mar 2018 23:47:41 +0000 (10:17 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 8 Mar 2018 03:47:01 +0000 (14:17 +1030)
Power9 doesn't have a group terminating nop, so we may as well emit a
normal nop for power9.  Not that it matters a great deal, I believe
ori 2,2,0 will be treated exactly as ori 0,0,0 by the hardware.

* config/tc-ppc.c (ppc_handle_align): Don't emit a group
terminating nop for power9.

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

index 765270d0a426abdb7bf83beb0c59ee8c856cb2be..7670ee241c1f5e5582cf48a6a9e12006f28a22be 100644 (file)
@@ -1,3 +1,8 @@
+2018-03-08  Alan Modra  <amodra@gmail.com>
+
+       * config/tc-ppc.c (ppc_handle_align): Don't emit a group
+       terminating nop for power9.
+
 2018-03-07  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR gas/22874
index f63003b3b6b6eaacf5d1a4c20416f06aefc26a0b..dc63d6091a19ad63fc15a42112e2f27ed20180ad 100644 (file)
@@ -6550,14 +6550,13 @@ ppc_handle_align (struct frag *fragP)
 
       if ((ppc_cpu & PPC_OPCODE_POWER6) != 0
          || (ppc_cpu & PPC_OPCODE_POWER7) != 0
-         || (ppc_cpu & PPC_OPCODE_POWER8) != 0
-         || (ppc_cpu & PPC_OPCODE_POWER9) != 0)
+         || (ppc_cpu & PPC_OPCODE_POWER8) != 0)
        {
-         /* For power6, power7, power8 and power9, we want the last nop to be
-            a group terminating one.  Do this by inserting an rs_fill frag
-            immediately after this one, with its address set to the last nop
-            location.  This will automatically reduce the number of nops in
-            the current frag by one.  */
+         /* For power6, power7, and power8, we want the last nop to
+            be a group terminating one.  Do this by inserting an
+            rs_fill frag immediately after this one, with its address
+            set to the last nop location.  This will automatically
+            reduce the number of nops in the current frag by one.  */
          if (count > 4)
            {
              struct frag *group_nop = xmalloc (SIZEOF_STRUCT_FRAG + 4);
@@ -6572,14 +6571,13 @@ ppc_handle_align (struct frag *fragP)
            }
 
          if ((ppc_cpu & PPC_OPCODE_POWER7) != 0
-             || (ppc_cpu & PPC_OPCODE_POWER8) != 0
-             || (ppc_cpu & PPC_OPCODE_POWER9) != 0)
+             || (ppc_cpu & PPC_OPCODE_POWER8) != 0)
            {
              if (ppc_cpu & PPC_OPCODE_E500MC)
                /* e500mc group terminating nop: "ori 0,0,0".  */
                md_number_to_chars (dest, 0x60000000, 4);
              else
-               /* power7/power8/power9 group terminating nop: "ori 2,2,0".  */
+               /* power7/power8 group terminating nop: "ori 2,2,0".  */
                md_number_to_chars (dest, 0x60420000, 4);
            }
          else
This page took 0.028852 seconds and 4 git commands to generate.