tcg: define TCG_HIGHWATER

Will come in handy very soon.

Backports commit a505785cd221994dd3713bde860861869a059940 from qemu
This commit is contained in:
Emilio G. Cota 2018-03-05 03:22:14 -05:00 committed by Lioncash
parent 8552d95c52
commit 239e9771df
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -113,6 +113,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
#if TCG_TARGET_INSN_UNIT_SIZE == 1
static QEMU_UNUSED_FUNC inline void tcg_out8(TCGContext *s, uint8_t v)
{
@ -424,7 +426,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);
// Unicorn: commented out
// tcg_register_jit(s->code_gen_buffer, total_size);