Re: Emitting constants to the .data section from the NatM monad

2012-12-07 Thread Simon Marlow
On 06/12/12 22:11, Johan Tibell wrote: On Thu, Dec 6, 2012 at 1:34 PM, Simon Marlow wrote: So are you going to add the two missing MachOps, MO_UF_Conv & MO_FU_Conv? I'm trying to add those. I'm now thinking that I will use C calls (which is still much faster than going via Integer) instead of

Re: Emitting constants to the .data section from the NatM monad

2012-12-06 Thread Johan Tibell
On Thu, Dec 6, 2012 at 1:34 PM, Simon Marlow wrote: > So are you going to add the two missing MachOps, MO_UF_Conv & MO_FU_Conv? I'm trying to add those. I'm now thinking that I will use C calls (which is still much faster than going via Integer) instead of emitting some assembly, as the former is

Re: Emitting constants to the .data section from the NatM monad

2012-12-06 Thread Simon Marlow
On 06/12/12 00:29, Johan Tibell wrote: Hi! I'm trying to implement word2Double# and I've looked at how e.g. LLVM does it. LLVM outputs quite clever branchless code that uses two predefined constants in the .data section. Is it possible to add contents to the current .data section from a function

Emitting constants to the .data section from the NatM monad

2012-12-05 Thread Johan Tibell
Hi! I'm trying to implement word2Double# and I've looked at how e.g. LLVM does it. LLVM outputs quite clever branchless code that uses two predefined constants in the .data section. Is it possible to add contents to the current .data section from a function in the NatM monad e.g. coerceWord2F