Skip to content
Snippets Groups Projects
Commit 98e9edad authored by Jan Beulich's avatar Jan Beulich
Browse files

x86: "sse4arg" adjustments

Record common properties in other attributes' default calculations:
There's always a 1-byte immediate, and they're always encoded in a VEX3-
like manner (note that "prefix_extra" already evaluates to 1 in this
case). The drop now (or already previously) redundant explicit
attributes, adding "mode" ones where they were missing.

Furthermore use "sse4arg" consistently for all VPCOM* insns; so far
signed comparisons did use it, while unsigned ones used "ssecmp". Note
that while they have (not counting the explicit or implicit immediate
operand) they really only have 3 operands, the operator is also counted
in those patterns. That's relevant for establishing the "memory"
attribute's value, and at the same time benign when there are only
register operands.

Note that despite also having 4 operands, multiply-add insns aren't
affected by this change, as they use "ssemuladd" for "type".

gcc/

	* config/i386/i386.md (length_immediate): Handle "sse4arg".
	(prefix): Likewise.
	(*xop_pcmov_<mode>): Add "mode" attribute.
	* config/i386/mmx.md (*xop_maskcmp<mode>3): Drop "prefix_data16",
	"prefix_rep", "prefix_extra", and "length_immediate" attributes.
	(*xop_maskcmp_uns<mode>3): Likewise. Switch "type" to "sse4arg".
	(*xop_pcmov_<mode>): Add "mode" attribute.
	* config/i386/sse.md (xop_pcmov_<mode><avxsizesuffix>): Add "mode"
	attribute.
	(xop_maskcmp<mode>3): Drop "prefix_data16", "prefix_rep",
	"prefix_extra", and "length_immediate" attributes.
	(xop_maskcmp_uns<mode>3): Likewise. Switch "type" to "sse4arg".
	(xop_maskcmp_uns2<mode>3): Drop "prefix_data16", "prefix_extra",
	and "length_immediate" attributes. Switch "type" to "sse4arg".
	(xop_pcom_tf<mode>3): Likewise.
	(xop_vpermil2<mode>3): Drop "length_immediate" attribute.
parent 328796de
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment