search for: sbyte

Displaying 20 results from an estimated 250 matches for "sbyte".

Did you mean: byte
2004 Jul 07
0
[LLVMdev] Duplicate assignment in LLVM?
...an update and let us know how it goes. Thanks, Reid. On Wed, 2004-07-07 at 03:07, Vladimir Prus wrote: > Hello, > when I'm compiling > > test/Programs/SingleSource/UnitTests/2003-05-26-Shorts.c > > I get LLVM assembler which looks like: > > int %main(int %argc, sbyte** %argv) { > entry: > call void %__main( ) > %tmp.11 = call ulong %getL( ) ; <ulong> [#uses=16] > %tmp.3 = cast ulong %tmp.11 to long ; <long> [#uses= > %tmp.5 = cast ulong %tmp.11 to uint ; <uint> [#...
2004 Jul 07
2
[LLVMdev] Duplicate assignment in LLVM?
Hello, when I'm compiling test/Programs/SingleSource/UnitTests/2003-05-26-Shorts.c I get LLVM assembler which looks like: int %main(int %argc, sbyte** %argv) { entry: call void %__main( ) %tmp.11 = call ulong %getL( ) ; <ulong> [#uses=16] %tmp.3 = cast ulong %tmp.11 to long ; <long> [#uses= %tmp.5 = cast ulong %tmp.11 to uint ; <uint> [#uses= %tmp.7 = ca...
2005 Feb 22
0
[LLVMdev] Area for improvement
...shouldn't be leaving so much garbage around for instruction selection > to clean up. At first, I thought all that was needed was to another > round of basic block optimizations after the loop was unrolled, until > I saw the actual LLVM bytecodes: > > void %init_board([7 x sbyte]* %b) { > entry: > br label %loopexit.1 > > loopexit.1: ; preds = %loopexit.1, %entry > %indvar14 = phi uint [ 0, %entry ], [ %indvar.next15, > %loopexit.1 ] ; <uint> [#uses=7] > %tmp.10 = getelementptr [7 x sbyte]* %b, ui...
2004 Sep 28
1
[LLVMdev] How could I hide the visible string?
...char b[20]= "Internal string test"; printf("Global %s \n",a); printf("Internal %s\n",b); } IR code : target endian = little target pointersize = 32 %struct..TorRec = type { int, void ()* } %struct.TorRec = type { int, void ()* } %a = internal global [20 x sbyte] c"global string test\0A\00" ; <[20 x sbyte]*> [#uses=1] %.ctor_1 = internal global [20 x sbyte] c"Internal string test" ; <[20 x sbyte]*> [#uses=1] %.str_1 = internal constant [12 x sbyte] c"Global %s \0A\00" ; <[12 x sbyte]*> [#uses=1] %.str_2 =...
2003 Dec 22
2
[LLVMdev] hello.bc & binary code
...mp/ccppFGsT.o /tmp/ccb5CDSP.s gccld -o hello -L/home/yue/cfrontend/install/lib/gcc/i686-pc-linux-gnu/3.4-llvm -L/home/yue/cfrontend/install/lib/gcc/i686-pc-linux-gnu/3.4-llvm/../../.. /tmp/ccppFGsT.o -lstdc++ -lm -lc -lcrtend WARNING: Found global types that are not compatible: [16 x sbyte]* %_ZN9__gnu_cxx10messages_cE "struct.std::messages<char>"* %_ZN9__gnu_cxx10messages_cE WARNING: Found global types that are not compatible: [16 x sbyte]* %_ZN9__gnu_cxx10messages_wE "struct.std::messages<char>"* %_ZN9__gnu_cxx10messages...
2005 Feb 22
5
[LLVMdev] Area for improvement
...he optimization passes shouldn't be leaving so much garbage around for instruction selection to clean up. At first, I thought all that was needed was to another round of basic block optimizations after the loop was unrolled, until I saw the actual LLVM bytecodes: void %init_board([7 x sbyte]* %b) { entry: br label %loopexit.1 loopexit.1: ; preds = %loopexit.1, %entry %indvar14 = phi uint [ 0, %entry ], [ %indvar.next15, %loopexit.1 ] ; <uint> [#uses=7] %tmp.10 = getelementptr [7 x sbyte]* %b, uint %indvar14, int 0 ; &...
2006 Oct 16
1
[LLVMdev] initializer does not match global variable type.
...n the first few lines of output. thanks, Todd > cfrontend-g++ -o bar.bc bar.m > llvm2cpp -o bar.cpp bar.bc > g++ -c bar.o bar.cpp > ld -o bar bar.o -l objc -l LLVMCore -l LLVMSupport -l LLVMSystem > ./bar Global variable initializer type does not match global variable type! [13 x sbyte]* %.str_2 Global variable initializer type does not match global variable type! [9 x sbyte]* %.str_3 Global variable initializer type does not match global variable type! [2 x sbyte]* %.str_4 Broken module found, verification continues. ; ModuleID = 'bar.ll' target endian = little target po...
2006 Oct 17
1
[LLVMdev] initializer does not match global variable type.
>Right. This looks like it's just a simple bug in llvm2cpp. >CppWriter.cpp:698 contains: > > if (CA->isString() && CA->getType()->getElementType() == >Type::SByteTy) { > Out << "Constant* " << constName << " = ConstantArray::get(\""; > printEscapedString(CA->getAsString()); > // Determine if we want null termination or not. > if (CA->getType()->getNumElements() <= &gt...
2003 Dec 22
1
[LLVMdev] How to explain?
hi, I want to know what is exact meaning in the following code. target endian-- %struct..TorRec-- %struct.TorRec-- implementation-- ;<sbyte>[#uses=1/0]-- how to explain them in details? Does anyone give me a guide? thanks yueqiang -------------------------------------------------------------- target endian = little target pointersize = 32 %struct..TorRec = type { int, void ()* } %struct.TorRec = type { int, void...
2005 Mar 21
0
[LLVMdev] Recursive Types using the llvm support library
On Wed, Mar 09, 2005 at 04:05:32PM +0300, Vladimir Merzliakov wrote: > >>Is assert(!NewSTy->isAbstract()) must pass after this line? > > > >In this case, yup. > > > I create test program and assert failed in it: > > { \2 *, sbyte * } How do I decode the \2 in this? I am creating types through this interface and I get quite a mess seen below. And this is relatively simple. Any ideas? -John alloca { { int, uint, sbyte*, \4* (), \4* (\4*), { { int, uint, sbyte*, \4* (), { { int, uint, sbyte*, \4 (), \4 (\4), \8* (\4),...
2007 Mar 06
0
[LLVMdev] alloca & store generation
After looking at this problem longer, I believe that there is something wrong with the disassembler. When I run my transformation and then disassemble the output, I get bytecode that looks like: ----- int %main(int %argc, sbyte** %argv) { entry: alloca int ; <int*>:0 [#uses=3] alloca sbyte** ; <sbyte***>:0 [#uses=3] store int %argc, int* %0 store sbyte** %argv, sbyte*** %0 call void %F( int* %0, sbyte*** %0, int 1, int 0 ) ----- However, if I...
2007 Mar 06
6
[LLVMdev] alloca & store generation
...ll to a function F() at the beginning of main() with the addresses of argc and argv as parameters to F(). However, the bytecode file I'm transforming has not allocated space on the stack for argc and argv. So, I developed my transformation to change main() from: ----- int main(int %argc, sbyte** %argv){ entry: ... // some use of %argc and %argv ... } ----- to the following code: ----- int main(int %argc, sbyte** %argv){ entry: %argc_addr = alloca int %argv_addr = alloca sbyte** store int %argc, int* %argc_addr store sbyte** %argv, sbyte*** %argv_addr call void %...
2005 Mar 09
4
[LLVMdev] Recursive Types using the llvm support library
...using the llvm support library > On Tue, 8 Mar 2005, Vladimir Merzliakov wrote: > >>>> An example where something really simple like the line below was output >>>> would be perfect. >>>> >>>> %struct.linked_list = type { %struct.linked_list*, %sbyte* } >>> >>> Use something like this: >>> >>> PATypeHolder StructTy = OpaqueType::get(); >>> std::vector<const Type*> Elts; >>> Elts.push_back(PointerType::get(StructTy)); >>> Elts.push_back(PointerType::get(Type::SByteTy));...
2006 Nov 12
4
[LLVMdev] need help understanding getelementptr assembler instruction
I am trying to understand the hello word assember example. This is my version: %str1 = internal constant [13 x sbyte] c"Hello World\0a\00" declare int %printf(sbyte*, ...) implementation ; Functions: int %main() { %str2 = getelementptr [13 x sbyte]* %str1, long 0, long 0 call int(sbyte*, ...) *%printf(sbyte* %str2) ret int 0 } Why is getelementptr being given two "long 0" indices?...
2004 Apr 14
1
[LLVMdev] Linking strncpy
...s produced are either aborting or giving incorrect results; however, if I disassemble the LLVM bytecode and recompile with GCC, everything works fine. I encountered the following error when running lli with '-force-interpreter' option: "Tried to execute an unknown external function: sbyte * (sbyte *, sbyte *, uint) * strncpy" Strncpy is used as part of my compiler's run-time library, and it was compiled with the C-frontend for LLVM. Looking at the assembly, the function is declared at the top of the file; declare sbyte* %strncpy(sbyte*,sbyte*,uint) ;; __builtin_strncpy...
2004 May 11
2
[LLVMdev] Problems accessing structs
Hello! I get some odd behaviour using my structs: "myKernelMap" = type {int (sbyte*)*, int ()*} "Kernel" = type {"myKernelMap"*} The second member ( int()* ) is a pointer to the %getchar() function. I want to call getchar using this function: int "callmyKernelgetchar_kernel"("Kernel"* "myKernel") { "PTRMAP"...
2004 Nov 30
0
[LLVMdev] Trouble using llvm tools
...hed. So, I think the real question is: "what llvm-dis where you running?". Reid. -------------- next part -------------- target endian = little target pointersize = 32 %struct..TorRec = type { int, void ()* } %struct.TorRec = type { int, void ()* } %.str_1 = internal constant [24 x sbyte] c"This is main function \0A\00" ; <[24 x sbyte]*> [#uses=1] %.str_2 = internal constant [21 x sbyte] c"Calling sub function\00" ; <[21 x sbyte]*> [#uses=1] %.str_3 = internal constant [21 x sbyte] c"This is sub function\00" ; <[21 x sbyte]*> [#use...
2004 Oct 10
1
[LLVMdev] Re: Hide visible string in variable
...OR and then write it back. But for this case, I don't know how to do that. Maybe I am not familar with STL. I really need your help. Sorry again. for C level, char a[]="global string test"; for(i=0;i<strlen(a);i++){ a[i]= a[i]^RANDMON; } For llvm, %a = internal global [20 x sbyte] c"global string test\0A\00" Would you mind telling me how to do it. Qiuyu > > > Is there a way to reorder the basic blocks? > > Yes, for an example pass that does this, take a look at > lib/Transforms/Scalar/BasicBlockPlacement.cpp > > -Chris > > &gt...
2005 Apr 19
1
[LLVMdev] Unwind example
...a threshold 2. Then unwind and print a message Instead what happens is: 1. Recursively grow the stack until it reaches a threshold 2. Then it dies with: Abort trap Can you point me to an example using uwind that "works" ? Thanks. Here's the code: %str_sp = internal constant [9 x sbyte] c"SP = %i\0A\00" ; <[9 x sbyte]*> [#uses=1] %str_msg = internal constant [15 x sbyte] c"Bottom'd Out!\0A\00" implementation ; Functions: declare int %printf(sbyte*, ...) internal void %stack_check() { entry: %xyzzy = alloca int ; <int*> [#uses=1]...
2004 Aug 17
1
[LLVMdev] What's the meaning of [0 x sbyte*]?
Hi When I compiled sendmail v8.11.6 with LLVM 1.2, I found some variables with strange type, such as: %sys_errlist = external constant [0 x sbyte*] ; <[0 x sbyte*]*> [#uses=3] %tmp.24 = getelementptr [0 x sbyte*]* %sys_errlist, long 0, long %tmp.23 ; <sbyte**> [#uses=1] The process of getting these is: 1. entry sendmail-8.11.6 directory 2. make CC="/cfrontend/x86/llvm-gcc/bin/gcc" 3. entry obj...