x86: Add -muse-unaligned-vector-move to assembler
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 21 Oct 2021 13:15:31 +0000 (06:15 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 22 Oct 2021 21:45:13 +0000 (14:45 -0700)
commitc8480b58e1968f209b6365af7422678f348222c2
treeff36a1eb3ca713e3216661ce17cdf183e54fef18
parentaab00c2dff7511883e46735ef5e4582acd4d9911
x86: Add -muse-unaligned-vector-move to assembler

Unaligned load/store instructions on aligned memory or register are as
fast as aligned load/store instructions on modern Intel processors.  Add
a command-line option, -muse-unaligned-vector-move, to x86 assembler to
encode encode aligned vector load/store instructions as unaligned
vector load/store instructions.

* NEWS: Mention -muse-unaligned-vector-move.
* config/tc-i386.c (use_unaligned_vector_move): New.
(encode_with_unaligned_vector_move): Likewise.
(md_assemble): Call encode_with_unaligned_vector_move for
-muse-unaligned-vector-move.
(OPTION_MUSE_UNALIGNED_VECTOR_MOVE): New.
(md_longopts): Add -muse-unaligned-vector-move.
(md_parse_option): Handle -muse-unaligned-vector-move.
(md_show_usage): Add -muse-unaligned-vector-move.
* doc/c-i386.texi: Document -muse-unaligned-vector-move.
* testsuite/gas/i386/i386.exp: Run unaligned-vector-move and
x86-64-unaligned-vector-move.
* testsuite/gas/i386/unaligned-vector-move.d: New file.
* testsuite/gas/i386/unaligned-vector-move.s: Likewise.
* testsuite/gas/i386/x86-64-unaligned-vector-move.d: Likewise.
gas/NEWS
gas/config/tc-i386.c
gas/doc/c-i386.texi
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/unaligned-vector-move.d [new file with mode: 0644]
gas/testsuite/gas/i386/unaligned-vector-move.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-unaligned-vector-move.d [new file with mode: 0644]