[LLVMbugs] [Bug 3779] sign extension bahaviour is different from gcc

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Mar 25 10:55:51 PDT 2009


http://llvm.org/bugs/show_bug.cgi?id=3779


Evan Cheng <evan.cheng at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




--- Comment #21 from Evan Cheng <evan.cheng at apple.com>  2009-03-25 12:55:50 ---
Turns out this breaks some objective-c code. The objective-c run time expects
the signext and zeroext attributes to be honored.

The llvm documentation also states these attributes should be honored:
"This indicates to the code generator that the parameter or return value should
be sign-extended to a 32-bit value by the caller (for a parameter) or the
callee (for a return value)."

I'm going to shoot first and ask question later. :-) I'll reopen this and
revert the patch. It seems to me we need a different approach.

1. If the ABI does not require extension then the frontend should not emit the
signext / zeroext attribute.
2. If all the callers are known, then the callers should promote the return
values instead.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list