search for: const_int

Displaying 20 results from an estimated 20 matches for "const_int".

2009 Mar 12
0
[LLVMdev] Consumer ARM platform suitable for LLVM development?
>> >> If any ARM/GCC experts know how to fix arm.md to not refer to >> Darwin-specific macros, that would be great, too. > > Probably the right general idea is to #define MACHO_DYNAMIC_NO_PIC_P > to be 0 for non-Darwin targets. Not sure where to put this so it > will work for both targets (the Darwin definition comes from config/ > darwin.h). I don't
2007 Nov 25
2
[LLVMdev] Fibonacci example in OCaml
Here's my translation of the Fibonacci example into OCaml: open Printf open Llvm let build_fib m = let fibf = define_function "fib" (function_type i32_type [| i32_type |]) m in let bb = builder_at_end (entry_block fibf) in let one = const_int i32_type 1 and two = const_int i32_type 2 in let argx = param fibf 0 in set_value_name "AnArg" argx; let retbb = append_block "return" fibf in let retb = builder_at_end retbb in let recursebb = append_block "recurse" fibf in let recurseb = builder_a...
2007 Nov 26
1
[LLVMdev] How to declare and use sprintf
On Monday 26 November 2007 00:40, Gordon Henriksen wrote: > The type you want is: > > let sp = pointer_type i8_type in > var_arg_function_type sp [| sp; sp |] Awesome stuff. Here is my most elegant Fibonacci example in OCaml so far: open Llvm let ( |> ) x f = f x let int n = const_int i32_type n let return b x = build_ret x b |> ignore let build_fib m = let ty = function_type i32_type [| i32_type |] in let fibf = define_function "fib" ty m in let bb = builder_at_end (entry_block fibf) in let n = param fibf 0 in let retbb = append_block "return&quo...
2009 Mar 12
2
[LLVMdev] Consumer ARM platform suitable for LLVM development?
On Mar 12, 2009, at 8:30 AMPDT, Misha Brukman wrote: > > ../../../../src/llvm-gcc4.2-2.5.source/gcc/config/arm/arm.md:4788: > error: ‘MACHO_DYNAMIC_NO_PIC_P’ undeclared here (not in a function) > > This tells me there are some Darwin-specific bits in arm.md which > shouldn't be there (MachO is Mac OS X-specific). I'm using the > attached script
2014 Oct 02
3
[LLVMdev] How do I update Ocaml debug info? (was Re: [llvm] r218914 - DI: Fold constant arguments into a single MDString)
-llvm-commits, +llvmdev > On Oct 2, 2014, at 2:57 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote: > > Author: dexonsmith > Date: Thu Oct 2 16:56:57 2014 > New Revision: 218914 > > URL: http://llvm.org/viewvc/llvm-project?rev=218914&view=rev > Log: > DI: Fold constant arguments into a single MDString > > This patch addresses the first
2009 Apr 04
1
R-alpha/R-beta builds on Alpha platform failing with compiler error
...NFIG_H -mieee-with-inexact -fpic -std=gnu99 -O3 -pipe -g -c deriv.c -o deriv.o deriv.c: In function 'simplify': deriv.c:267: error: unrecognizable insn: (insn 2103 64 65 9 ../../src/include/Rinlinedfuns.h:86 (set (reg:DI 2 $2) (const:DI (plus:DI (label_ref:DI 68) (const_int 24 [0x18])))) -1 (insn_list:REG_LABEL_OPERAND 68 (nil))) deriv.c:267: internal compiler error: in extract_insn, at recog.c:2001 Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.3/README.Bugs> for instructions. make[4]: *** [deriv.o] Er...
2007 Nov 26
0
[LLVMdev] How to declare and use sprintf
On Nov 25, 2007, at 18:53, Jon Harrop wrote: > So my Fib program is segfaulting and I'm not sure why. I think it > might be because my declaration and use of sprintf is wrong. > > I notice llvm-gcc produces declarations containing "..." like: > > declare int %printf(sbyte*, ...) > > What is the correct way to do this? The type you want is: let sp =
2007 Nov 25
2
[LLVMdev] How to declare and use sprintf
So my Fib program is segfaulting and I'm not sure why. I think it might be because my declaration and use of sprintf is wrong. I notice llvm-gcc produces declarations containing "..." like: declare int %printf(sbyte*, ...) but I'm not sure how to do this so I've used: let sprintf = declare_function "sprintf" (function_type (pointer_type
2005 Aug 12
3
IA32E make failed in latest version 6117
...-msoft- float -m64 -mno-red-zone -fpic -fno-reorder-blocks -fno-asynchronous-unwind- tables -DNDEBUG -c setup.c -o setup.o setup.c: In function `__start_xen'': setup.c:530: error: unrecognizable insn: (insn:HI 2752 2751 396 19 (set (reg/f:DI 707) (plus:DI (reg/f:DI 262) (const_int 137438953472000 [0x7d0000000000]))) -1 (insn_list 2751 (nil)) (expr_list:REG_DEAD (reg/f:DI 262) (expr_list:REG_EQUAL (const:DI (plus:DI (symbol_ref:DI ("_end") [flags 0x40] <var_decl 0x2a97cb1270 _end>) (const_int 137438953472000 [0x7d0000000000]))...
2005 Apr 28
0
[LLVMdev] SimplifyLibCalls Pass -- Help!
...(d,s,l,1) (if s and l are constants) strpbrk: * strpbrk(s,a) -> offset_in_for(s,a) (if s and a are both constant strings) * strpbrk(s,"") -> 0 * strpbrk(s,a) -> strchr(s,a[0]) (if a is constant string of length 1) strspn, strcspn: * strspn(s,a) -> const_int (if both args are constant) * strspn("",a) -> 0 * strspn(s,"") -> 0 * strcspn(s,a) -> const_int (if both args are constant) * strcspn("",a) -> 0 * strcspn(s,"") -> strlen(a) strstr: * strstr(x,x) -> x * strstr(s1,s...
2007 Nov 26
0
[LLVMdev] Fibonacci example in OCaml
...append_block name state.fn let find state v = try List.assoc v state.vars with Not_found -> eprintf "Unknown variable %s\n" v; raise Not_found let cont (v, state) dest_blk = build_br dest_blk (bb state) |> ignore; v, state let rec expr state = function | Int n -> const_int i32_type n, state | Var x -> find state x, state | BinOp(op, f, g) -> let f, state = expr state f in let g, state = expr state g in let build, name = match op with | `Add -> build_add, "add" | `Sub -> build_sub, "sub" | `Leq -> build_icmp...
2007 Dec 23
0
[LLVMdev] Ocaml JIT example
...er_type i8_type |]) m in (* define i32 @main() { entry: *) let main = define_function "main" (function_type i32_type [| |]) m in let at_entry = builder_at_end (entry_block main) in (* %tmp = getelementptr [14 x i8]* @greeting, i32 0, i32 0 *) let zero = const_int i32_type 0 in let str = build_gep greeting [| zero; zero |] "tmp" at_entry in (* call i32 @puts( i8* %tmp ) *) ignore (build_call puts [| str |] "" at_entry); (* ret void *) ignore (build_ret (const_null i32_type) at_entry); (main, m) let _ = let (f, m)...
2003 May 21
6
5.0-RELEASE --> cannot build any Mozilla Version
...ning: `rv0' might be used uninitialized in this function jsdtoa.c:1874: unable to find a register to spill in class `AREG' jsdtoa.c:1874: this is the insn: (insn:QI 1997 1996 1998 (set (reg:CCNO 17 flags) (compare:CCNO (and:SI (subreg:SI (reg/v:DI 21 rxmm0 [284]) 0) (const_int 1 [0x1])) (const_int 0 [0x0]))) 281 {testsi_1} (insn_list 1993 (nil)) (expr_list:REG_DEAD (reg/v:DI 21 rxmm0 [284]) (nil))) jsdtoa.c:1874: confused by earlier errors, bailing out gmake[3]: *** [jsdtoa.o] Error 1 gmake[3]: Leaving directory `/usr/ports/www/mozilla-devel-gtk2/...
2008 Mar 15
0
[LLVMdev] improving the ocaml binding's type safety
...re.) Try mocking up the type system for the concrete types GlobalVariable, Function, ConstantFP and ConstantInt; the abstract types GlobalValue, Value and Constant; and the functions set_value_name, linkage, declare_global, set_initializer, declare_function, entry_block, param, const_float, const_int, and const_array. That should be a reasonable survey. > We can't go letting haskell beat us now, can we? To truly compete with Bryan's Haskell bindings in terms of type safety, you'll need to go beyond preventing the cast macros in the C bindings from asserting and actually t...
2007 Nov 25
0
[LLVMdev] OCaml
Jon, On 2007-11-24, at 21:58, Jon Harrop wrote: > I just took another look at the LLVM project and it has come along > in leaps and bounds since I last looked. I've been working through > the (awesome!) tutorial and am now really hyped about the project. Excellent! > I am particularly interested in using LLVM to write compilers for > OCaml-like languages in OCaml-like
2002 Jan 22
1
compile problem with bessel_i.c on IRIX64 flexor 6.5 10100655 IP35 (uname -a) (PR#1275)
...o gcc -I. -I../../src/include -I../../src/include -DHAVE_CONFIG_H -g -O2 -c bessel_i.c -o bessel_i.o bessel_i.c: In function `I_bessel': bessel_i.c:468: internal error--unrecognizable insn: (insn 1418 1417 673 (set:DF (reg/v:DF 101) (if_then_else:DF (ne (reg:DI 416) (const_int 0 [0x0])) (reg/v:DF 101) (reg:DF 415))) -1 (insn_list 1417 (nil)) (expr_list:REG_DEAD (reg:DI 416) (nil))) *** Error code 1 (bu21) *** Error code 1 (bu21) *** Error code 1 (bu21) *** Error code 1 (bu21) *** Error code 1 (bu21) -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-...
2008 Mar 15
4
[LLVMdev] improving the ocaml binding's type safety
I was talking to Gordon on #llvm earlier, and he challenged me with coming up with a way to improve the ocaml binding's type safety. We can't go letting haskell beat us now, can we? I think I got an easy solution with phantom types. For those who don't know what the problem is, the ocaml bindings share one type between whole class branches (like values). This means we need to downcast
2007 Nov 25
9
[LLVMdev] OCaml
Hi! I just took another look at the LLVM project and it has come along in leaps and bounds since I last looked. I've been working through the (awesome!) tutorial and am now really hyped about the project. I am particularly interested in using LLVM to write compilers for OCaml-like languages in OCaml-like languages. This requires some core functionality that would be generically useful:
2007 Nov 25
5
[LLVMdev] OCaml
...i32_type [|pointer_type i8_type|]) m in (* define i32 @main() { entry: *) let main = define_function "main" (function_type i32_type [| |]) m in let at_entry = builder_at_end (entry_block main) in (* %tmp = getelementptr [14 x i8]* @greeting, i32 0, i32 0 *) let zero = const_int i32_type 0 in let str = build_gep greeting [| zero; zero |] "tmp" at_entry in (* call i32 @puts( i8* %tmp ) *) ignore (build_call puts [| str |] "" at_entry); (* ret void *) ignore (build_ret (const_null i32_type) at_entry); (* write the module to a file *)...
2003 Aug 09
28
[releng_4 tinderbox] failure on alpha/alpha
TB --- 2003-08-09 16:00:11 - starting RELENG_4 tinderbox run for alpha/alpha TB --- 2003-08-09 16:00:11 - checking out the source tree TB --- cd /home/des/tinderbox/RELENG_4/alpha/alpha TB --- /usr/bin/cvs -f -R -q -d/home/ncvs update -Pd -rRELENG_4 src TB --- 2003-08-09 16:00:11 - /usr/bin/cvs returned exit code 1 TB --- 2003-08-09 16:00:11 - ERROR: unable to check out the source tree TB ---