
6 Dec
2012
6 Dec
'12
4:34 p.m.
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 in the NatM monad e.g.
coerceWord2FP :: Width -> Width -> CmmExpr -> NatM Register
?
Yes, you can emit data. Look at the LDATA instruction in the X86 backend, for example, and see how we generate things like table jumps. So are you going to add the two missing MachOps, MO_UF_Conv & MO_FU_Conv? Cheers, Simon