On 09/18/2015 06:08 AM, Peter Maydell wrote:
> You're still not allowing for your worst-case datatable size when we
> calculate tcg_ctx.code_gen_buffer_max_size.

Hum.  What factor do you suggest?

The maximum table expansion is of course going to depend on the target, since
the "extra words" could conceivably encode badly.  See mips, sh4 "flags".

For a "normal" target with no, or "small" extra words (cc_op is never large,
nor is the arm condexec), the max expansion per-opcode would appear to be a
long sequence of nops, where the opcodes emitted would consist solely of
insn_start.  The table would consume (2+extra) bytes per nop.  Since state is
not changing, all but the PC column would be zeros.

Would you be happy if I simply arbitrarily bumped the other magic number here,
TCG_MAX_OP_SIZE?  Adjust it from 192 to 200, or something?

I didn't try to add a guard page yet, since our logic in allocating the code
gen buffer are a bit confused.  I'm a bit surprised that we don't prefer mmap
all of the time.


r~

Reply via email to