summaryrefslogtreecommitdiffstats
path: root/llvm/docs/LangRef.html
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@apple.com>2011-03-16 22:20:18 +0000
committerCameron Zwarich <zwarich@apple.com>2011-03-16 22:20:18 +0000
commitac106273d4ff77d259a63e82771aec29ca11ec1a (patch)
treef5739f4fc3624d1cf9b5c27adc9ce0e8c5c5861f /llvm/docs/LangRef.html
parent40a9200357099c7ef0480abb5a135239a83bfb35 (diff)
downloadbcm5719-llvm-ac106273d4ff77d259a63e82771aec29ca11ec1a.tar.gz
bcm5719-llvm-ac106273d4ff77d259a63e82771aec29ca11ec1a.zip
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. llvm-svn: 127766
Diffstat (limited to 'llvm/docs/LangRef.html')
-rw-r--r--llvm/docs/LangRef.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/docs/LangRef.html b/llvm/docs/LangRef.html
index 893876620a4..ab9f1caae69 100644
--- a/llvm/docs/LangRef.html
+++ b/llvm/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
OpenPOWER on IntegriCloud