32-bit opcodes are ok, even on 64-bit architectures, if you add a constant offset - see how it's done in OCaml.
Do you have a pointer to the relevant part of OCaml's source? The whole thing is probably worth a read, but don't think I can set aside enough time for that soon, and it could take me a while to find the right part.
See the "Next" macro definition.