[PATCH] Fix handling of EXPAND_MEMORY for TFmode memory constraint in asm

John David Anglin dave@hiauly1.hia.nrc.ca
Sat Dec 1 22:46:00 GMT 2012


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



More information about the Gcc-patches mailing list