gas: Rename .nop directive to .nops
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 27 Feb 2018 22:45:48 +0000 (14:45 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 27 Feb 2018 22:46:03 +0000 (14:46 -0800)
Since directives of NO_PSEUDO_DOT targets don't have the leading '.'
and "nop" can be a valid instruction, rename .nop directive to .nops
to avoid conflict.

* NEWS: Rename .nop to .nops.
* doc/as.texinfo: Likewise.
* read.c (potable): Add "nops".  Remove "nop".
(s_nop): Renamed to ...
(s_nops): This.
* read.h (s_nop): Renamed to ...
(s_nops): This.
* write.c (cvt_frag_to_fill): Rename .nop to .nops.
(md_generate_nops): Likewise.
(relax_segment): Likewise.
* testsuite/gas/i386/nop-1.d: Updated.
* testsuite/gas/i386/nop-1.s: Likewise.
* testsuite/gas/i386/nop-2.d: Likewise.
* testsuite/gas/i386/nop-2.s: Likewise.
* testsuite/gas/i386/nop-3.d: Likewise.
* testsuite/gas/i386/nop-3.s: Likewise.
* testsuite/gas/i386/nop-4.d: Likewise.
* testsuite/gas/i386/nop-4.s: Likewise.
* testsuite/gas/i386/nop-5.d: Likewise.
* testsuite/gas/i386/nop-5.s: Likewise.
* testsuite/gas/i386/nop-6.d: Likewise.
* testsuite/gas/i386/nop-6.s: Likewise.
* testsuite/gas/i386/nop-bad-1.l: Likewise.
* testsuite/gas/i386/nop-bad-1.s: Likewise.
* testsuite/gas/i386/x86-64-nop-1.d: Likewise.
* testsuite/gas/i386/x86-64-nop-2.d: Likewise.
* testsuite/gas/i386/x86-64-nop-3.d: Likewise.
* testsuite/gas/i386/x86-64-nop-4.d: Likewise.
* testsuite/gas/i386/x86-64-nop-5.d: Likewise.
* testsuite/gas/i386/x86-64-nop-6.d: Likewise.

26 files changed:
gas/ChangeLog
gas/NEWS
gas/doc/as.texinfo
gas/read.c
gas/read.h
gas/testsuite/gas/i386/nop-1.d
gas/testsuite/gas/i386/nop-1.s
gas/testsuite/gas/i386/nop-2.d
gas/testsuite/gas/i386/nop-2.s
gas/testsuite/gas/i386/nop-3.d
gas/testsuite/gas/i386/nop-3.s
gas/testsuite/gas/i386/nop-4.d
gas/testsuite/gas/i386/nop-4.s
gas/testsuite/gas/i386/nop-5.d
gas/testsuite/gas/i386/nop-5.s
gas/testsuite/gas/i386/nop-6.d
gas/testsuite/gas/i386/nop-6.s
gas/testsuite/gas/i386/nop-bad-1.l
gas/testsuite/gas/i386/nop-bad-1.s
gas/testsuite/gas/i386/x86-64-nop-1.d
gas/testsuite/gas/i386/x86-64-nop-2.d
gas/testsuite/gas/i386/x86-64-nop-3.d
gas/testsuite/gas/i386/x86-64-nop-4.d
gas/testsuite/gas/i386/x86-64-nop-5.d
gas/testsuite/gas/i386/x86-64-nop-6.d
gas/write.c

index b28a79fc57c687e9c6ff8f6546807cbd96ec025d..7c9f2f20b589ce858ead58d96dd8795163343b41 100644 (file)
@@ -1,3 +1,36 @@
+2018-02-27  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * NEWS: Rename .nop to .nops.
+       * doc/as.texinfo: Likewise.
+       * read.c (potable): Add "nops".  Remove "nop".
+       (s_nop): Renamed to ...
+       (s_nops): This.
+       * read.h (s_nop): Renamed to ...
+       (s_nops): This.
+       * write.c (cvt_frag_to_fill): Rename .nop to .nops.
+       (md_generate_nops): Likewise.
+       (relax_segment): Likewise.
+       * testsuite/gas/i386/nop-1.d: Updated.
+       * testsuite/gas/i386/nop-1.s: Likewise.
+       * testsuite/gas/i386/nop-2.d: Likewise.
+       * testsuite/gas/i386/nop-2.s: Likewise.
+       * testsuite/gas/i386/nop-3.d: Likewise.
+       * testsuite/gas/i386/nop-3.s: Likewise.
+       * testsuite/gas/i386/nop-4.d: Likewise.
+       * testsuite/gas/i386/nop-4.s: Likewise.
+       * testsuite/gas/i386/nop-5.d: Likewise.
+       * testsuite/gas/i386/nop-5.s: Likewise.
+       * testsuite/gas/i386/nop-6.d: Likewise.
+       * testsuite/gas/i386/nop-6.s: Likewise.
+       * testsuite/gas/i386/nop-bad-1.l: Likewise.
+       * testsuite/gas/i386/nop-bad-1.s: Likewise.
+       * testsuite/gas/i386/x86-64-nop-1.d: Likewise.
+       * testsuite/gas/i386/x86-64-nop-2.d: Likewise.
+       * testsuite/gas/i386/x86-64-nop-3.d: Likewise.
+       * testsuite/gas/i386/x86-64-nop-4.d: Likewise.
+       * testsuite/gas/i386/x86-64-nop-5.d: Likewise.
+       * testsuite/gas/i386/x86-64-nop-6.d: Likewise.
+
 2018-02-27  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR gas/22871
index 8a9d3a2f1616921906f1d1acb6b9f37fd49e8718..8a4b93a726f5827ce958537af36c68ec7656931d 100644 (file)
--- a/gas/NEWS
+++ b/gas/NEWS
@@ -3,7 +3,7 @@
 * Add -O[2|s] command-line options to x86 assembler to enable alternate
   shorter instruction encoding.
 
-* Add support for .nop directive.  It is currently supported only for
+* Add support for .nops directive.  It is currently supported only for
   x86 targets.
 
 Changes in 2.30:
index 392365d2ae03ae0e587f7e72ee2c7919109a450b..f56515e5e8ecb197be22ea5ab107999003af47cf 100644 (file)
@@ -4482,7 +4482,7 @@ Some machine configurations provide additional directives.
 * MRI::                                @code{.mri @var{val}}
 * Noaltmacro::                  @code{.noaltmacro}
 * Nolist::                      @code{.nolist}
-* Nop::                         @code{.nop @var{size}[, @var{control}]}
+* Nops::                        @code{.nops @var{size}[, @var{control}]}
 * Octa::                        @code{.octa @var{bignums}}
 * Offset::                     @code{.offset @var{loc}}
 * Org::                         @code{.org @var{new-lc}, @var{fill}}
@@ -6199,10 +6199,10 @@ internal counter (which is zero initially).   @code{.list} increments the
 counter, and @code{.nolist} decrements it.  Assembly listings are
 generated whenever the counter is greater than zero.
 
-@node Nop
-@section @code{.nop @var{size}[, @var{control}]}
+@node Nops
+@section @code{.nops @var{size}[, @var{control}]}
 
-@cindex @code{nop} directive
+@cindex @code{nops} directive
 @cindex filling memory with no-op instructions
 This directive emits @var{size} bytes filled with no-op instructions.
 @var{size} is absolute expression, which must be a positve value.
index 9ab88f8962a3a2a8c8bc06d8cac3a2707758acfb..ff78caef38c77f77bfc959df3f2220c2955ebf42 100644 (file)
@@ -417,6 +417,7 @@ static const pseudo_typeS potable[] = {
   {"noformat", s_ignore, 0},
   {"nolist", listing_list, 0}, /* Turn listing off.  */
   {"nopage", listing_nopage, 0},
+  {"nops", s_nops, 0},
   {"octa", cons, 16},
   {"offset", s_struct, 0},
   {"org", s_org, 0},
@@ -442,7 +443,6 @@ static const pseudo_typeS potable[] = {
 /* size  */
   {"space", s_space, 0},
   {"skip", s_space, 0},
-  {"nop", s_nop, 0},
   {"sleb128", s_leb128, 1},
   {"spc", s_ignore, 0},
   {"stabd", s_stab, 'd'},
@@ -3510,7 +3510,7 @@ s_space (int mult)
 }
 
 void
-s_nop (int ignore ATTRIBUTE_UNUSED)
+s_nops (int ignore ATTRIBUTE_UNUSED)
 {
   expressionS exp;
   expressionS val;
@@ -3556,7 +3556,7 @@ s_nop (int ignore ATTRIBUTE_UNUSED)
        }
     }
   else
-    as_bad (_("unsupported variable nop control in .nop directive"));
+    as_bad (_("unsupported variable nop control in .nops directive"));
 
   demand_empty_rest_of_line ();
 }
