https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88877

--- Comment #18 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Alan Modra from comment #17)
> > Is anything broken though?
> 
> Yes, as demonstrated by the testcase.

I couldn't get the testcase to link, I don't think I have an __floatunsidf
anywhere, so I cannot check.

> > If the libcall routines know they are called this way, all is fine.
> 
> They don't.  libgcc functions are mostly C code that can make use of the
> fact that on ppc64 an unsigned int arg will have the top 32 bits zeroed.

And since they are called without prototype, they should be defined without
prototype as well.  Why don't we do that?  Or is that no longer supported; in
that case, the definition should declare types as they will be passed manually.
Ugly and fragile.

> We avoid some potential problems with things like popcount by not having a
> popcountsi.  Instead we use popcountdi, and that results in gcc
> zero-extending a 32-bit value to 64 bits before we reach
> emit_library_call_value_1.

Wow, ugly.  And extra fragile :-(

Reply via email to