From 56779034530944eb6171d843f652f3fba710ed30 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Mon, 10 Jan 2011 18:30:05 +0100 Subject: tcg arm/mips/ia64: add a comment about retranslation and caches Add a comment about cache coherency and retranslation, so that people developping new targets based on existing ones are warned of the issue. Acked-by: Edgar E. Iglesias Signed-off-by: Aurelien Jarno --- tcg/ia64/tcg-target.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tcg/ia64') diff --git a/tcg/ia64/tcg-target.c b/tcg/ia64/tcg-target.c index e2e44f7..8dac7f7 100644 --- a/tcg/ia64/tcg-target.c +++ b/tcg/ia64/tcg-target.c @@ -871,6 +871,9 @@ static void tcg_out_br(TCGContext *s, int label_index) { TCGLabel *l = &s->labels[label_index]; + /* We pay attention here to not modify the branch target by reading + the existing value and using it again. This ensure that caches and + memory are kept coherent during retranslation. */ tcg_out_bundle(s, mmB, tcg_opc_m48(TCG_REG_P0, OPC_NOP_M48, 0), tcg_opc_m48(TCG_REG_P0, OPC_NOP_M48, 0), -- cgit v1.1