summaryrefslogtreecommitdiffstats
path: root/mpi-patches/mpi-to-double
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2025-06-18 06:34:13 -0700
committerKaz Kylheku <kaz@kylheku.com>2025-06-18 06:34:13 -0700
commit4891846939a05749fe24017aa33553828913a45e (patch)
treed48b45024e665fe7a151235602e984f36e6649b0 /mpi-patches/mpi-to-double
parent54a76c674e18e079b4a4f4338f41e44bfd5ed3e3 (diff)
downloadtxr-4891846939a05749fe24017aa33553828913a45e.tar.gz
txr-4891846939a05749fe24017aa33553828913a45e.tar.bz2
txr-4891846939a05749fe24017aa33553828913a45e.zip
vm: don't adjust ip in normal block return.
This issue does not come up in code generated by the current compiler. A normal block return is always the end instruction which immediately precedes the exit point. Therefore the "vm->ip = exitpt" does nothing in that case; it only changes vm->ip if the block is being abandoned by a block return. In the TCO work I'm doing, it's possible for a tail call to occur in a block. Prior to the tail call's jump, an end instruction will be executed to terminate the block. That end instruction is inserted by the compilation of the tail call. In this situation, the "vm->ip = exitpt" is wrong; it diverts control to the end of the block, skipping the jmp instruction. * vm.c (vm_block): If we are terminating normally---i.e, the vm_execute of the block returns---then adjust the exitpt variable to the current ip. Then the subsequent vm->ip = exitpt will do nothing; execution continues after the end instruction that terminated the block.
Diffstat (limited to 'mpi-patches/mpi-to-double')
0 files changed, 0 insertions, 0 deletions