Displaying 9 results from an estimated 9 matches for "zalunin".
2008 Jan 06
2
[LLVMdev] trouble with getelementptr
...it/programming/study/yapis/liza $
./test.ll.native
"hello, cruel world"
"hello, "
"heya!"
what is the trouble here?
I think about freeing memory after using getelementptr, is it right?(and if
it right can anybody answer 'how?')
Help me please...
Best regards, Zalunin Pavel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080106/05015829/attachment.html>
2008 Jan 06
4
[LLVMdev] Another memory fun
...str1, i32 0, i32 6 ; <i8*> [#uses=1]
store i8 32, i8* %tmp19, align 1
%tmp22 = getelementptr [8 x i8]* %str1, i32 0, i32 7 ; <i8*> [#uses=1]
store i8 0, i8* %tmp22, align 1
it's looks funny, can you say another less complex way to do this operation?
Thanks
Best regards,
Zalunin Pavel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080106/7f9b54f1/attachment.html>
2008 Jan 06
4
[LLVMdev] Another memory fun
...;
<i8*> [#uses=1]
%tmp6 = call i32 @puts( i8* %tmp5 ) ; <i32> [#uses=0]
ret i32 0
}
After running:
%
mother father
It's ok, but in prev. example (when I call strcat more than one times)
program works incorrectly
help me please...
Best regards,
Zalunin Pavel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080106/99ddb9f4/attachment.html>
2008 Jan 06
0
[LLVMdev] Another memory fun
...is invalid in C. Please make sure you understand what you're asking LLVM
to do before going any further down this path. A good approach is to
write out the correct code in C and then use llvm-gcc (or the demo page
at http://llvm.org/demo ) to see what it looks like in LLVM assembly.
Nick
Zalunin Pavel wrote:
> Hey again)
>
> Now I have next code:
>
> ; ModuleID = 'sample.lz'
> @.str1 = internal global [8 x i8] c" world!\00" ; <[8 x i8]*>
> [#uses=1]
> @.str2 = internal global [8 x i8] c"hello, \00" ; <[8 x i8]*...
2008 Jan 06
0
[LLVMdev] Another memory fun
but why this code don't work:
; ModuleID = 'sample.lz'
@.str1 = internal global [6 x i8] c"world\00" ; <[6 x i8]*>
[#uses=1]
@.str2 = internal global [7 x i8] c"hello \00" ; <[7 x i8]*>
[#uses=1]
@.str7 = internal global [7 x i8] c"father\00" ; <[7 x i8]*>
[#uses=1]
@.str8 = internal global [8 x i8]
2008 Jan 06
4
[LLVMdev] Another memory fun
Yes, I agree with you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080106/efb1c465/attachment.html>
2008 Jan 06
0
[LLVMdev] Another memory fun
Zalunin Pavel wrote:
> hm.... I think, that is valid in c
[snip]
> I tried decompile code:
> main(int argc, char **argv) {
> char str1[] = "mother ";
> strcat(str1, "father");
> return 0;
> }
>
This is valid C but you forget that str1 is not magically ex...
2008 Jan 06
0
[LLVMdev] Another memory fun
On Jan 6, 2008, at 12:29 PM, Zalunin Pavel wrote:
> Hey again)
>
> Now I have next code:
>
> ; ModuleID = 'sample.lz'
> @.str1 = internal global [8 x i8] c" world!\00" ; <[8 x
> i8]*> [#uses=1]
> @.str2 = internal global [8 x i8] c"hello, \00" ; <[8 x
&g...
2008 Jan 06
1
[LLVMdev] Another memory fun
...t;i8*> [#uses=0]
ret i32 1
I interested for last string :
%tmp5 = call i8* bitcast (i8* (i8*, i8*)* @strcat to i8* (i8* noalias ,
i8* noalias )*)( i8* %final1 noalias , i8* getelementptr ([4 x i8]* @.str1,
i32 0, i32 0) noalias ) ; <i8*> [#uses=0]
Best Regards,
Zalunin Pavel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080106/0f2c935d/attachment.html>