This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix handling of EXPAND_MEMORY for TFmode memory constraint in asm
- From: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 1 Dec 2012 17:46:09 -0500
- Subject: [PATCH] Fix handling of EXPAND_MEMORY for TFmode memory constraint in asm
- Reply-to: John David Anglin <dave dot anglin at nrc-cnrc dot gc dot ca>
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