qemu/target/m68k
Laurent Vivier ecc207d2fc target/m68k: add a mechanism to automatically free TCGv
SRC_EA() and gen_extend() can return either a temporary
TCGv or a memory allocated one. Mark them when they are
allocated, and free them automatically at end of the
instruction translation.

We want to free locally allocated TCGv to avoid
overflow in sequence like:

  0xc00ae406:  movel %fp@(-132),%fp@(-268)
  0xc00ae40c:  movel %fp@(-128),%fp@(-264)
  0xc00ae412:  movel %fp@(-20),%fp@(-212)
  0xc00ae418:  movel %fp@(-16),%fp@(-208)
  0xc00ae41e:  movel %fp@(-60),%fp@(-220)
  0xc00ae424:  movel %fp@(-56),%fp@(-216)
  0xc00ae42a:  movel %fp@(-124),%fp@(-252)
  0xc00ae430:  movel %fp@(-120),%fp@(-248)
  0xc00ae436:  movel %fp@(-12),%fp@(-260)
  0xc00ae43c:  movel %fp@(-8),%fp@(-256)
  0xc00ae442:  movel %fp@(-52),%fp@(-276)
  0xc00ae448:  movel %fp@(-48),%fp@(-272)
  ...

That can fill a lot of TCGv entries in a sequence,
especially since 15fa08f845 ("tcg: Dynamically allocate TCGOps")
we have no limit to fill the TCGOps cache and we can fill
the entire TCG variables array and overflow it.

Suggested-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180319113544.704-3-laurent@vivier.eu>
2018-03-20 09:38:58 +01:00
..
cpu-qom.h Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
cpu.c target/*/cpu.h: remove softfloat.h 2018-02-21 10:20:24 +00:00
cpu.h target/m68k: add fmod/frem 2018-03-04 17:27:06 +01:00
fpu_helper.c target/m68k: implement fcosh 2018-03-13 16:35:05 +01:00
gdbstub.c target/m68k: add the Interrupt Stack Pointer 2018-01-04 17:24:35 +01:00
helper.c target/*/cpu.h: remove softfloat.h 2018-02-21 10:20:24 +00:00
helper.h target/m68k: implement fcosh 2018-03-13 16:35:05 +01:00
m68k-semi.c Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
Makefile.objs target/m68k: add fmod/frem 2018-03-04 17:27:06 +01:00
monitor.c target/m68k: add HMP command "info tlb" 2018-01-25 16:02:25 +01:00
op_helper.c target/m68k: add pflush/ptest 2018-01-25 16:02:25 +01:00
qregs.def target-m68k: use floatx80 internally 2017-06-21 22:10:29 +02:00
softfloat_fpsp_tables.h target/m68k: implement fatan 2018-03-13 16:34:16 +01:00
softfloat.c target/m68k: implement fcosh 2018-03-13 16:35:05 +01:00
softfloat.h target/m68k: implement fcosh 2018-03-13 16:35:05 +01:00
translate.c target/m68k: add a mechanism to automatically free TCGv 2018-03-20 09:38:58 +01:00