Patchwork Fix handling of EXPAND_MEMORY for TFmode memory constraint in asm

login
register
mail settings
Submitter John David Anglin
Date Dec. 1, 2012, 10:46 p.m.
Message ID <20121201224609.GA18582@hiauly1.hia.nrc.ca>
Download mbox | patch
Permalink /patch/203156/
State New
Headers show

Comments

John David Anglin - Dec. 1, 2012, 10:46 p.m.
The attached change fixes the compilation of the following asm
in libquadmath/math/fmaq.c:

asm volatile ("" : : "m" (v.value));

The issue arises because there is no support for directly loading TFmode
objects.

Ok for trunk?

Dave
John David Anglin - Dec. 30, 2012, 4:25 p.m.
Ping.

On 1-Dec-12, at 5:46 PM, John David Anglin wrote:

> The attached change fixes the compilation of the following asm
> in libquadmath/math/fmaq.c:
>
> asm volatile ("" : : "m" (v.value));
>
> The issue arises because there is no support for directly loading  
> TFmode
> objects.
>
> Ok for trunk?
>
> Dave
> -- 
> J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
> National Research Council of Canada              (613) 990-0752  
> (FAX: 952-6602)
>
> 2012-12-01  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
>
> 	PR middle-end/55198
> 	* expr.c (expand_expr_real_1): Don't use bitfield extraction for non
> 	BLKmode objects when EXPAND_MEMORY is specified.
>
> Index: expr.c
> ===================================================================
> --- expr.c	(revision 193685)
> +++ expr.c	(working copy)
> @@ -9928,7 +9928,8 @@
> 		&& GET_MODE_CLASS (mode) != MODE_COMPLEX_INT
> 		&& GET_MODE_CLASS (mode) != MODE_COMPLEX_FLOAT
> 		&& modifier != EXPAND_CONST_ADDRESS
> -		&& modifier != EXPAND_INITIALIZER)
> +		&& modifier != EXPAND_INITIALIZER
> +		&& modifier != EXPAND_MEMORY)
> 	    /* If the field is volatile, we always want an aligned
> 	       access.  Do this in following two situations:
> 	       1. the access is not already naturally
>

--
John David Anglin	dave.anglin@bell.net
Richard Henderson - Jan. 2, 2013, 6:17 p.m.
On 12/01/2012 02:46 PM, John David Anglin wrote:
> 	PR middle-end/55198
> 	* expr.c (expand_expr_real_1): Don't use bitfield extraction for non
> 	BLKmode objects when EXPAND_MEMORY is specified.

Ok.


r~

Patch

Index: expr.c
===================================================================
--- expr.c	(revision 193685)
+++ expr.c	(working copy)
@@ -9928,7 +9928,8 @@ 
 		&& GET_MODE_CLASS (mode) != MODE_COMPLEX_INT
 		&& GET_MODE_CLASS (mode) != MODE_COMPLEX_FLOAT
 		&& modifier != EXPAND_CONST_ADDRESS
-		&& modifier != EXPAND_INITIALIZER)
+		&& modifier != EXPAND_INITIALIZER
+		&& modifier != EXPAND_MEMORY)
 	    /* If the field is volatile, we always want an aligned
 	       access.  Do this in following two situations:
 	       1. the access is not already naturally