diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2018-03-08 06:31:32 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2018-03-08 06:31:52 -0800 |
commit | bd5dea8822e515faf305690ca5c5281132d95587 (patch) | |
tree | c4b59a27cd8a3344dd7d95a5a88c18a60a0dc76b /gas/testsuite | |
parent | 4ef0bef68cfc777e59156fce1563583c0ffb76d9 (diff) | |
download | gdb-bd5dea8822e515faf305690ca5c5281132d95587.zip gdb-bd5dea8822e515faf305690ca5c5281132d95587.tar.gz gdb-bd5dea8822e515faf305690ca5c5281132d95587.tar.bz2 |
x86: Remove support for old (<= 2.8.1) versions of gcc
Old (<= 2.8.1) versions of gcc generate broken fsubp, fsubrp, fdivp and
fdivrp instructions. Assembler translates them to correct ones with a
warning:
[hjl@gnu-cfl-1 gas]$ cat x.s
fsubp %st(3),%st
[hjl@gnu-cfl-1 gas]$ gcc -c x.s
x.s: Assembler messages:
x.s:1: Warning: translating to `fsubp %st,%st(3)'
[hjl@gnu-cfl-1 gas]$
This patch removes support for old (<= 2.8.1) versions of gcc:
[hjl@gnu-cfl-1 gas]$ ./as-new -o x.o x.s
x.s: Assembler messages:
x.s:1: Error: operand type mismatch for `fsubp'
[hjl@gnu-cfl-1 gas]$
gas/
* NEWS: Mention -mold-gcc removal.
* config/tc-i386.c (i386_error): Remove old_gcc_only.
(old_gcc): Removed.
(match_template): Remove old gcc support.
(OPTION_MOLD_GCC): Removed.
(OPTION_MRELAX_RELOCATIONS): Updated.
(md_longopts): Remove OPTION_MOLD_GCC.
(md_parse_option): Likewise.
(md_show_usage): Remove -mold-gcc.
* testsuite/gas/i386/general.s: Convert fsub/fdiv tests for old
(<= 2.8.1) versions of gcc.
* testsuite/gas/i386/intel.s: Likewise.
* testsuite/gas/i386/general.l: Updated.
* testsuite/gas/i386/intel-intel.d: Likewise.
* testsuite/gas/i386/intel.d: Likewise.
* testsuite/gas/i386/intel.e: Likewise.
* testsuite/gas/i386/i386.exp: Don't pass -mold-gcc to general.
include/
* opcode/i386 (OLDGCC_COMPAT): Removed.
opcodes/
* i386-gen.c (opcode_modifiers): Remove OldGcc.
* i386-opc.h (OldGcc): Removed.
(i386_opcode_modifier): Remove oldgcc.
* i386-opc.tbl: Remove fsubp, fsubrp, fdivp and fdivrp
instructions for old (<= 2.8.1) versions of gcc.
* i386-tbl.h: Regenerated.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/i386/general.l | 16 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/general.s | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/i386.exp | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/intel-intel.d | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/intel.d | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/intel.e | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/i386/intel.s | 8 |
7 files changed, 21 insertions, 33 deletions
diff --git a/gas/testsuite/gas/i386/general.l b/gas/testsuite/gas/i386/general.l index f0ddfc7..17bf88f 100644 --- a/gas/testsuite/gas/i386/general.l +++ b/gas/testsuite/gas/i386/general.l @@ -24,10 +24,6 @@ .*:132: Warning:.* .*:133: Warning:.* .*:134: Warning:.* -.*:135: Warning:.* -.*:136: Warning:.* -.*:137: Warning:.* -.*:138: Warning:.* .*:139: Warning:.* .*:140: Warning:.* .*:141: Warning:.* @@ -194,14 +190,10 @@ .*Warning:.* 134 014a DECA fmulp %st\(2\),%st .*Warning:.* - 135 014c DEE3 fsubp %st\(3\),%st -.*Warning:.* - 136 014e DEEC fsubrp %st\(4\),%st -.*Warning:.* - 137 0150 DEF5 fdivp %st\(5\),%st -.*Warning:.* - 138 0152 DEFE fdivrp %st\(6\),%st -.*Warning:.* + 135 014c D8E3 fsub %st\(3\),%st + 136 014e D8EC fsubr %st\(4\),%st + 137 0150 D8F5 fdiv %st\(5\),%st + 138 0152 D8FE fdivr %st\(6\),%st 139 0154 DEC1 fadd .*Warning:.* 140 0156 DEE1 fsub diff --git a/gas/testsuite/gas/i386/general.s b/gas/testsuite/gas/i386/general.s index 385b478..a0ea660 100644 --- a/gas/testsuite/gas/i386/general.s +++ b/gas/testsuite/gas/i386/general.s @@ -132,10 +132,10 @@ fcompl %st(5) faddp %st(1),%st fmulp %st(2),%st - fsubp %st(3),%st - fsubrp %st(4),%st - fdivp %st(5),%st - fdivrp %st(6),%st + fsub %st(3),%st + fsubr %st(4),%st + fdiv %st(5),%st + fdivr %st(6),%st fadd fsub fmul diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp index 9dd2546..f28e6a9 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -40,7 +40,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]] set ASFLAGS "$ASFLAGS --32" run_list_test "float" "-al -mmnemonic=att" - run_list_test "general" "-al --listing-lhs-width=2 -mold-gcc" + run_list_test "general" "-al --listing-lhs-width=2" run_list_test "inval" "-al" run_list_test "inval-16" "-al" run_list_test "segment" "-al" diff --git a/gas/testsuite/gas/i386/intel-intel.d b/gas/testsuite/gas/i386/intel-intel.d index db0b93d..eb45f2c 100644 --- a/gas/testsuite/gas/i386/intel-intel.d +++ b/gas/testsuite/gas/i386/intel-intel.d @@ -653,7 +653,7 @@ Disassembly of section .text: [ ]*[a-f0-9]+: de f9 + fdivp st\(1\),st [ ]*[a-f0-9]+: de fb + fdivp st\(3\),st [ ]*[a-f0-9]+: de fb + fdivp st\(3\),st -[ ]*[a-f0-9]+: de fb + fdivp st\(3\),st +[ ]*[a-f0-9]+: d8 f3 + fdiv st,st\(3\) [ ]*[a-f0-9]+: de f1 + fdivrp st\(1\),st [ ]*[a-f0-9]+: d8 fb + fdivr st,st\(3\) [ ]*[a-f0-9]+: d8 fb + fdivr st,st\(3\) @@ -663,7 +663,7 @@ Disassembly of section .text: [ ]*[a-f0-9]+: de f1 + fdivrp st\(1\),st [ ]*[a-f0-9]+: de f3 + fdivrp st\(3\),st [ ]*[a-f0-9]+: de f3 + fdivrp st\(3\),st -[ ]*[a-f0-9]+: de f3 + fdivrp st\(3\),st +[ ]*[a-f0-9]+: d8 fb + fdivr st,st\(3\) [ ]*[a-f0-9]+: de c9 + fmulp st\(1\),st [ ]*[a-f0-9]+: d8 cb + fmul st,st\(3\) [ ]*[a-f0-9]+: d8 cb + fmul st,st\(3\) @@ -682,7 +682,7 @@ Disassembly of section .text: [ ]*[a-f0-9]+: dc 23 + fsub QWORD PTR \[ebx\] [ ]*[a-f0-9]+: de e9 + fsubp st\(1\),st [ ]*[a-f0-9]+: de eb + fsubp st\(3\),st -[ ]*[a-f0-9]+: de eb + fsubp st\(3\),st +[ ]*[a-f0-9]+: d8 e3 + fsub st,st\(3\) [ ]*[a-f0-9]+: de eb + fsubp st\(3\),st [ ]*[a-f0-9]+: d8 eb + fsubr st,st\(3\) [ ]*[a-f0-9]+: d8 eb + fsubr st,st\(3\) @@ -692,7 +692,7 @@ Disassembly of section .text: [ ]*[a-f0-9]+: de e1 + fsubrp st\(1\),st [ ]*[a-f0-9]+: de e3 + fsubrp st\(3\),st [ ]*[a-f0-9]+: de e3 + fsubrp st\(3\),st -[ ]*[a-f0-9]+: de e3 + fsubrp st\(3\),st +[ ]*[a-f0-9]+: d8 eb + fsubr st,st\(3\) [ ]*[a-f0-9]+: de 3b + fidivr WORD PTR \[ebx\] [ ]*[a-f0-9]+: da 3b + fidivr DWORD PTR \[ebx\] [ ]*[a-f0-9]+: 0f 4a 90 90 90 90 90 cmovp edx,DWORD PTR \[eax-0x6f6f6f70\] diff --git a/gas/testsuite/gas/i386/intel.d b/gas/testsuite/gas/i386/intel.d index 3f2c346..4d6c4b1 100644 --- a/gas/testsuite/gas/i386/intel.d +++ b/gas/testsuite/gas/i386/intel.d @@ -652,7 +652,7 @@ Disassembly of section .text: [ ]*[a-f0-9]+: de f9 fdivrp %st,%st\(1\) [ ]*[a-f0-9]+: de fb fdivrp %st,%st\(3\) [ ]*[a-f0-9]+: de fb fdivrp %st,%st\(3\) -[ ]*[a-f0-9]+: de fb fdivrp %st,%st\(3\) +[ ]*[a-f0-9]+: d8 f3 fdiv %st\(3\),%st [ ]*[a-f0-9]+: de f1 fdivp %st,%st\(1\) [ ]*[a-f0-9]+: d8 fb fdivr %st\(3\),%st [ ]*[a-f0-9]+: d8 fb fdivr %st\(3\),%st @@ -662,7 +662,7 @@ Disassembly of section .text: [ ]*[a-f0-9]+: de f1 fdivp %st,%st\(1\) [ ]*[a-f0-9]+: de f3 fdivp %st,%st\(3\) [ ]*[a-f0-9]+: de f3 fdivp %st,%st\(3\) -[ ]*[a-f0-9]+: de f3 fdivp %st,%st\(3\) +[ ]*[a-f0-9]+: d8 fb fdivr %st\(3\),%st [ ]*[a-f0-9]+: de c9 fmulp %st,%st\(1\) [ ]*[a-f0-9]+: d8 cb fmul %st\(3\),%st [ ]*[a-f0-9]+: d8 cb fmul %st\(3\),%st @@ -681,7 +681,7 @@ Disassembly of section .text: [ ]*[a-f0-9]+: dc 23 fsubl \(%ebx\) [ ]*[a-f0-9]+: de e9 fsubrp %st,%st\(1\) [ ]*[a-f0-9]+: de eb fsubrp %st,%st\(3\) -[ ]*[a-f0-9]+: de eb fsubrp %st,%st\(3\) +[ ]*[a-f0-9]+: d8 e3 fsub %st\(3\),%st [ ]*[a-f0-9]+: de eb fsubrp %st,%st\(3\) [ ]*[a-f0-9]+: d8 eb fsubr %st\(3\),%st [ ]*[a-f0-9]+: d8 eb fsubr %st\(3\),%st @@ -691,7 +691,7 @@ Disassembly of section .text: [ ]*[a-f0-9]+: de e1 fsubp %st,%st\(1\) [ ]*[a-f0-9]+: de e3 fsubp %st,%st\(3\) [ ]*[a-f0-9]+: de e3 fsubp %st,%st\(3\) -[ ]*[a-f0-9]+: de e3 fsubp %st,%st\(3\) +[ ]*[a-f0-9]+: d8 eb fsubr %st\(3\),%st [ ]*[a-f0-9]+: de 3b fidivrs \(%ebx\) [ ]*[a-f0-9]+: da 3b fidivrl \(%ebx\) [ ]*[a-f0-9]+: 0f 4a 90 90 90 90 90 cmovp -0x6f6f6f70\(%eax\),%edx diff --git a/gas/testsuite/gas/i386/intel.e b/gas/testsuite/gas/i386/intel.e index 9c0e76c..2e47970 100644 --- a/gas/testsuite/gas/i386/intel.e +++ b/gas/testsuite/gas/i386/intel.e @@ -1,11 +1,7 @@ .*: Assembler messages: .*:635: Warning: translating to `faddp' .*:644: Warning: translating to `fdivp' -.*:653: Warning: translating to `fdivp st\(3\),st' .*:654: Warning: translating to `fdivrp' -.*:663: Warning: translating to `fdivrp st\(3\),st' .*:664: Warning: translating to `fmulp' .*:673: Warning: translating to `fsubp' .*:674: Warning: translating to `fsubrp' -.*:682: Warning: translating to `fsubp st\(3\),st' -.*:692: Warning: translating to `fsubrp st\(3\),st' diff --git a/gas/testsuite/gas/i386/intel.s b/gas/testsuite/gas/i386/intel.s index 54249d3..19c5eea 100644 --- a/gas/testsuite/gas/i386/intel.s +++ b/gas/testsuite/gas/i386/intel.s @@ -650,7 +650,7 @@ fdiv QWORD PTR [ebx] fdivp fdivp st(3) fdivp st(3),st -fdivp st,st(3) +fdiv st,st(3) fdivr fdivr st(3) fdivr st,st(3) @@ -660,7 +660,7 @@ fdivr QWORD PTR [ebx] fdivrp fdivrp st(3) fdivrp st(3),st -fdivrp st,st(3) +fdivr st,st(3) fmul fmul st(3) fmul st,st(3) @@ -679,7 +679,7 @@ fsub DWORD PTR [ebx] fsub QWORD PTR [ebx] fsubp fsubp st(3) -fsubp st,st(3) +fsub st,st(3) fsubp st(3),st fsubr st(3) fsubr st,st(3) @@ -689,7 +689,7 @@ fsubr QWORD PTR [ebx] fsubrp fsubrp st(3) fsubrp st(3),st -fsubrp st,st(3) +fsubr st,st(3) fidivr word ptr [ebx] fidivr dword ptr [ebx] |