This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC PATCH, i386]: Rename reg constraints: Y0->Yz, Yt->Y2


Hello!

This RFC patch renames SSE register constraints Y0 into Yz and Yt into
Y2. The core of the patch is actually:

--cut here--
--- constraints.md	(revision 129602)
+++ constraints.md	(working copy)
@@ -83,15 +83,15 @@
  "Any SSE register.")

 ;; We use the Y prefix to denote any number of conditional register sets:
-;;  0	First SSE register.
-;;  t	SSE2 enabled
+;;  z	First SSE register.
+;;  2	SSE2 enabled
 ;;  i	SSE2 inter-unit moves enabled
 ;;  m	MMX inter-unit moves enabled

-(define_register_constraint "Y0" "TARGET_SSE ? SSE_FIRST_REG : NO_REGS"
+(define_register_constraint "Yz" "TARGET_SSE ? SSE_FIRST_REG : NO_REGS"
  "First SSE register (@code{%xmm0}).")

-(define_register_constraint "Yt" "TARGET_SSE2 ? SSE_REGS : NO_REGS"
+(define_register_constraint "Y2" "TARGET_SSE2 ? SSE_REGS : NO_REGS"
  "@internal Any SSE register, when SSE2 is enabled.")

 (define_register_constraint "Yi"
--cut here--

The problem is in 'Yt' name, that IMO just doesn't sound right. These
registers are enabled for SSE2, and IMO their names should be
postfixed with '2' in order to be consistent with possible future SSE
revisions.

Also, we have 't' and 'u' constraints for x87 registers, so IMO "Yz"
should not confuse users too much.

The patch also includes Rask's fix to *dummy_extendsfdf2.

2007-10-24  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/constraints.md (Y0): Rename register constraint to Yz.
	(Yt): Rename register constraint to Y2.
	* config/i386/sse.md: Use renamed register constraints.
	* config/i386/mmx.md: Ditto.
	* config/i386/i386.md: Ditto.

2007-10-23  Rask Ingemann Lambertsen  <rask@sygehus.dk>

	* config/i386/i386.md (*dummy_extendsfdf2): Fix operand 1 constraint.

The patch was bootstrapped and regression tested on x86_64-pc-linux-gnu.

Uros.

Attachment: sse0.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]