[llvm-commits] CVS: llvm/docs/LangRef.html
Reid Spencer
reid at x10sys.com
Sun Dec 3 08:54:03 PST 2006
Changes in directory llvm/docs:
LangRef.html updated: 1.174 -> 1.175
---
Log message:
Update for signless GEP semantics.
---
Diffs of the changes: (+8 -7)
LangRef.html | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
Index: llvm/docs/LangRef.html
diff -u llvm/docs/LangRef.html:1.174 llvm/docs/LangRef.html:1.175
--- llvm/docs/LangRef.html:1.174 Mon Nov 27 15:53:28 2006
+++ llvm/docs/LangRef.html Sun Dec 3 10:53:48 2006
@@ -2491,9 +2491,9 @@
provided depend on the type of the first pointer argument. The
'<tt>getelementptr</tt>' instruction is used to index down through the type
levels of a structure or to a specific index in an array. When indexing into a
-structure, only <tt>uint</tt>
-integer constants are allowed. When indexing into an array or pointer,
-<tt>int</tt> and <tt>long</tt> and <tt>ulong</tt> indexes are allowed.</p>
+structure, only <tt>uint</tt> integer constants are allowed. When indexing
+into an array or pointer, integers of any size are allowed, and will be sign
+extended to 64-bit values.</p>
<p>For example, let's consider a C code fragment and how it gets
compiled to LLVM:</p>
@@ -2534,9 +2534,10 @@
<p>The index types specified for the '<tt>getelementptr</tt>' instruction depend
on the pointer type that is being indexed into. <a href="#t_pointer">Pointer</a>
-and <a href="#t_array">array</a> types require <tt>int</tt>,
-<tt>ulong</tt>, or <tt>long</tt> values, and <a href="#t_struct">structure</a>
-types require <tt>uint</tt> <b>constants</b>.</p>
+and <a href="#t_array">array</a> types can use any
+<a href="#t_integer">integer</a> type but the value will always be sign extended
+to 64-bits. <a href="#t_struct">Structure</a> types, require <tt>uint</tt>
+<b>constants</b>.</p>
<p>In the example above, the first index is indexing into the '<tt>%ST*</tt>'
type, which is a pointer, yielding a '<tt>%ST</tt>' = '<tt>{ int, double, %RT
@@ -4426,7 +4427,7 @@
<a href="mailto:sabre at nondot.org">Chris Lattner</a><br>
<a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>
- Last modified: $Date: 2006/11/27 21:53:28 $
+ Last modified: $Date: 2006/12/03 16:53:48 $
</address>
</body>
</html>
More information about the llvm-commits
mailing list