diff options
author | Cameron Zwarich <zwarich@apple.com> | 2011-03-16 22:20:18 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2011-03-16 22:20:18 +0000 |
commit | ebe8173941238cfbabadb1c63bca7fb7dcf2adbe (patch) | |
tree | e26ad4384575e2b10d06cd5476abbe4d91724ada /docs | |
parent | 7be4b7ed75d0e094d2cb1998a3d4a8d346b5d839 (diff) |
The x86-64 ABI says that a bool is only guaranteed to be sign-extended to a byte
rather than an int. Thankfully, this only causes LLVM to miss optimizations, not
generate incorrect code.
This just fixes the zext at the return. We still insert an i32 ZextAssert when
reading a function's arguments, but it is followed by a truncate and another i8
ZextAssert so it is not optimized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127766 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r-- | docs/LangRef.html | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html index 893876620a..ab9f1caae6 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -1017,8 +1017,9 @@ declare signext i8 @returns_signed_char() <dl> <dt><tt><b>zeroext</b></tt></dt> <dd>This indicates to the code generator that the parameter or return value - should be zero-extended to a 32-bit value by the caller (for a parameter) - or the callee (for a return value).</dd> + should be zero-extended to the extent required by the target's ABI (which + is usually 32-bits, but is 8-bits for a i1 on x86-64) by the caller (for a + parameter) or the callee (for a return value).</dd> <dt><tt><b>signext</b></tt></dt> <dd>This indicates to the code generator that the parameter or return value |