From 5c0ef47d8378196527091de80c38745f7a1fdb42 Mon Sep 17 00:00:00 2001
From: Reid Spencer
@@ -290,9 +290,10 @@ unnamed identifiers allow a compiler to quickly come up with a temporary
variable without having to avoid symbol table conflicts.
Reserved words in LLVM are very similar to reserved words in other -languages. There are keywords for different opcodes ('add', 'cast', 'ret', etc...), for primitive type names ('add', + 'bitcast', + 'ret', etc...), for primitive type names ('void', 'uint', etc...), and others. These reserved words cannot conflict with variable names, because none of them start with a '%' character.
@@ -1223,12 +1224,24 @@ following is the syntax for constant expressions: constant. TYPE must be floating point. CST must be of integer type. If the value won't fit in the floating point type, the results are undefined. -@@ -3028,27 +3041,27 @@ nothing is done (no-op cast).-- cgit v1.2.3Syntax:
- <result> = bitconvert <ty> <value> to <ty2> ; yields ty2 + <result> = bitcast <ty> <value> to <ty2> ; yields ty2Overview:
-The 'bitconvert' instruction converts value to type +
The 'bitcast' instruction converts value to type ty2 without changing any bits.
Arguments:
-The 'bitconvert' instruction takes a value to cast, which must be +
The 'bitcast' instruction takes a value to cast, which must be a first class value, and a type to cast it to, which must also be a first class type. The bit sizes of value and the destination type, ty2, must be identical.
Semantics:
-The 'bitconvert' instruction converts value to type +
The 'bitcast' instruction converts value to type ty2. It is always a no-op cast because no bits change with this conversion. The conversion is done as if the value had been stored to memory and read back as type ty2. Pointer types may only be @@ -3058,8 +3071,9 @@ other types, use the inttoptr or
Example:
- %X = bitconvert ubyte 255 to sbyte ; yields sbyte:-1 - %Y = bitconvert uint* %x to uint ; yields uint:%x + %X = bitcast ubyte 255 to sbyte ; yields sbyte:-1 + %Y = bitcast uint* %x to sint* ; yields sint*:%x + %Z = bitcast <2xint> %V to long; ; yields long: %V