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

--- Comment #3 from Jeffrey A. Law <law at gcc dot gnu.org> ---
https://www.nxp.com/docs/en/reference-manual/MCOREABISM.pdf

Essentially states that extension depends on the underlying type.  If the
underlying type is signed, then we're supposed to extend signed.  If the
underlying type is unsigned, then we zero extend.  The caller is responsible
for extension of sub-word arguments.

Return values follow the same convention, except the callee handles extension.

Based on that it looks like the macro is incorrect.  Without reall thinking
abuot it, it would seem like replacing the = 1; with = TYPE_UNSIGNED (TYPE);
would be the right thing to do here.

Reply via email to