index 3f0927bc9ed7974d5b387d52fe72590f76252e29..352b802d4af94cc271ec81d9c732e641b55f0a3b 100644 (file)
@@ -206,7 +206,7 @@ extern void s_purgem (int);
 extern void s_rept (int);
 extern void s_set (int);
 extern void s_space (int mult);
-extern void s_nop (int);
+extern void s_nops (int);
 extern void s_stab (int what);
 extern void s_struct (int);
 extern void s_text (int);
index 46422c88dbf916cc03766c5f47f3c493278c97b2..5a9e03ef194ed747a207802e253b362f53eb9e19 100644 (file)
@@ -1,5 +1,5 @@
 #objdump: -drw
-#name: i386 .nop 1
+#name: i386 .nops 1
 
 .*: +file format .*
 
index 891783dce8018f9ba1de308c13d3e3c6d963039c..94ec28e815dd5d89e2d30fe6003f4048375e4ce1 100644 (file)
@@ -1,21 +1,21 @@
        .text
 single:
-       .nop 0
+       .nops 0
        nop
 
 pseudo_1:
-       .nop 1
+       .nops 1
 
 pseudo_8:
-       .nop 8
+       .nops 8
 
 pseudo_8_4:
-       .nop 8, 4
+       .nops 8, 4
 
 pseudo_20:
