This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: __int256
On Jul 13, 2012, at 1:57 AM, Richard Guenther wrote:
>> I have put the patch through the C test suite, and it doesn't show any failures.
>>
>> Do you have any examples of bugs that are _introduced_ by my patch? I'd be happy to fix any that arise.
>
> No. Just you expose the users to those bugs by exposing __int256 ;) Docs
> should have a pretty big fat warning on it.
Ah, ok, thanks. Now, the problem, OImode I believe is _already_ exposed to the user:
int __attribute__((mode(SI))) a;
int __attribute__((mode(OI))) b;
This just changes the exposure slightly to be higher visibility and a prettier interface in my opinion. Also, notice, that exposure I believe is limited to ports that do this:
my_scalar_mode_supported_p (enum machine_mode mode)
{
switch (mode)
{
case OImode:
return true;
default:
return default_scalar_mode_supported_p (mode);
}
}
_exclusively_. As, in my code, it does this:
+ if (targetm.scalar_mode_supported_p (OImode))
+ {
+ int256_integer_type_node = make_signed_type (256);
+ int256_unsigned_type_node = make_unsigned_type (256);
+ }
and this:
+ case RID_INT256:
+ if (int256_integer_type_node == NULL_TREE)
+ {
+ error_at (loc, "%<__int256%> is not supported for this target");
+ return specs;
+ }
and this:
+ if (explicit_int256)
+ {
+ if (int256_integer_type_node == NULL_TREE)
+ {
+ error ("%<__int256%> is not supported by this target");
+ explicit_int256 = false;
+ }
so, I'm having a really hard time with the notion that this actually creates any new problems for anyone, even those that support OImode already. I just checked all in tree gcc targets, and none claim OImode support. Do you have any example of a testcase that shows a regression? Any that shows a regression on any in tree port? I can easily test, as I have compilers that don't have any OI support, compilers that have OI support, and compilers that have __int256 support.
As for documenting bugs, generally we don't do that. Our intention is to actually spend time to fix all bugs, so, documenting them I don't feel is necessary.