From lukexipd at gmail.com Thu Aug 7 23:58:24 2014 From: lukexipd at gmail.com (Luke Iannini) Date: Thu, 7 Aug 2014 16:58:24 -0700 Subject: [Haskell-iPhone] ARM64 Task Force In-Reply-To: References: Message-ID: Hi all, An update on this -- I've made a bit of progress thanks to Karel and Colin's start at ARM64 support https://ghc.haskell.org/trac/ghc/ticket/7942 With a few tweaks*, that let me build a GHC that builds ARM64 binaries and load them onto my iPad Air, which is great! But of course they don't work yet since LLVM doesn't have the ARM64/GHC calling convention in. Happily I was able to use LLVM HEAD to do this, which means we don't need to be bound to Xcode's release schedules. I'm now studying David's patches to LLVM to learn how to add the ARM64/GHC calling convention to LLVM. *including Ben Gamari's patches to get LLVM HEAD working https://github.com/bgamari/ghc/tree/llvm-3.5-new Best Luke On Mon, Jul 7, 2014 at 11:06 PM, Luke Iannini wrote: > Howdy all, > > Would anyone like to team up on getting ARM64 support into GHC? > > Cheers > Luke > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukexipd at gmail.com Sat Aug 9 03:27:23 2014 From: lukexipd at gmail.com (Luke Iannini) Date: Fri, 8 Aug 2014 20:27:23 -0700 Subject: [Haskell-iPhone] ARM64 Task Force In-Reply-To: <53E466F1.90201@centrum.cz> References: <53E466F1.90201@centrum.cz> Message-ID: Hi Karel, Thanks! A question: https://git.haskell.org/ghc.git/commitdiff/454b34cb3b67dec21f023339c4d53d734af7605d adds references to s16, s17, s18, s19, d10 and d11 but I don't see those where I though to expect them in https://github.com/ghc/ghc/blob/master/includes/CodeGen.Platform.hs Am I down a wrong path? Luke On Thu, Aug 7, 2014 at 10:58 PM, Karel Gardas wrote: > On 08/ 8/14 01:58 AM, Luke Iannini wrote: > >> I'm now studying David's patches to LLVM to learn how to add the >> ARM64/GHC calling convention to LLVM. >> > > Here is also original ARM/GHC calling convention submission. It's always > good to have more examples as reference... > > http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-October/044173.html > > Good luck with the ARM64/GHC porting work! > > Karel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukexipd at gmail.com Mon Aug 11 01:44:34 2014 From: lukexipd at gmail.com (Luke Iannini) Date: Sun, 10 Aug 2014 18:44:34 -0700 Subject: [Haskell-iPhone] ARM64 Task Force In-Reply-To: <53E60463.2080608@centrum.cz> References: <53E466F1.90201@centrum.cz> <53E60463.2080608@centrum.cz> Message-ID: I think I've solved this particular mystery -- the registers were never defined there because that integer-representation of them is only used by the NCG. In LLVM land they were only ever stringified by the REG() macro. Except now globalRegMaybe is being used in CmmSink.hs (as Simon and Ben were discussing), and globalRegMaybe needs an integer value for each register to put into its Maybe RealReg return value. Since CmmSink.hs only checks 'isJust', it doesn't actually matter what the integer value is. So I've just gone ahead and defined them sequentially for now which seems to get me past this. Thanks! Luke On Sat, Aug 9, 2014 at 4:22 AM, Karel Gardas wrote: > On 08/ 9/14 05:27 AM, Luke Iannini wrote: > >> Hi Karel, >> Thanks! >> >> A question: >> https://git.haskell.org/ghc.git/commitdiff/454b34cb3b67dec21f023339c4d53d >> 734af7605d >> adds references to s16, s17, s18, s19, d10 and d11 but I don't see those >> > > Yes, that adds FPU support for ARM. > > > where I though to expect them in >> https://github.com/ghc/ghc/blob/master/includes/CodeGen.Platform.hs >> > > Hmm, whole ARM reg set is missing in this file. IIRC Simon Marlow were > discussing this with Ben Gamari recently. I've not investigated if this is > needed or not since I don't know if this is used only in NCG or in > registerised build in general. If the former, ARM will not be there as > there is no ARM NCG yet, if the later, then ARM should be there as > ARM/LLVM/registerised build is a reality. > > Cheers, > Karel > -------------- next part -------------- An HTML attachment was scrubbed... URL: