mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 10:34:58 -06:00
target/xtensa: statically allocate xtensa_insnbufs in DisasContext
Rather than dynamically allocate, and risk failing to free when we longjmp out of the translator, allocate the maximum buffer size based on the maximum supported instruction length. Suggested-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
1a03362b14
commit
fde557ad25
3 changed files with 6 additions and 16 deletions
|
@ -213,6 +213,9 @@ enum {
|
|||
#define MEMCTL_IL0EN 0x1
|
||||
|
||||
#define MAX_INSN_LENGTH 64
|
||||
#define MAX_INSNBUF_LENGTH \
|
||||
((MAX_INSN_LENGTH + sizeof(xtensa_insnbuf_word) - 1) / \
|
||||
sizeof(xtensa_insnbuf_word))
|
||||
#define MAX_INSN_SLOTS 32
|
||||
#define MAX_OPCODE_ARGS 16
|
||||
#define MAX_NAREG 64
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue