This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 2/4] x86: StaticRounding implies SAE
- From: "Jan Beulich" <JBeulich at suse dot com>
- To: <binutils at sourceware dot org>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Thu, 27 Jun 2019 01:54:16 -0600
- Subject: [PATCH 2/4] x86: StaticRounding implies SAE
- References: <5D1472C4020000780023B6DC@prv1-mh.provo.novell.com>
This implication allows to simplify some conditionals, thus slightly
improving performance. This change also paves the way for re-using
StaticRounding for non-EVEX insns.
gas/
2019-06-27 Jan Beulich <jbeulich@suse.com>
* config/tc-i386.c (is_evex_encoding): Don't check for SAE.
(check_VecOperands): Simplify static rounding / SAE checking.
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -3557,7 +3557,7 @@ is_evex_encoding (const insn_template *t
{
return t->opcode_modifier.evex || t->opcode_modifier.disp8memshift
|| t->opcode_modifier.broadcast || t->opcode_modifier.masking
- || t->opcode_modifier.staticrounding || t->opcode_modifier.sae;
+ || t->opcode_modifier.sae;
}
static INLINE bfd_boolean
@@ -5469,11 +5469,8 @@ check_VecOperands (const insn_template *
/* Check RC/SAE. */
if (i.rounding)
{
- if ((i.rounding->type != saeonly
- && !t->opcode_modifier.staticrounding)
- || (i.rounding->type == saeonly
- && (t->opcode_modifier.staticrounding
- || !t->opcode_modifier.sae)))
+ if (!t->opcode_modifier.sae
+ || (i.rounding->type != saeonly && !t->opcode_modifier.staticrounding))
{
i.error = unsupported_rc_sae;
return 1;