gas: detect DCTI couples in sparc
authorJose E. Marchesi <jose.marchesi@oracle.com>
Wed, 14 Sep 2016 14:10:49 +0000 (07:10 -0700)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Wed, 14 Sep 2016 14:10:49 +0000 (07:10 -0700)
commit46a2d504dd875caf60f9be191a55c9ff676bcd5c
tree8cfbcceec843973e7f39e5b7f9d630bb1f4557c3
parent5d9bbb73c1df68741048c3d0f837b50c289ea608
gas: detect DCTI couples in sparc

Before SPARC V9 the effect of having a delayed branch instruction in the
delay slot of a conditional delayed branch was undefined.

In SPARC V9 DCTI couples are well defined.

However, starting with the UltraSPARC Architecture 2005, DCTI
couples (of all kind) are deprecated and should not be used, as they may
be slow or behave differently to what the programmer expects.

This patch adds a new command line option --dcti-couples-detect to `as',
disabled by default, that makes the assembler to warn the user if an
unpredictable DCTI couple is found.  Tests and documentation are
included.

gas/ChangeLog:

2016-09-14  Jose E. Marchesi  <jose.marchesi@oracle.com>

* config/tc-sparc.c (md_assemble): Detect and warning on
unpredictable DCTI couples in certain arches.
(dcti_couples_detect): New global.
(md_longopts): Add command line option -dcti-couples-detect.
(md_show_usage): Document -dcti-couples-detect.
(md_parse_option): Handle OPTION_DCTI_COUPLES_DETECT.
* testsuite/gas/sparc/sparc.exp (gas_64_check): Run
dcti-couples-v8, dcti-couples-v9 and dcti-couples-v9c tests.
* testsuite/gas/sparc/dcti-couples.s: New file.
* testsuite/gas/sparc/dcti-couples-v9c.d: Likewise.
* testsuite/gas/sparc/dcti-couples-v8.d: Likewise.
* testsuite/gas/sparc/dcti-couples-v9.d: Likewise.
* testsuite/gas/sparc/dcti-couples-v9c.l: Likewise.
* testsuite/gas/sparc/dcti-couples-v8.l: Likewise.
* doc/as.texinfo (Overview): Document --dcti-couples-detect.
* doc/c-sparc.texi (Sparc-Opts): Likewise.
gas/ChangeLog
gas/config/tc-sparc.c
gas/doc/as.texinfo
gas/doc/c-sparc.texi
gas/testsuite/gas/sparc/dcti-couples-v8.d [new file with mode: 0644]
gas/testsuite/gas/sparc/dcti-couples-v8.l [new file with mode: 0644]
gas/testsuite/gas/sparc/dcti-couples-v9.d [new file with mode: 0644]
gas/testsuite/gas/sparc/dcti-couples-v9c.d [new file with mode: 0644]
gas/testsuite/gas/sparc/dcti-couples-v9c.l [new file with mode: 0644]
gas/testsuite/gas/sparc/dcti-couples.s [new file with mode: 0644]
gas/testsuite/gas/sparc/sparc.exp
This page took 0.027774 seconds and 4 git commands to generate.