-       .nop 20
+       .nops 20
 
 pseudo_30:
-       .nop 30
+       .nops 30
 
        xor %eax, %eax
index 332b990a97879f5fe89bbee7f4fd5b31d55cd0c1..d248fd1df7549c57907bb2bef3cde03c2f9a92b7 100644 (file)
@@ -1,5 +1,5 @@
 #objdump: -drw -Mi8086
-#name: i386 .nop 2
+#name: i386 .nops 2
 
 .*: +file format .*
 
index 2b71b9786d8b82ea93c66032554ac5a4c46f4fb8..9f7a3729c0e42d55b7706aa07d0f386d035b6e66 100644 (file)
@@ -1,22 +1,22 @@
        .text
        .code16
 single:
-       .nop 0
+       .nops 0
        nop
 
 pseudo_1:
-       .nop 1
+       .nops 1
 
 pseudo_8:
-       .nop 8
+       .nops 8
 
 pseudo_8_4:
-       .nop 8, 4
+       .nops 8, 4
 
 pseudo_20:
-       .nop 20
+       .nops 20
 
 pseudo_30:
-       .nop 30
+       .nops 30
 
        xor %eax, %eax
index bebd24bc08b0bc3744724755a36967e235957cdb..b2b4577b55529f8f1154e39866f3f81de62a4338 100644 (file)
@@ -1,5 +1,5 @@
 #objdump: -drw
-#name: i386 .nop 3
+#name: i386 .nops 3
 
 .*: +file format .*
 
index 57370ff5797abe65d4d9d5082258d80ff77bde42..0a6bb58fdf593cb4831772ef1410059d263f102e 100644 (file)
@@ -4,7 +4,7 @@ _start:
 140:
        testl %eax, %eax
 141:
-       .nop -(((144f-143f)-(141b-140b)) > 0)*((144f-143f)-(141b-140b)),7
+       .nops -(((144f-143f)-(141b-140b)) > 0)*((144f-143f)-(141b-140b)),7
 142:
        xor %eax, %eax
        .pushsection .altinstr_replacement,"ax"
index 99ddcd39945a373f1a12e7764c41819c8c0b0126..b548d079a36f76eb1fbf040fc6cea8c1a5bacb6a 100644 (file)
@@ -1,5 +1,5 @@
 #objdump: -drw
-#name: i386 .nop 4
+#name: i386 .nops 4
 
 .*: +file format .*
 
index f7aa11187e3c7370e717221ce8326fab49f179d6..4f0bfe6dc3ab9318102a12682d8c60e0ca4cc76f 100644 (file)
@@ -4,7 +4,7 @@ _start:
 140:
        testl %eax, %eax
 141:
-       .nop -(((144f-143f)-(141b-140b)) > 0)*((144f-143f)-(141b-140b))
+       .nops -(((144f-143f)-(141b-140b)) > 0)*((144f-143f)-(141b-140b))
 142:
        xor %eax, %eax
        .pushsection .altinstr_replacement,"ax"
index aab4258b198c5861bfc839d0e9dd0e9b0598fb5e..6a4791344f9dddb9d39d949644fec94006f94979 100644 (file)
@@ -1,5 +1,5 @@
 #objdump: -drw
-#name: i386 .nop 5
+#name: i386 .nops 5
 
 .*: +file format .*
 
index 4f563ce82f94000ea1f7345516ea4355b17c62f0..d91f81fb097599e9963469958b0b2976c60d2d8e 100644 (file)
@@ -4,7 +4,7 @@ _start:
 140:
        testl %eax, %eax
 141:
-       .nop -(((144f-143f)-(141b-140b)) > 0)*((144f-143f)-(141b-140b)),6
+       .nops -(((144f-143f)-(141b-140b)) > 0)*((144f-143f)-(141b-140b)),6
 142:
        xor %eax, %eax
        .pushsection .altinstr_replacement,"ax"
index 93ee8def03167185e7931618af80de7f188aff42..851c129c4a8fb754445599d0b44ab97fe4c528e1 100644 (file)
@@ -1,5 +1,5 @@
 #objdump: -drw
-#name: i386 .nop 6
+#name: i386 .nops 6
 
 .*: +file format .*
 
