mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
We only support 32-bit or 64-bit sequential type indices for GEP. Document
it as so. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32197 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
12d38bfca0
commit
85f5b5b9dc
@ -2492,14 +2492,14 @@ subelement of an aggregate data structure.</p>
|
||||
|
||||
<h5>Arguments:</h5>
|
||||
|
||||
<p>This instruction takes a list of integer constants that indicate what
|
||||
<p>This instruction takes a list of integer operands that indicate what
|
||||
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, integers of any size are allowed, and will be sign
|
||||
extended to 64-bit values.</p>
|
||||
into an array or pointer, only integers of 32 or 64 bits 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>
|
||||
@ -2540,7 +2540,7 @@ 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 can use any
|
||||
and <a href="#t_array">array</a> types can use a 32-bit or 64-bit
|
||||
<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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user