aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmilio G. Cota <cota@braap.org>2017-07-07 19:00:30 -0400
committerRichard Henderson <rth@twiddle.net>2017-10-10 09:45:00 -0700
commita505785cd221994dd3713bde860861869a059940 (patch)
tree24b1cb76caa3eb4b6be43c9a365f769692b7e76f
parent3637cf58f9441ad277fd70299a29d0e39b32c96c (diff)
tcg: define TCG_HIGHWATER
Will come in handy very soon. Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-rw-r--r--tcg/tcg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index ee60798438..4492e1eb3f 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -116,6 +116,8 @@ static int tcg_target_const_match(tcg_target_long val, TCGType type,
static bool tcg_out_ldst_finalize(TCGContext *s);
#endif
+#define TCG_HIGHWATER 1024
+
static TCGRegSet tcg_target_available_regs[2];
static TCGRegSet tcg_target_call_clobber_regs;
@@ -430,7 +432,7 @@ void tcg_prologue_init(TCGContext *s)
/* Compute a high-water mark, at which we voluntarily flush the buffer
and start over. The size here is arbitrary, significantly larger
than we expect the code generation for any one opcode to require. */
- s->code_gen_highwater = s->code_gen_buffer + (total_size - 1024);
+ s->code_gen_highwater = s->code_gen_buffer + (total_size - TCG_HIGHWATER);
tcg_register_jit(s->code_gen_buffer, total_size);