The VGATHER group of instructions requires that all three involved
authorJan Beulich <jbeulich@novell.com>
Tue, 7 Aug 2012 16:55:00 +0000 (16:55 +0000)
committerJan Beulich <jbeulich@novell.com>
Tue, 7 Aug 2012 16:55:00 +0000 (16:55 +0000)
commit7bab8ab56f7c09acbaca2645314e0622b20c2afe
treecc394cb8692e08ffec7ee9af268c90b4ad47c8ad
parent4c692bc7aa91109a1102fd0c6f3229e7efbe87d0
The VGATHER group of instructions requires that all three involved
xmm/ymm registers are distinct. This patch adds code to check for this,
and at once eliminates a superfluous check for not using PC-relative
addressing for these instructions (the fact that an index register is
required here already excludes valid PC-relative addresses). The
severity of the resulting diagnostics can be controlled via command
line option or directive.

gas/
2012-08-07  Jan Beulich <jbeulich@suse.com>

* config/tc-i386.c (set_check): Renamed from set_sse_check.
Generalize to also handle operand checking option.
(enum i386_error): New enumerator 'invalid_vector_register_set'.
(match_template): Handle it.
(enum check_kind): Give it a tag. Drop sse_ prefixes from
enumerators.
(operand_check): New.
(md_pseudo_table): Add "operand_check".
(check_VecOperands): Don't special case RIP addressing. Check
that vSIB operands use distinct vector registers unless no
checking was requested.
(OPTION_MOPERAND_CHECK): New.
(md_parse_option): Handle it.
(OPTION_MAVXSCALAR, OPTION_X32): Adjust.
(md_longopts): Add "moperand-check".
(md_show_usage): Add help text for it.

gas/testsuite/
2012-08-07  Jan Beulich <jbeulich@suse.com>

* gas/i386/vgather-check-error.{s,l}: New.
* gas/i386/vgather-check-none.{s,d}: New.
* gas/i386/vgather-check-warn.{d,e}: New.
* gas/i386/vgather-check.{s,d}: New.
* gas/i386/x86-64-vgather-check-error.{s,l}: New.
* gas/i386/x86-64-vgather-check-none.{s,d}: New.
* gas/i386/x86-64-vgather-check-warn.{d,e}: New.
* gas/i386/x86-64-vgather-check.{s,d}: New.
* gas/i386/i386.exp: Run new tests.
20 files changed:
gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/ChangeLog
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/vgather-check-error.l [new file with mode: 0644]
gas/testsuite/gas/i386/vgather-check-error.s [new file with mode: 0644]
gas/testsuite/gas/i386/vgather-check-none.d [new file with mode: 0644]
gas/testsuite/gas/i386/vgather-check-none.s [new file with mode: 0644]
gas/testsuite/gas/i386/vgather-check-warn.d [new file with mode: 0644]
gas/testsuite/gas/i386/vgather-check-warn.e [new file with mode: 0644]
gas/testsuite/gas/i386/vgather-check.d [new file with mode: 0644]
gas/testsuite/gas/i386/vgather-check.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-vgather-check-error.l [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-vgather-check-error.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-vgather-check-none.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-vgather-check-none.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-vgather-check-warn.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-vgather-check-warn.e [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-vgather-check.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-vgather-check.s [new file with mode: 0644]