aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-03 16:53:48 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-03 16:53:48 +0000
commit42ddd84addeabef697be2d2f7e33c8f8acb446d9 (patch)
treecaa56510ceef3a6230263c3ad93e7b36508034a4 /docs
parente558c682510156b4f87c278354166d8acc7bc49c (diff)
downloadexternal_llvm-42ddd84addeabef697be2d2f7e33c8f8acb446d9.zip
external_llvm-42ddd84addeabef697be2d2f7e33c8f8acb446d9.tar.gz
external_llvm-42ddd84addeabef697be2d2f7e33c8f8acb446d9.tar.bz2
Update for signless GEP semantics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32159 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/LangRef.html13
1 files changed, 7 insertions, 6 deletions
diff --git a/docs/LangRef.html b/docs/LangRef.html
index 5b7b125..7f03531 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -2491,9 +2491,9 @@ elements of the aggregate object to index to. The actual types of the arguments
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 @@ compiled to LLVM:</p>
<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