]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/binutils-tumbl.git/commitdiff
gas/
authorRoland McGrath <roland@gnu.org>
Fri, 22 Jun 2012 21:54:04 +0000 (21:54 +0000)
committerRoland McGrath <roland@gnu.org>
Fri, 22 Jun 2012 21:54:04 +0000 (21:54 +0000)
* NEWS: Mention 'rep ret' too.

gas/testsuite/
* gas/i386/rep-ret.d: New file.
* gas/i386/rep-ret.s: New file.
* gas/i386/i386.exp: Add the new test.

opcodes/
* i386-opc.tbl: Add RepPrefixOk to ret.
* i386-tbl.h: Regenerate.

gas/ChangeLog
gas/NEWS
gas/testsuite/ChangeLog
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/rep-ret.d [new file with mode: 0644]
gas/testsuite/gas/i386/rep-ret.s [new file with mode: 0644]
opcodes/ChangeLog
opcodes/i386-opc.tbl
opcodes/i386-tbl.h

index 5698397c20e9307cf1a496d954fef53d659d2154..4149ba35b6f90561582b39ca9163b77ff3b70361 100644 (file)
@@ -1,5 +1,7 @@
 2012-06-22  Roland McGrath  <mcgrathr@google.com>
 
+       * NEWS: Mention 'rep ret' too.
+
        * config/tc-i386.c (parse_insn): Don't complain about REP prefix
        when the template has opcode_modifier.repprefixok set.
        * NEWS: Mention the change.
index 6f62b938d8cb456068204d4895defbc28f1934d1..c277dad87536670b88807f4c9f40e6812da203e3 100644 (file)
--- a/gas/NEWS
+++ b/gas/NEWS
@@ -13,7 +13,7 @@
 
 * Add support for the Adapteva EPIPHANY architecture.
 
-* For x86, allow 'rep bsf' or 'rep bsr' syntax.
+* For x86, allow 'rep bsf', 'rep bsr', and 'rep ret' syntax.
 
 Changes in 2.22:
 
index 59916b6e076a20a805190f1bad1e9c61978a2e88..d39938f07a90ff6ada3a409a132e1ce517370335 100644 (file)
@@ -1,5 +1,9 @@
 2012-06-22  Roland McGrath  <mcgrathr@google.com>
 
+       * gas/i386/rep-ret.d: New file.
+       * gas/i386/rep-ret.s: New file.
+       * gas/i386/i386.exp: Add the new test.
+
        * gas/i386/rep-bsf.d: New file.
        * gas/i386/rep-bsf.s: New file.
        * gas/i386/i386.exp: Add the new test.
index 2f055807b0229d1e49de976b9d5eafb8d1dcd736..0049000f3676c9210f56cee7e178aa2eed5583a7 100644 (file)
@@ -265,6 +265,7 @@ if [expr ([istarget "i*86-*-*"] ||  [istarget "x86_64-*-*"]) && [gas_32_check]]
     # Miscellaneous tests.
     run_dump_test "pr12589-1"
     run_dump_test "rep-bsf"
+    run_dump_test "rep-ret"
 
     set ASFLAGS "$old_ASFLAGS"
 }
diff --git a/gas/testsuite/gas/i386/rep-ret.d b/gas/testsuite/gas/i386/rep-ret.d
new file mode 100644 (file)
index 0000000..f481dcb
--- /dev/null
@@ -0,0 +1,9 @@
+#objdump: -d
+#name: rep prefix on ret
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+000 <foo>:
+\s*[0-9a-f]+:\s+f3 c3\s+repz ret\s*
diff --git a/gas/testsuite/gas/i386/rep-ret.s b/gas/testsuite/gas/i386/rep-ret.s
new file mode 100644 (file)
index 0000000..f141e86
--- /dev/null
@@ -0,0 +1,2 @@
+       .text
+foo:   rep ret
index be46939d87187b13ae04135b18c82faf659ab57f..7aa69b3882dccaf6295e01693500f5ba0089808b 100644 (file)
@@ -1,5 +1,8 @@
 2012-06-22  Roland McGrath  <mcgrathr@google.com>
 
+       * i386-opc.tbl: Add RepPrefixOk to ret.
+       * i386-tbl.h: Regenerate.
+
        * i386-opc.h (RepPrefixOk): New enum constant.
        (i386_opcode_modifier): New bitfield 'repprefixok'.
        * i386-gen.c (opcode_modifiers): Add RepPrefixOk.
index b545730664b65421cadfaf72d60c3cfe96d08ab7..7de61a7c2872de91bf01006ce9c9aec006c100be 100644 (file)
@@ -340,10 +340,10 @@ jmp, 1, 0xff, 0x5, 1, 0, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf, { Dword|
 ljmp, 2, 0xea, None, 1, CpuNo64, JumpInterSegment|No_bSuf|No_sSuf|No_qSuf|No_ldSuf, { Imm16, Imm16|Imm32 }
 ljmp, 1, 0xff, 0x5, 1, 0, Modrm|No_bSuf|No_sSuf|No_qSuf|No_ldSuf, { Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S|JumpAbsolute }
 
-ret, 0, 0xc3, None, 1, CpuNo64, DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_ldSuf, { 0 }
-ret, 1, 0xc2, None, 1, CpuNo64, DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_ldSuf, { Imm16 }
-ret, 0, 0xc3, None, 1, Cpu64, DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_ldSuf|NoRex64, { 0 }
-ret, 1, 0xc2, None, 1, Cpu64, DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_ldSuf|NoRex64, { Imm16 }
+ret, 0, 0xc3, None, 1, CpuNo64, DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_ldSuf|RepPrefixOk, { 0 }
+ret, 1, 0xc2, None, 1, CpuNo64, DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_ldSuf|RepPrefixOk, { Imm16 }
+ret, 0, 0xc3, None, 1, Cpu64, DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_ldSuf|NoRex64|RepPrefixOk, { 0 }
+ret, 1, 0xc2, None, 1, Cpu64, DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_ldSuf|NoRex64|RepPrefixOk, { Imm16 }
 lret, 0, 0xcb, None, 1, 0, DefaultSize|No_bSuf|No_sSuf|No_ldSuf, { 0 }
 lret, 1, 0xca, None, 1, 0, DefaultSize|No_bSuf|No_sSuf|No_ldSuf, { Imm16 }
 // Intel Syntax.
index 3ed3d215b69ff5b37e5e76c4cf704d049d731e5a..89dfda4e1fb1e71cebd4924667242ca35df1c6db 100644 (file)
@@ -2707,7 +2707,7 @@ const insn_template i386_optab[] =
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 } },
     { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 
-      0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
     { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
@@ -2717,7 +2717,7 @@ const insn_template i386_optab[] =
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 } },
     { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 
-      0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+      0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
     { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
@@ -2727,7 +2727,7 @@ const insn_template i386_optab[] =
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 } },
     { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 
-      1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 
+      1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
     { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
@@ -2737,7 +2737,7 @@ const insn_template i386_optab[] =
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 } },
     { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 
-      1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 
+      1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
     { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 
          0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,