Re: Status of LJ_GC64 on x64?

  • From: Mike Pall <mike-1507@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 29 Jul 2015 16:45:19 +0200

Peter Cawley wrote:

On Wed, Jul 29, 2015 at 1:32 PM, Mike Pall <mike-1507@xxxxxxxxxx> wrote:
The IR needs to be revamped (storing 64 bit consts inline)

Possibly the least invasive revamp would be for 64-bit consts to be
represented with three IR nodes: one node for the low 32-bits, one
node for the high 32-bits, and one node to combine the other two (or,
if these constants are only ever going to be 48 bits in practice, then
you could get away with two IR nodes: one with 32-bits, one with the
remaining 16-bits and a reference to the low node).

I had a simpler idea: only use the even IRIns for the K* and store
the actual 64 bit value in place of the next lower odd IRIns. The
constant part of the IR is only traversed in a few places. Skipping
the odd ones is easy enough. Unreferenced IRIns are opaque and may
contain any bit pattern. Still, not a trivial change.

--Mike

Other related posts: