Validation fixes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42225 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2007-09-22 09:23:55 +00:00
parent eb6aaceb94
commit 03295ca4e6

View File

@ -5160,16 +5160,15 @@ declare void @llvm.memory.barrier( i1 <ll>, i1 <ls>, i1 <sl>,
<p> <p>
For example, if the function is For example, if the function is
<tt>i32 f(i8* nest %c, i32 %x, i32 %y)</tt> then the resulting function <tt>i32 f(i8* nest %c, i32 %x, i32 %y)</tt> then the resulting function
pointer has signature <tt>i32 (i32, i32)*</tt>. It can be created as follows: pointer has signature <tt>i32 (i32, i32)*</tt>. It can be created as follows:</p>
<pre> <pre>
%tramp = alloca [10 x i8], align 4 ; size and alignment only correct for X86 %tramp = alloca [10 x i8], align 4 ; size and alignment only correct for X86
%tramp1 = getelementptr [10 x i8]* %tramp, i32 0, i32 0 %tramp1 = getelementptr [10 x i8]* %tramp, i32 0, i32 0
%p = call i8* @llvm.init.trampoline( i8* %tramp1, i8* bitcast (i32 (i8* nest , i32, i32)* @f to i8*), i8* %nval ) %p = call i8* @llvm.init.trampoline( i8* %tramp1, i8* bitcast (i32 (i8* nest , i32, i32)* @f to i8*), i8* %nval )
%fp = bitcast i8* %p to i32 (i32, i32)* %fp = bitcast i8* %p to i32 (i32, i32)*
</pre> </pre>
The call <tt>%val = call i32 %fp( i32 %x, i32 %y )</tt> is then equivalent to <p>The call <tt>%val = call i32 %fp( i32 %x, i32 %y )</tt> is then equivalent
<tt>%val = call i32 %f( i8* %nval, i32 %x, i32 %y )</tt>. to <tt>%val = call i32 %f( i8* %nval, i32 %x, i32 %y )</tt>.</p>
</p>
</div> </div>
<!-- _______________________________________________________________________ --> <!-- _______________________________________________________________________ -->