index c7b1e2cbf045a41e0939266cd7b186b39a358ca2..d8952c9a43058818961034e43be5dbd1357ca239 100644 (file)
@@ -1,5 +1,5 @@
 .macro mknops nr_bytes
-    .nop \nr_bytes, 9
+    .nops \nr_bytes, 9
 .endm
 
 .macro ALTERNATIVE
index 34be496b4b4e77f9b52899141315fb2f79ff6ef8..2ae5b48453625135e3ae1a967c524b6906926b6c 100644 (file)
@@ -1,4 +1,4 @@
 .*: Assembler messages:
 .*:2: Warning: negative nop control byte, ignored
-.*:4: Warning: \.space, \.nop or \.fill with negative value, ignored
+.*:4: Warning: \.space, \.nops or \.fill with negative value, ignored
 .*:3: Error: invalide single nop size: 20 \(expect within \[0, [0-9]+\]\)
index 53cc7d554ae09b96351d901d639a42634402a1be..2f2bbfb9fd20b8881100a1ba70a67952a7512f68 100644 (file)
@@ -1,4 +1,4 @@
        .text
-        .nop 100, -2
-        .nop 100, 20
-        .nop -1
+        .nops 100, -2
+        .nops 100, 20
+        .nops -1
index f3edc7d346c406f6eecc71bc953a48635b3ba5cf..ec6263b49dc86d115815e9a17b68ebc440524472 100644 (file)
@@ -1,6 +1,6 @@
 #source: nop-1.s
 #objdump: -drw
-#name: x86-64 .nop 1
+#name: x86-64 .nops 1
 
 .*: +file format .*
 
index e894d2c7bf4b58f0f6a003275c2bdbeb86301cfc..438e4f84f29e32421f384d788ccdf1f5af11bd14 100644 (file)
@@ -1,6 +1,6 @@
 #source: nop-2.s
 #objdump: -drw -Mi8086
-#name: x86-64 .nop 2
+#name: x86-64 .nops 2
 
 .*: +file format .*
 
index b43239af6f0a15e03f618d32d320a0dcc00ef066..1dc9505b4f899e6455722138c010ebac5b07c667 100644 (file)
@@ -1,6 +1,6 @@
 #source: nop-3.s
 #objdump: -drw
-#name: x86-64 .nop 3
+#name: x86-64 .nops 3
 
 .*: +file format .*
 
index a910171303fbb5dc8c7825484f45d60bb7c7b6c0..25927ca2228fd44166b0ce7c5976c96f32b793ee 100644 (file)
@@ -1,6 +1,6 @@
 #source: nop-4.s
 #objdump: -drw
-#name: x86-64 .nop 4
+#name: x86-64 .nops 4
 
 .*: +file format .*
 
index 57493cf6dcbe836edc6467e723f759cb1b221a28..a609a1254bd77cdfc737443e9881b0c4cbba1136 100644 (file)
@@ -1,6 +1,6 @@
 #source: nop-5.s
 #objdump: -drw
-#name: x86-64 .nop 5
+#name: x86-64 .nops 5
 
 .*: +file format .*
 
index 520f5909453e69a97d38a0c48721313829cffbbb..63f3817148a21dd8588af27d0acf90a0c2505285 100644 (file)
@@ -1,6 +1,6 @@
 #source: nop-6.s
 #objdump: -drw
-#name: x86-64 .nop 6
+#name: x86-64 .nops 6
 
 .*: +file format .*
 
index 9b14fda1562e0f9246a2ffefe5bc897d5a292c44..4c8e42b4b498376f858c43bab4a5119b10252c29 100644 (file)
@@ -453,7 +453,7 @@ skip_align:
       if (fragP->fr_offset < 0)
        {
          as_bad_where (fragP->fr_file, fragP->fr_line,
-                       _("attempt to .org/.space/.nop backwards? (%ld)"),
+                       _("attempt to .org/.space/.nops backwards? (%ld)"),
                        (long) fragP->fr_offset);
          fragP->fr_offset = 0;
        }
@@ -1587,7 +1587,7 @@ md_generate_nops (fragS *f ATTRIBUTE_UNUSED,
                  offsetT count ATTRIBUTE_UNUSED,
                  int control ATTRIBUTE_UNUSED)
 {
-  as_bad (_("unimplemented .nop directive"));
+  as_bad (_("unimplemented .nops directive"));
 }
 #endif
 
@@ -2840,7 +2840,7 @@ relax_segment (struct frag *segment_frag_root, segT segment, int pass)
                          }
 
                        as_warn_where (fragP->fr_file, fragP->fr_line,
-                                      _(".space, .nop or .fill with negative value, ignored"));
+                                      _(".space, .nops or .fill with negative value, ignored"));
                        fragP->fr_symbol = 0;
                      }
                    else
This page took 0.041113 seconds and 4 git commands to generate.