On Sat, Sep 22, 2001 at 04:40:46PM +0100, Simon Cozens wrote:
> And now I know why! The branch-fixup section of the assembler's busted:
No, that wasn't it. This is it:
opcode_t *ne_nc_ic(opcode_t cur_opcode[], struct Parrot_Interp *interpreter) {
IV return_offset = 5;
if (NUM_REG(cur_opcode[1]) != *(NV *)&cur_opcode[2]) {
return cur_opcode + cur_opcode[4];
Now, this (and similar code) assumes that
sizeof(NV) == 2*sizeof(opcode_t)
and hence that the NV occupies cur_opcode[2] and cur_opcode[3] and the next
thing is in cur_opcode[4]. If sizeof(NV) == sizeof(opcode_t), then the next
thing is in cur_opcode[3].
Do I have to say
return cur_opcode + *(opcode_t*)(&cur_opcode[2] + sizeof(NV));
or is there a saner way to do it?
--
`First Up Against The Wall When The Revolution Comes! Woohoo!
So long as they promise to use latex gloves, I'm happy. :)'
- Thorfinn, in the Monastery.