hex.tables.jump_to_table_entryΒΆ
Dispatch into a 256-padded table at entry (src<<4 | dst), then XOR hex.tables.res into dst on return. The hot path of every table-driven hex operation.
SignatureΒΆ
def jump_to_table_entry dst, src, jumper_to_table @ return < .ret, .res { ... }
Defined in hex/tables_init.fj β lines 75β82 (view on GitHub).
ComplexityΒΆ
Time:
4@+4Space:
4@+52
See the complexity glossary for what @, w, dw, dbit, n mean.
Requires initΒΆ
The following must be initialised before this macro is invoked:
hex.tables.init_shared (or hex.init)
SourceΒΆ
Click to view the macro body
def jump_to_table_entry dst, src, jumper_to_table @ return < .ret, .res {
..xor jumper_to_table , dst
..xor jumper_to_table+4, src
wflip .ret+w, return, jumper_to_table
return:
wflip .ret+w ,return
..xor_zero dst, .res
}
Depends onΒΆ
Used byΒΆ
Example usesΒΆ
β Previous: hex.tables.clean_table_entry__table/1