search for: _oc_str

Displaying 10 results from an estimated 10 matches for "_oc_str".

2011 Oct 10
2
[LLVMdev] There are compiling errors when converting bytecode to c by LLC
...printf("hello world\n"); printf("hello world1\n"); return 0; } The two commands: llvm-gcc -emit-llvm -c -o hello.bc hello.c llc -march=c hello.bc Version of LLVM: 2.9 The source of error in generated c file: /* Global Variable Declarations */ static _OC_str { unsigned char array[12]; }; static _OC_str1 { unsigned char array[13]; }; /* Global Variable Definitions and Initialization */ static _OC_str { unsigned char array[12]; } = { "hello world" }; static _OC_str1 { unsigned char array[13]; } = { "hello world1" }; It seems...
2012 Mar 05
3
[LLVMdev] Problem using march=c
...mpile the hello.cbe.c: gcc, and even clang, show me some warning and error messages. Cheking in hello.cbe.c, I could see that the problem was related with the structs declarations and initialization. There, they appears to be something like /* Global Variable Declarations */ static _OC_str { unsigned char array[13]; }; /* Global Variable Definitions and Initialization */ static _OC_str { unsigned char array[13]; } = { "Hello World\n" }; when they should be like /* Global Variable Declarations */ static struct type_OC_str { unsigned char ar...
2011 Oct 29
0
[LLVMdev] There are compiling errors when converting bytecode to c by LLC
...); > >         return 0; > > } > > The two commands: > > llvm-gcc -emit-llvm -c -o hello.bc hello.c > > llc -march=c hello.bc > > Version of LLVM: 2.9 > > The source of error in generated c file: > > /* Global Variable Declarations */ > > static _OC_str { unsigned char array[12]; }; > > static _OC_str1 { unsigned char array[13]; }; > > > > /* Global Variable Definitions and Initialization */ > > static _OC_str { unsigned char array[12]; } = { "hello world" }; > > static _OC_str1 { unsigned char array[13]; }...
2012 Mar 05
0
[LLVMdev] Problem using march=c
...some warning and > error messages. > Cheking in hello.cbe.c, I could see that the problem was related with > the structs declarations and initialization. There, they appears to be > something like > >                /* Global Variable Declarations */ >                static _OC_str { unsigned char array[13]; }; > >                /* Global Variable Definitions and Initialization */ >                static _OC_str { unsigned char array[13]; } = { "Hello World\n" > }; > > when they should be like > >                /* Global Variable Decl...
2012 Mar 05
1
[LLVMdev] Problem using march=c
...; error messages. >> Cheking in hello.cbe.c, I could see that the problem was related with >> the structs declarations and initialization. There, they appears to be >> something like >> >>                /* Global Variable Declarations */ >>                static _OC_str { unsigned char array[13]; }; >> >>                /* Global Variable Definitions and Initialization */ >>                static _OC_str { unsigned char array[13]; } = { "Hello >> World\n" >> }; >> >> when they should be like >> >>   ...
2011 Jan 21
4
[LLVMdev] all LLVM Instructions that may write to memory -- other than StoreInst?
...lvm_cbe_tmp__8; unsigned int llvm_cbe_tmp__9; llvm_cbe_tmp__6 = *(&a); llvm_cbe_tmp__7 = *(&b); llvm_cbe_tmp__8 = ((unsigned int )(((unsigned int )llvm_cbe_tmp__7) + ((unsigned int )llvm_cbe_tmp__6))); *(&d) = llvm_cbe_tmp__8; llvm_cbe_tmp__9 = /*tail*/ printf(((&_OC_str.array[((signed int )0u)])), llvm_cbe_tmp__8); ... It seems the compiler-generated temps are _actually_ left on stack, and writes to them are actually writes to stack memory (via load, add, ...). I am confused here. Could somebody help to clarify it? Thank you Chuck -------------- next part...
2011 Jan 21
0
[LLVMdev] all LLVM Instructions that may write to memory -- other than StoreInst?
...nt llvm_cbe_tmp__9; > > llvm_cbe_tmp__6 = *(&a); > llvm_cbe_tmp__7 = *(&b); > llvm_cbe_tmp__8 = ((unsigned int )(((unsigned int )llvm_cbe_tmp__7) + ((unsigned int )llvm_cbe_tmp__6))); > *(&d) = llvm_cbe_tmp__8; > llvm_cbe_tmp__9 = /*tail*/ printf(((&_OC_str.array[((signed int )0u)])), llvm_cbe_tmp__8); > ... > > It seems the compiler-generated temps are _actually_ left on stack, and writes to them are actually writes to stack memory (via load, add, ...). > > > > I am confused here. > Could somebody help to clarify it? > >...
2011 Jan 21
1
[LLVMdev] all LLVM Instructions that may write to memory -- other than StoreInst?
...> >> llvm_cbe_tmp__6 = *(&a); >> llvm_cbe_tmp__7 = *(&b); >> llvm_cbe_tmp__8 = ((unsigned int )(((unsigned int )llvm_cbe_tmp__7) + ((unsigned int )llvm_cbe_tmp__6))); >> *(&d) = llvm_cbe_tmp__8; >> llvm_cbe_tmp__9 = /*tail*/ printf(((&_OC_str.array[((signed int )0u)])), llvm_cbe_tmp__8); >> ... >> >> It seems the compiler-generated temps are _actually_ left on stack, and writes to them are actually writes to stack memory (via load, add, ...). >> >> >> >> I am confused here. >> Could somebo...
2011 Feb 22
0
[LLVMdev] obtain the address and size of LLVM generated temporaries
On 02/22/2011 14:01, Chuck Zhao wrote: > I wonder what is the right approach to obtain the address and size of > LLVM (compiler) generated temporaries? > > E.g. > > %0 = %x + %y > store i32 i0, i32 %z, align 4 > > How can I get the address of %0 (which could be either a stack or heap > variable)? > This is not possible since such value can also be in register.
2011 Feb 22
3
[LLVMdev] obtain the address and size of LLVM generated temporaries
I wonder what is the right approach to obtain the address and size of LLVM (compiler) generated temporaries? E.g. %0 = %x + %y store i32 i0, i32 %z, align 4 How can I get the address of %0 (which could be either a stack or heap variable)? Thank you Chuck