Add randomized register allocation for fuzz testing.

This must be explicitly enabled with: -DLUAJIT_RANDOM_RA
Thanks to Peter Cawley. #1062
This commit is contained in:
Mike Pall
2023-08-30 01:10:52 +02:00
parent 2f6c451ce8
commit 41fb94defa
4 changed files with 58 additions and 7 deletions

View File

@@ -116,8 +116,8 @@ enum {
#if LJ_64
/* Prefer the low 8 regs of each type to reduce REX prefixes. */
#undef rset_picktop
#define rset_picktop(rs) (lj_fls(lj_bswap(rs)) ^ 0x18)
#undef rset_picktop_
#define rset_picktop_(rs) (lj_fls(lj_bswap(rs)) ^ 0x18)
#endif
/* -- Spill slots --------------------------------------------------------- */