We will use this pointer from functions where we don't have an interface to pass tcg_ctx as a parameter.
Signed-off-by: Evgeny Voevodin <e.voevo...@samsung.com> --- tcg/tcg.h | 1 + translate-all.c | 1 + 2 files changed, 2 insertions(+) diff --git a/tcg/tcg.h b/tcg/tcg.h index 43b4317..d326b36 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -431,6 +431,7 @@ struct TCGContext { }; extern TCGContext tcg_ctx; +extern TCGContext *tcg_cur_ctx; extern uint16_t *gen_opc_ptr; extern TCGArg *gen_opparam_ptr; extern uint16_t gen_opc_buf[]; diff --git a/translate-all.c b/translate-all.c index 5bd2d37..ccdcddf 100644 --- a/translate-all.c +++ b/translate-all.c @@ -32,6 +32,7 @@ /* code generation context */ TCGContext tcg_ctx; +TCGContext *tcg_cur_ctx = &tcg_ctx; uint16_t gen_opc_buf[OPC_BUF_SIZE]; TCGArg gen_opparam_buf[OPPARAM_BUF_SIZE]; -- 1.7.9.5