diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2013-02-28 20:50:19 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2013-02-28 20:50:19 +0000 |
commit | d5de92cf93a7ab93344b88c6bb54d1ebeadaa900 (patch) | |
tree | e1b47a8f29e24afc988c76b2cbcda6449cd17fc2 /gas/testsuite | |
parent | ddb08e9caa02b478b6f4f3969cf5a7142fc0035e (diff) | |
download | gdb-d5de92cf93a7ab93344b88c6bb54d1ebeadaa900.zip gdb-d5de92cf93a7ab93344b88c6bb54d1ebeadaa900.tar.gz gdb-d5de92cf93a7ab93344b88c6bb54d1ebeadaa900.tar.bz2 |
Optimize REP prefix check
gas/
* config/tc-i386.c (_i386_insn): Add rep_prefix.
(md_assemble): Check if REP prefix is OK.
(parse_insn): Remove expecting_string_instruction. Set
i.rep_prefix.
gas/testsuite/
* gas/i386/i386.exp: Run inval-rep and x86-64-inval-rep.
* gas/i386/inval-rep.l: New file.
* gas/i386/inval-rep.s: Likewise.
* gas/i386/x86-64-inval-rep.l: Likewise.
* gas/i386/x86-64-inval-rep.s: Likewise.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/i386.exp | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/inval-rep.l | 15 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/inval-rep.s | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-inval-rep.l | 15 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/x86-64-inval-rep.s | 6 |
6 files changed, 53 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index cb39336..5107894 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2013-02-28 H.J. Lu <hongjiu.lu@intel.com> + + * gas/i386/i386.exp: Run inval-rep and x86-64-inval-rep. + + * gas/i386/inval-rep.l: New file. + * gas/i386/inval-rep.s: Likewise. + * gas/i386/x86-64-inval-rep.l: Likewise. + * gas/i386/x86-64-inval-rep.s: Likewise. + 2013-02-28 Yufeng Zhang <yufeng.zhang@arm.com> * gas/aarch64/crc32.s: New test. diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index f03dcf3..a8743e9 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -85,6 +85,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] run_dump_test "ssse3" run_dump_test "rep" run_dump_test "rep-suffix" + run_list_test "inval-rep" "-al" run_dump_test "lock-1" run_dump_test "lock-1-intel" run_list_test "lockbad-1" "-al" @@ -366,6 +367,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t run_dump_test "x86-64-ssse3" run_dump_test "x86-64-rep" run_dump_test "x86-64-rep-suffix" + run_list_test "x86-64-inval-rep" "-al" run_dump_test "x86-64-lock-1" run_dump_test "x86-64-lock-1-intel" run_list_test "x86-64-lockbad-1" "-al" diff --git a/gas/testsuite/gas/i386/inval-rep.l b/gas/testsuite/gas/i386/inval-rep.l new file mode 100644 index 0000000..5579011 --- /dev/null +++ b/gas/testsuite/gas/i386/inval-rep.l @@ -0,0 +1,15 @@ +.*: Assembler messages: +.*:2: Error: .* +.*:3: Error: .* +.*:4: Error: .* +.*:5: Error: .* +.*:6: Error: .* +GAS LISTING .* + + +[ ]*1[ ]+\.text +[ ]*2[ ]+rep add %ebx, %eax +[ ]*3[ ]+repe add %ebx, %eax +[ ]*4[ ]+repz add %ebx, %eax +[ ]*5[ ]+repne add %ebx, %eax +[ ]*6[ ]+repnz add %ebx, %eax diff --git a/gas/testsuite/gas/i386/inval-rep.s b/gas/testsuite/gas/i386/inval-rep.s new file mode 100644 index 0000000..65211ac --- /dev/null +++ b/gas/testsuite/gas/i386/inval-rep.s @@ -0,0 +1,6 @@ + .text + rep add %ebx, %eax + repe add %ebx, %eax + repz add %ebx, %eax + repne add %ebx, %eax + repnz add %ebx, %eax diff --git a/gas/testsuite/gas/i386/x86-64-inval-rep.l b/gas/testsuite/gas/i386/x86-64-inval-rep.l new file mode 100644 index 0000000..8d582f2 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-inval-rep.l @@ -0,0 +1,15 @@ +.*: Assembler messages: +.*:2: Error: .* +.*:3: Error: .* +.*:4: Error: .* +.*:5: Error: .* +.*:6: Error: .* +GAS LISTING .* + + +[ ]*1[ ]+\.text +[ ]*2[ ]+rep add %rbx, %rax +[ ]*3[ ]+repe add %rbx, %rax +[ ]*4[ ]+repz add %rbx, %rax +[ ]*5[ ]+repne add %rbx, %rax +[ ]*6[ ]+repnz add %rbx, %rax diff --git a/gas/testsuite/gas/i386/x86-64-inval-rep.s b/gas/testsuite/gas/i386/x86-64-inval-rep.s new file mode 100644 index 0000000..bccf948 --- /dev/null +++ b/gas/testsuite/gas/i386/x86-64-inval-rep.s @@ -0,0 +1,6 @@ + .text + rep add %rbx, %rax + repe add %rbx, %rax + repz add %rbx, %rax + repne add %rbx, %rax + repnz add %rbx, %rax |