Revision 5b1c985b
b/tcg/ppc/tcg-target.c | ||
---|---|---|
611 | 611 |
tcg_out32 (s, CMP | BF (6) | RA (addr_reg2) | RB (r1)); |
612 | 612 |
tcg_out32 (s, CRAND | BT (7, CR_EQ) | BA (6, CR_EQ) | BB (7, CR_EQ)); |
613 | 613 |
#endif |
614 |
|
|
615 |
/* Use a conditional branch-and-link so that we load a pointer to |
|
616 |
somewhere within the current opcode, for passing on to the helper. |
|
617 |
This address cannot be used for a tail call, but it's shorter |
|
618 |
than forming an address from scratch. */ |
|
614 | 619 |
*label_ptr = s->code_ptr; |
615 | 620 |
retranst = ((uint16_t *) s->code_ptr)[1] & ~3; |
616 |
tcg_out32 (s, BC | BI (7, CR_EQ) | retranst | BO_COND_FALSE);
|
|
621 |
tcg_out32(s, BC | BI(7, CR_EQ) | retranst | BO_COND_FALSE | LK);
|
|
617 | 622 |
|
618 | 623 |
/* r0 now contains &env->tlb_table[mem_index][index].addr_x */ |
619 | 624 |
tcg_out32 (s, (LWZ |
... | ... | |
853 | 858 |
tcg_out_mov(s, TCG_TYPE_I32, ir++, l->addrlo_reg); |
854 | 859 |
} |
855 | 860 |
tcg_out_movi(s, TCG_TYPE_I32, ir++, l->mem_index); |
856 |
tcg_out_movi(s, TCG_TYPE_PTR, ir, (uintptr_t)l->raddr);
|
|
861 |
tcg_out32(s, MFSPR | RT(ir++) | LR);
|
|
857 | 862 |
tcg_out_b(s, LK, (uintptr_t)ld_trampolines[l->opc & 3]); |
858 | 863 |
|
859 | 864 |
datalo = l->datalo_reg; |
... | ... | |
928 | 933 |
ir++; |
929 | 934 |
|
930 | 935 |
tcg_out_movi(s, TCG_TYPE_I32, ir++, l->mem_index); |
931 |
tcg_out_movi(s, TCG_TYPE_PTR, ir, (uintptr_t)l->raddr);
|
|
932 |
tcg_out32(s, MTSPR | RS(ir) | LR);
|
|
933 |
tcg_out_b(s, 0, (uintptr_t)st_trampolines[l->opc]);
|
|
936 |
tcg_out32(s, MFSPR | RT(ir++) | LR);
|
|
937 |
tcg_out_b(s, LK, (uintptr_t)st_trampolines[l->opc]);
|
|
938 |
tcg_out_b(s, 0, (uintptr_t)l->raddr);
|
|
934 | 939 |
} |
935 | 940 |
|
936 | 941 |
void tcg_out_tb_finalize(TCGContext *s) |
Also available in: Unified diff