From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q11GUI5c005279 for ; Wed, 1 Feb 2012 17:30:26 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkQLAIRnKU+uedqy/2dsb2JhbABDgw2oZ4MJgQWBcgEBBAE6PwULC0ZXBogPuEyCV4hbAQUCAgkFDAYTAQgFAwMJgxwFGAILAgVdBgQJAQQEgnRjBIhBkjeFM4dr X-IronPort-AV: E=Sophos;i="4.71,602,1320620400"; d="scan'208";a="129716397" Received: from pse.psellos.com ([174.121.218.178]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 01 Feb 2012 17:30:25 +0100 Received: from [192.168.0.11] (71-212-116-221.tukw.qwest.net [71.212.116.221]) (authenticated bits=0) by pse.psellos.com (8.13.8/8.13.8) with ESMTP id q11GUE6V011639 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 1 Feb 2012 10:30:19 -0600 References: <15991D0B-B2FB-47A6-8196-B149257F49B7@psellos.com> <20110824091731.GA2598@cyclops> <35FD0778-70B2-4E5A-8570-669F45165FAA@gmail.com> In-Reply-To: Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Message-Id: Content-Transfer-Encoding: 7bit Cc: Jeffrey Scofield , Caml List From: Jeffrey Scofield Date: Wed, 1 Feb 2012 08:30:14 -0800 To: Christophe Papazian X-Mailer: Apple Mail (2.1084) X-Validation-by: jeffsco@psellos.com Subject: Re: [Caml-list] OpenGL ES for iPhone Simulator; working example app Christophe: > I found a way to adapt your patch to cross compile ocaml 3.10 > with the last Xcode and IOS SDK. But, I still get alignment > warnings, AND SEGFAULT if I use some ocaml instructions like > (+.) (float addition). I'm glad you made some progress. I have some earlier reports of alignment warnings with Xcode 4.1, but things were otherwise reported as working. So the really worrying thing is the segfault. You kind of need (+.) to do real work! There's some chance this is the same alignment problem, though. I'll pitch in to help get things working as soon as possible; I'd love to see many people working with OCaml/iOS. > However, I can get lucky and compile a stable binary (on > iPhone) if I avoid some instructions.. I tried to adapt your > patch to the last version of ocaml, but there was so many > changes in the assembler that I stop. If anyone has an idea to > help me. The ARM code generator was completely rewritten for OCaml 3.12. In fact our patches are based on the 3.12 version in some sense. In particular, we adopted the 3.12 register assignment conventions (which are consistent with iOS conventions). I would expect almost all the patches to the code generator to be unnecessary with 3.12. There is an issue with native floating point. As I understand the situation, Xavier's 3.12 ARM generator uses function calls to implement floating operations rather than in-line native instructions. Our patches include some work (by other folks, not us) to emit native HW floating point instructions. I haven't done any testing of the difference, but our apps do some CPU intensive calculations for short times (a card game, deciding what play to make next). So we'd kind of like to use native floating point. > Question 2 : do you plan to release some general bindings to > the iOS SDK ? We don't have plans to release our Cocoa interface code right now. The example apps on our website (http://psellos.com/ocaml/) demonstrate all the basic requirements. The major differences in our in-house code are that (a) we hook in to GC to free ObjC objects when they're collected on the OCaml side; (b) we use ObjC dynamic method dispatch, so we can write large parts of the interface in OCaml. Note that we don't have a system that generates the Cocoa/OCaml interface automatically. We add hand-coded classes and methods to our interface as required. It's a humble approach, but we don't have the resources to do anything more elaborate right now. Thanks for your interest; I'll be able to do more after the release crunch. Regards, Jeffrey