Skip to content

Commit

Permalink
Remove leftover bootstrap workaround - difference in readint's flags …
Browse files Browse the repository at this point in the history
…field

When implementing endian switching for (read|write)u?int I discovered
that I needed 2 bits for encoding endianness information. To get through
NQP's bootstrap I temorarily took an unset endianness flat to signify
the old 1 bit interpretation of the flags field. Apparently I forgot to
remove the workaround in readuint's JIT implementation.

Many thanks to timotimo++ for the discovery!
  • Loading branch information
niner committed Mar 9, 2019
1 parent 834db59 commit 81284a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jit/graph.c
Expand Up @@ -2472,7 +2472,7 @@ static MVMint32 consume_ins(MVMThreadContext *tc, MVMJitGraph *jg,
MVMSpeshFacts *facts = MVM_spesh_get_facts(tc, jg->sg, ins->operands[3]);
if (facts->flags & MVM_SPESH_FACT_KNOWN_VALUE) {
if ((facts->value.i & 3) != MVM_SWITCHENDIAN) {
unsigned char const size = 1 << (facts->value.i >> ((facts->value.i & 1) ? 2 : 1));
unsigned char const size = 1 << (facts->value.i >> 2);

MVMSpeshFacts *type_facts = MVM_spesh_get_facts(tc, jg->sg, ins->operands[0]);
if (type_facts && type_facts->flags & MVM_SPESH_FACT_KNOWN_TYPE && type_facts->type &&
Expand Down

0 comments on commit 81284a0

Please sign in to comment.