unicorn/qemu/target/m68k
Laurent Vivier c133a7b306
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.

Backports commit ecc207d2fc1d45fabb16c38742a6675a7ba56cbc from qemu
2018-03-20 14:32:04 -04:00
..
cpu-qom.h
cpu.c m68k: cleanup cpu type name composition 2018-03-20 08:40:05 -04:00
cpu.h cpu: get rid of unused cpu_init() defines 2018-03-20 14:21:45 -04:00
fpu_helper.c target/m68k: implement fcosh 2018-03-17 18:58:57 -04:00
helper.c cpu: Generify CPU init functions 2018-03-20 08:21:51 -04:00
helper.h target/m68k: implement fcosh 2018-03-17 18:58:57 -04:00
Makefile.objs target/m68k: add fmod/frem 2018-03-09 01:28:58 -05:00
op_helper.c target/m68k/op_helper: Adjust formatting to be in sync with qemu 2018-03-12 12:26:53 -04:00
qregs.def target-m68k: use floatx80 internally 2018-03-03 19:35:17 -05:00
softfloat_fpsp_tables.h target/m68k: implement fatan 2018-03-17 18:48:32 -04:00
softfloat.c target/m68k: implement fcosh 2018-03-17 18:58:57 -04:00
softfloat.h target/m68k: implement fcosh 2018-03-17 18:58:57 -04:00
translate.c target/m68k: add a mechanism to automatically free TCGv 2018-03-20 14:32:04 -04:00
unicorn.c Use DEFINE_MACHINE() to register all machines 2018-03-11 15:12:46 -04:00
unicorn.h