[Bug target/88877] rs6000 emits signed extension for unsigned int type(__floatunsidf).

amodra at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Jan 22 04:12:00 GMT 2019


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

--- Comment #17 from Alan Modra <amodra at gmail dot com> ---
> Is anything broken though?

Yes, as demonstrated by the testcase.

> 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.

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.


More information about the Gcc-bugs mailing list