commit | 7dfc3433f3de446446d802bd95ddd280b79a49c1 | [log] [tgz] |
---|---|---|
author | Hans Wennborg <hans@hanshq.net> | Mon Feb 08 19:34:30 2016 +0000 |
committer | Hans Wennborg <hans@hanshq.net> | Mon Feb 08 19:34:30 2016 +0000 |
tree | cb202c3d1496dac4d39f91cffc5e5fefe00392ec | |
parent | bff2e82786b36876fdbac2628c1a9da1282a6aa9 [diff] |
[X86] Don't zero/sign-extend i1, i8, or i16 return values to 32 bits (PR22532) This matches GCC and MSVC's behaviour, and saves on code size. We were already not extending i1 return values on x86_64 after r127766. This takes that patch further by applying it to x86 target as well, and also for i8 and i16. The ABI docs have been unclear about the required behaviour here. The new i386 psABI [1] clearly states (Table 2.4, page 14) that i1, i8, and i16 return vales do not need to be extended beyond 8 bits. The x86_64 ABI doc is being updated to say the same [2]. Differential Revision: http://reviews.llvm.org/D16907 [1]. https://01.org/sites/default/files/file_attach/intel386-psabi-1.0.pdf [2]. https://groups.google.com/d/msg/x86-64-abi/E8O33onbnGQ/_RFWw_ixDQAJ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260133 91177308-0d34-0410-b5e6-96231b3b80d8