Patchwork [x32] PATCH: Update address-releated patterns for x32

login
register
mail settings
Submitter H.J. Lu
Date Jan. 19, 2011, 8:19 p.m.
Message ID <20110119201908.GA30717@intel.com>
Download mbox | patch
Permalink /patch/79586/
State New
Headers show

Comments

H.J. Lu - Jan. 19, 2011, 8:19 p.m.
On Wed, Jan 19, 2011 at 11:21:35AM -0800, H.J. Lu wrote:
> Hi,
> 
> I checked in this patch to update address-releated patterns for x32.
> 
> 
> H.J.
> ---
> commit 7d50242fa61fbce7fdf3fcbb93e56ce52017e407
> Author: H.J. Lu <hjl.tools@gmail.com>
> Date:   Wed Jan 19 11:18:41 2011 -0800
> 
>     Update address-releated patterns for x32.
> 
> diff --git a/gcc/ChangeLog.x32 b/gcc/ChangeLog.x32
> index ca27084..18e1dc0 100644
> --- a/gcc/ChangeLog.x32
> +++ b/gcc/ChangeLog.x32
> @@ -1,5 +1,43 @@
>  2011-01-19  H.J. Lu  <hongjiu.lu@intel.com>
>  
> +	* config/i386/i386.md (i): Use "Ye" for SImode.
> +	(g): Use "rmYe" for SImode.
> +	(general_operand): Use x32_general_operand for SImode.
> +	(general_szext_operand): Likewise.
> +	(A): New.
> +	(*movdi_internal_rex64): Use mov instead of movabs for
> +	TARGET_X32.
> +	(*movabs<mode>_1): Likewise.
> +	(*movabs<mode>_2): Likewise.
> +	(*movsi_internal): Replace 'ri' with 'rYs'.  Use A instead of
> +	DI for pic_32bit_operand.
> +	(*lea_general_1): Replace immediate_operand and "i" with
> +	x32_lea_immediate_operand and "Ye".
> +	(*lea_general_1_zext): Likewise.
> +	(*lea_general_3): Likewise.
> +	(*lea_general_3_zext): Likewise.
> +	(*lea_general_2): Replace nonmemory_operand and "i" with
> +	x32_lea_nonmemory_operand and "Ye".
> +	(*lea_general_2_zext): Likewise.
> +	(*subsi_1_zext): Replace general_operand wi x32_general_operand.
> +	Replace "i"/"g" with "Ye"/"rmYe".
> +	(*subsi_2_zext): Likewise.
> +	(*subsi_3_zext): Likewise.
> +	(*addsi3_carry_zext): Likewise.
> +	(*subsi3_carry_zext): Likewise.
> +	(*andsi_1): Likewise.
> +	(*andsi_1_zext): Likewise.
> +	(*andsi_2_zext): Likewise.
> +	(*indirect_jump): Disabled for TARGET_X32.
> +	(*tablejump_1): Likewise.
> +	(*call_1_rex64): Likewise.
> +	(set_got_offset_rex64): Likewise.
> +	(*indirect_jump_x32): New.
> +	(*tablejump_1_x32): Likewise.
> +	(*call_1_rex64_x32): Likewise.
> +

I missed *addsi_1_zext and *addsi_2_zext.  Fixed with this patch.


H.J.
---
commit d6e6d1b297608d73f52bb9d2f327a7cd69ba8efd
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jan 19 12:16:35 2011 -0800

    Use x32_general_operand on *addsi_1_zext/*addsi_2_zext.

Patch

diff --git a/gcc/ChangeLog.x32 b/gcc/ChangeLog.x32
index 18e1dc0..2a164b2 100644
--- a/gcc/ChangeLog.x32
+++ b/gcc/ChangeLog.x32
@@ -1,5 +1,11 @@ 
 2011-01-19  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* config/i386/i386.md (*addsi_1_zext): Replace general_operand
+	with x32_general_operand.  Replace "i"/"g" with "Ye"/"rmYe".
+	(*addsi_2_zext): Likewise.
+
+2011-01-19  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* config/i386/i386.md (i): Use "Ye" for SImode.
 	(g): Use "rmYe" for SImode.
 	(general_operand): Use x32_general_operand for SImode.
@@ -19,7 +25,7 @@ 
 	(*lea_general_2): Replace nonmemory_operand and "i" with
 	x32_lea_nonmemory_operand and "Ye".
 	(*lea_general_2_zext): Likewise.
-	(*subsi_1_zext): Replace general_operand wi x32_general_operand.
+	(*subsi_1_zext): Replace general_operand with x32_general_operand.
 	Replace "i"/"g" with "Ye"/"rmYe".
 	(*subsi_2_zext): Likewise.
 	(*subsi_3_zext): Likewise.
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 186926c..c8bdf86 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -5749,7 +5749,7 @@ 
   [(set (match_operand:DI 0 "register_operand" "=r,r,r")
 	(zero_extend:DI
 	  (plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0,r,r")
-		   (match_operand:SI 2 "general_operand" "g,0,li"))))
+		   (match_operand:SI 2 "x32_general_operand" "rmYe,0,lYe"))))
    (clobber (reg:CC FLAGS_REG))]
   "TARGET_64BIT && ix86_binary_operator_ok (PLUS, SImode, operands)"
 {
@@ -6138,7 +6138,7 @@ 
   [(set (reg FLAGS_REG)
 	(compare
 	  (plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0")
-		   (match_operand:SI 2 "general_operand" "g"))
+		   (match_operand:SI 2 "x32_general_operand" "rmYe"))
 	  (const_int 0)))
    (set (match_operand:DI 0 "register_operand" "=r")
 	(zero_extend:DI (plus:SI (match_dup 1) (match_dup 2))))]