This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] S/390: Wide int support.
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- Cc: vogt at linux dot vnet dot ibm dot com, gcc-patches at gcc dot gnu dot org, Ulrich dot Weigand at de dot ibm dot com (Ulrich Weigand), krebbel at linux dot vnet dot ibm dot com (Andreas Krebbel)
- Date: Fri, 18 Dec 2015 09:53:01 +0000
- Subject: Re: [PATCH] S/390: Wide int support.
- Authentication-results: sourceware.org; auth=none
- References: <877fkfmqzz dot fsf at googlemail dot com> <20151216002406 dot 4517713EE at oc7340732750 dot ibm dot com>
"Ulrich Weigand" <uweigand@de.ibm.com> writes:
> Richard Sandiford wrote:
>> "Ulrich Weigand" <uweigand@de.ibm.com> writes:
>> > The problem is not DImode LABEL_REFs, but rather VOIDmode LABEL_REFs when
>> > matched against a match_operand:DI.
>>
>> It'd be good to fix this in a more direct way though, rather than
>> hack around it. It's possible that the trick will stop working
>> if genrecog.c gets smarter.
>>
>> When do label_refs have VOIDmode? Is this an m31-ism?
>
> No, this seems to be a cross-platform issue. For one, RTX in .md files
> pretty much consistently uses (label_ref ...) without a mode. This means
> that any LABEL_REFs generated from .md file expanders or splitters will
> use VOIDmode.
>
> For LABEL_REFs generated via explicit gen_rtx_LABEL_REF, usage seems to
> be mixed between using VOIDmode and Pmode in target C++ files. Common
> code does seem to be using always Pmode, as far as I can see.
>
> Are LABEL_REFs in fact supposed to always have Pmode?
Yeah, I think so, or at least always be Pmode or ptr_mode. It sounds from
what you say that reality doesn't match though.
We should probably fix the remaining gen_rtx_LABEL_REF calls and get the
expanders to automatically add modes where needed, but that clearly
isn't stage 3 material.
Thanks,
Richard