JIT: replace a multiplcation with a shift

In the implementation of `with-continuation-mark`.
This commit is contained in:
Matthew Flatt 2015-08-23 18:37:45 -06:00
parent 620ccbfa03
commit cbb4ffee4d
2 changed files with 3 additions and 4 deletions

View File

@ -2591,8 +2591,7 @@ static int common6(mz_jit_state *jitter, void *_data)
CHECK_LIMIT();
jit_andi_l(JIT_V1, JIT_R2, SCHEME_MARK_SEGMENT_MASK);
jit_movi_l(JIT_R1, sizeof(Scheme_Cont_Mark));
jit_mulr_l(JIT_V1, JIT_V1, JIT_R1);
jit_lshi_l(JIT_V1, JIT_V1, LOG_CONT_MARK_WORD_COUNT+JIT_LOG_WORD_SIZE);
jit_addr_l(JIT_R0, JIT_R0, JIT_V1);
CHECK_LIMIT();
/* R0 now points to the right record */
@ -2649,8 +2648,7 @@ static int common6(mz_jit_state *jitter, void *_data)
/* R0 now points to the right array */
jit_andi_l(JIT_V1, JIT_R2, SCHEME_MARK_SEGMENT_MASK);
jit_movi_l(JIT_R1, sizeof(Scheme_Cont_Mark));
jit_mulr_l(JIT_V1, JIT_V1, JIT_R1);
jit_lshi_l(JIT_V1, JIT_V1, LOG_CONT_MARK_WORD_COUNT+JIT_LOG_WORD_SIZE);
jit_addr_l(JIT_R0, JIT_R0, JIT_V1);
CHECK_LIMIT();
/* R0 now points to the right record */

View File

@ -1687,6 +1687,7 @@ typedef struct Scheme_Cont_Mark {
Scheme_Object *cache; /* chain and/or shortcut */
MZ_MARK_POS_TYPE pos; /* Odd numbers - so they look like non-pointers */
} Scheme_Cont_Mark;
#define LOG_CONT_MARK_WORD_COUNT 2
void scheme_new_mark_segment(Scheme_Thread *p);