llvm.org GIT mirror llvm / 03295ca
Validation fixes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42225 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 13 years ago
1 changed file(s) with 3 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
51595159

51605160 For example, if the function is
51615161 i32 f(i8* nest %c, i32 %x, i32 %y) then the resulting function
5162 pointer has signature i32 (i32, i32)*. It can be created as follows:
5162 pointer has signature i32 (i32, i32)*. It can be created as follows:

51635163

                  
                
51645164 %tramp = alloca [10 x i8], align 4 ; size and alignment only correct for X86
51655165 %tramp1 = getelementptr [10 x i8]* %tramp, i32 0, i32 0
51665166 %p = call i8* @llvm.init.trampoline( i8* %tramp1, i8* bitcast (i32 (i8* nest , i32, i32)* @f to i8*), i8* %nval )
51675167 %fp = bitcast i8* %p to i32 (i32, i32)*
51685168
5169 The call %val = call i32 %fp( i32 %x, i32 %y ) is then equivalent to
5170 %val = call i32 %f( i8* %nval, i32 %x, i32 %y ).
5171

5169

The call %val = call i32 %fp( i32 %x, i32 %y ) is then equivalent

5170 to %val = call i32 %f( i8* %nval, i32 %x, i32 %y ).

51725171
51735172
51745173