diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-10-14 17:57:32 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-10-14 17:57:32 +0000 |
commit | cd749a9c07f1de2fb8affde90537efa4bc3e7c54 (patch) | |
tree | b21f6de4e08b89bb7931806bab798fc2a5e3a686 /docs/GetElementPtr.html | |
parent | 72621d11de5b873f1695f391eb95f0b336c3d2d4 (diff) | |
download | FreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.zip FreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.tar.gz |
Update llvm to r84119.
Diffstat (limited to 'docs/GetElementPtr.html')
-rw-r--r-- | docs/GetElementPtr.html | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/docs/GetElementPtr.html b/docs/GetElementPtr.html index f4b096a..d5863e8 100644 --- a/docs/GetElementPtr.html +++ b/docs/GetElementPtr.html @@ -40,7 +40,7 @@ <div class="doc_text"> <p>This document seeks to dispel the mystery and confusion surrounding LLVM's GetElementPtr (GEP) instruction. Questions about the wiley GEP instruction are - probably the most frequently occuring questions once a developer gets down to + probably the most frequently occurring questions once a developer gets down to coding with LLVM. Here we lay out the sources of confusion and show that the GEP instruction is really quite simple. </p> @@ -303,13 +303,14 @@ idx3 = (char*) &MyVar + 8 </div> <p>In this example, <tt>idx1</tt> computes the address of the second integer - in the array that is in the structure in %MyVar, that is <tt>MyVar+4</tt>. The - type of <tt>idx1</tt> is <tt>i32*</tt>. However, <tt>idx2</tt> computes the - address of <i>the next</i> structure after <tt>%MyVar</tt>. The type of - <tt>idx2</tt> is <tt>{ [10 x i32] }*</tt> and its value is equivalent - to <tt>MyVar + 40</tt> because it indexes past the ten 4-byte integers - in <tt>MyVar</tt>. Obviously, in such a situation, the pointers don't - alias.</p> + in the array that is in the structure in <tt>%MyVar</tt>, that is + <tt>MyVar+4</tt>. The type of <tt>idx1</tt> is <tt>i32*</tt>. However, + <tt>idx2</tt> computes the address of <i>the next</i> structure after + <tt>%MyVar</tt>. The type of <tt>idx2</tt> is <tt>{ [10 x i32] }*</tt> and its + value is equivalent to <tt>MyVar + 40</tt> because it indexes past the ten + 4-byte integers in <tt>MyVar</tt>. Obviously, in such a situation, the + pointers don't alias.</p> + </div> <!-- *********************************************************************** --> @@ -364,7 +365,7 @@ idx3 = (char*) &MyVar + 8 <a href="http://validator.w3.org/check/referer"><img src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a> <a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br/> - Last modified: $Date: 2008-12-11 19:23:24 +0100 (Thu, 11 Dec 2008) $ + Last modified: $Date: 2009-10-12 16:46:08 +0200 (Mon, 12 Oct 2009) $ </address> </body> </html> |