[PATCH] D16907: [X86] Don't zero/sign-extend i1 or i8 return values to 32 bits (PR22532)
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 4 16:30:27 PST 2016
+Cameron who touched this last.
On Thu, Feb 4, 2016 at 4:29 PM, Hans Wennborg via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> hans created this revision.
> hans added reviewers: majnemer, rjmccall, rsmith, jyknight.
> hans added a subscriber: llvm-commits.
> This brings us in line with GCC and MSVC behaviour, and saves on code size.
> We were already not extending i1 return values to on x86_64 after .
> The ABI docs are unclear about this situation. The new i386 psABI  clearly states (Table 2.4, page 14) that i1, i8, and i16 return values do not need to be extended beyond 8 bits (GCC and MSVC do extend 16-bit values though, so I'm holding off on that). The old i386 psABI  does not mention this. I can't find mention of this in the x86_64 ABI , but there is a proposal on  that matches the behaviour in this patch.
> Please let me know what you think.
> . http://llvm.org/viewvc/llvm-project?view=revision&revision=127766
> . https://01.org/sites/default/files/file_attach/intel386-psabi-1.0.pdf
> . https://refspecs.linuxfoundation.org/elf/abi386-4.pdf
> . https://refspecs.linuxfoundation.org/elf/x86_64-abi-0.98.pdf
> . https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46942#c4
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
More information about the llvm-commits