JIT: fix inlined char->integer' and
integer->char'
Put the result in the destination register, instead of always R0. Merge to v5.3.4
This commit is contained in:
parent
e29878e7ae
commit
0c4e155b88
|
@ -1847,6 +1847,7 @@ int scheme_generate_inlined_unary(mz_jit_state *jitter, Scheme_App2_Rec *app, in
|
|||
__END_TINY_JUMPS__(1);
|
||||
(void)jit_calli(sjc.bad_char_to_integer_code);
|
||||
__START_TINY_JUMPS__(1);
|
||||
jit_movr_p(dest, JIT_R0);
|
||||
mz_patch_branch(ref);
|
||||
(void)mz_bnei_t(reffail, JIT_R0, scheme_char_type, JIT_R1);
|
||||
__END_TINY_JUMPS__(1);
|
||||
|
@ -1854,7 +1855,7 @@ int scheme_generate_inlined_unary(mz_jit_state *jitter, Scheme_App2_Rec *app, in
|
|||
(void)jit_ldxi_i(JIT_R0, JIT_R0, &SCHEME_CHAR_VAL(0x0));
|
||||
CHECK_LIMIT();
|
||||
|
||||
jit_fixnum_l(JIT_R0, JIT_R0);
|
||||
jit_fixnum_l(dest, JIT_R0);
|
||||
|
||||
return 1;
|
||||
} else if (IS_NAMED_PRIM(rator, "integer->char")) {
|
||||
|
@ -1874,6 +1875,7 @@ int scheme_generate_inlined_unary(mz_jit_state *jitter, Scheme_App2_Rec *app, in
|
|||
__END_TINY_JUMPS__(1);
|
||||
(void)jit_calli(sjc.slow_integer_to_char_code);
|
||||
__START_TINY_JUMPS__(1);
|
||||
jit_movr_p(dest, JIT_R0);
|
||||
refdone = jit_jmpi(jit_forward());
|
||||
mz_patch_branch(ref);
|
||||
(void)jit_blti_p(refslow, JIT_R0, scheme_make_integer(0));
|
||||
|
@ -1882,7 +1884,7 @@ int scheme_generate_inlined_unary(mz_jit_state *jitter, Scheme_App2_Rec *app, in
|
|||
jit_rshi_l(JIT_R0, JIT_R0, 1);
|
||||
jit_lshi_l(JIT_R2, JIT_R0, JIT_LOG_WORD_SIZE);
|
||||
(void)jit_movi_p(JIT_R0, scheme_char_constants);
|
||||
jit_ldxr_p(JIT_R0, JIT_R0, JIT_R2);
|
||||
jit_ldxr_p(dest, JIT_R0, JIT_R2);
|
||||
CHECK_LIMIT();
|
||||
|
||||
mz_patch_ucbranch(refdone);
|
||||
|
|
Loading…
Reference in New Issue
Block a user