[dynarmic] Remove last FPT LUT table, removing around 30kb worth of unused functions #3718

Merged
Lizzie merged 2 commits from lizzie/dynarmic-ltu-fpt into master 2026-03-25 10:48:54 +01:00
Member

Lets do the quick math
There was 1 LUT for every fsize() instancing

Now... the number of functions on each lut was (fsize + 1), multiplied by 5 (number of rounding modes)

8 = 9 * 5 = 45
16 = 17 * 5 = 85
32 = 33 * 5 = 165
64 = 65 * 5 = 325

this is just pure insanity - look at what fucking nm reported:

0000000003dc39b8 0000000000000008 V guard variable for void Dynarmic::Backend::X64::EmitFPVectorToFixed<16ul, false>(Dynarmic::Backend::X64::BlockOfCode&, Dynarmic::Backend::X64::EmitContext&, Dynarmic::IR::Inst*)::lut
0000000003dc3a18 0000000000000008 V guard variable for void Dynarmic::Backend::X64::EmitFPVectorToFixed<16ul, true>(Dynarmic::Backend::X64::BlockOfCode&, Dynarmic::Backend::X64::EmitContext&, Dynarmic::IR::Inst*)::lut
0000000003dc39d8 0000000000000008 V guard variable for void Dynarmic::Backend::X64::EmitFPVectorToFixed<32ul, false>(Dynarmic::Backend::X64::BlockOfCode&, Dynarmic::Backend::X64::EmitContext&, Dynarmic::IR::Inst*)::lut
0000000003dc3a38 0000000000000008 V guard variable for void Dynarmic::Backend::X64::EmitFPVectorToFixed<32ul, true>(Dynarmic::Backend::X64::BlockOfCode&, Dynarmic::Backend::X64::EmitContext&, Dynarmic::IR::Inst*)::lut
0000000003dc39f8 0000000000000008 V guard variable for void Dynarmic::Backend::X64::EmitFPVectorToFixed<64ul, false>(Dynarmic::Backend::X64::BlockOfCode&, Dynarmic::Backend::X64::EmitContext&, Dynarmic::IR::Inst*)::lut
0000000003dc3a58 0000000000000008 V guard variable for void Dynarmic::Backend::X64::EmitFPVectorToFixed<64ul, true>(Dynarmic::Backend::X64::BlockOfCode&, Dynarmic::Backend::X64::EmitContext&, Dynarmic::IR::Inst*)::lut

"ah its not bad" - OH MATE ITS JUST THE GUARD VARIABLES - i attached a file with just the functions generated for each case...

now with this PR only 6 * 6 functions are made (still not ideal, but way better), 36 is way better than 1156 FUCKING FUNCTIONS

Signed-off-by: lizzie lizzie@eden-emu.dev

Lets do the quick math There was 1 LUT for every fsize() instancing Now... the number of functions on each lut was (fsize + 1), multiplied by 5 (number of rounding modes) 8 = 9 * 5 = 45 16 = 17 * 5 = 85 32 = 33 * 5 = 165 64 = 65 * 5 = 325 this is just pure insanity - look at what fucking nm reported: ``` 0000000003dc39b8 0000000000000008 V guard variable for void Dynarmic::Backend::X64::EmitFPVectorToFixed<16ul, false>(Dynarmic::Backend::X64::BlockOfCode&, Dynarmic::Backend::X64::EmitContext&, Dynarmic::IR::Inst*)::lut 0000000003dc3a18 0000000000000008 V guard variable for void Dynarmic::Backend::X64::EmitFPVectorToFixed<16ul, true>(Dynarmic::Backend::X64::BlockOfCode&, Dynarmic::Backend::X64::EmitContext&, Dynarmic::IR::Inst*)::lut 0000000003dc39d8 0000000000000008 V guard variable for void Dynarmic::Backend::X64::EmitFPVectorToFixed<32ul, false>(Dynarmic::Backend::X64::BlockOfCode&, Dynarmic::Backend::X64::EmitContext&, Dynarmic::IR::Inst*)::lut 0000000003dc3a38 0000000000000008 V guard variable for void Dynarmic::Backend::X64::EmitFPVectorToFixed<32ul, true>(Dynarmic::Backend::X64::BlockOfCode&, Dynarmic::Backend::X64::EmitContext&, Dynarmic::IR::Inst*)::lut 0000000003dc39f8 0000000000000008 V guard variable for void Dynarmic::Backend::X64::EmitFPVectorToFixed<64ul, false>(Dynarmic::Backend::X64::BlockOfCode&, Dynarmic::Backend::X64::EmitContext&, Dynarmic::IR::Inst*)::lut 0000000003dc3a58 0000000000000008 V guard variable for void Dynarmic::Backend::X64::EmitFPVectorToFixed<64ul, true>(Dynarmic::Backend::X64::BlockOfCode&, Dynarmic::Backend::X64::EmitContext&, Dynarmic::IR::Inst*)::lut ``` "ah its not bad" - OH MATE ITS JUST THE GUARD VARIABLES - i attached a file with just the functions generated for each case... now with this PR only 6 * 6 functions are made (still not ideal, but way better), 36 is way better than 1156 FUCKING FUNCTIONS Signed-off-by: lizzie <lizzie@eden-emu.dev>
769 KiB
[dynarmic] Remove last FPT LUT table, removing around 40kb worth of unused functions
Some checks reported errors
eden-license / license-header (pull_request) Failing after 26s
GitHub Actions [CI] Build cancelled
27cfc54c71
Signed-off-by: lizzie <lizzie@eden-emu.dev>
license
All checks were successful
eden-license / license-header (pull_request) Successful in 25s
GitHub Actions [CI] Build succeeded
GitHub Releases [CD] Release published
a92198e9ce
Lizzie changed title from [dynarmic] Remove last FPT LUT table, removing around 40kb worth of unused functions to [dynarmic] Remove last FPT LUT table, removing around 16kb worth of unused functions 2026-03-12 23:06:39 +01:00
Lizzie changed title from [dynarmic] Remove last FPT LUT table, removing around 16kb worth of unused functions to [dynarmic] Remove last FPT LUT table, removing around 25kb worth of unused functions 2026-03-12 23:08:24 +01:00
Lizzie changed title from [dynarmic] Remove last FPT LUT table, removing around 25kb worth of unused functions to [dynarmic] Remove last FPT LUT table, removing around 30kb worth of unused functions 2026-03-12 23:08:39 +01:00
First-time contributor

appears to have no issues on games i tested with booting

appears to have no issues on games i tested with booting
DraVee approved these changes 2026-03-14 03:12:45 +01:00
DraVee left a comment
Member

Also tested on Bayonneta3, EnderMagnolia, TOTK, MK8D

On gentoo

Also tested on Bayonneta3, EnderMagnolia, TOTK, MK8D On gentoo
Lizzie force-pushed lizzie/dynarmic-ltu-fpt from a92198e9ce
All checks were successful
eden-license / license-header (pull_request) Successful in 25s
GitHub Actions [CI] Build succeeded
GitHub Releases [CD] Release published
to 4f73a4574b
All checks were successful
eden-license / license-header (pull_request) Successful in 30s
GitHub Actions [CI] Build succeeded
GitHub Releases [CD] Release published
2026-03-19 08:25:47 +01:00
Compare
Lizzie force-pushed lizzie/dynarmic-ltu-fpt from 4f73a4574b
All checks were successful
eden-license / license-header (pull_request) Successful in 30s
GitHub Actions [CI] Build succeeded
GitHub Releases [CD] Release published
to 771b491172
All checks were successful
eden-license / license-header (pull_request) Successful in 39s
GitHub Actions [CI] Build succeeded
GitHub Releases [CD] Release published
2026-03-25 05:30:28 +01:00
Compare
Maufeat approved these changes 2026-03-25 10:29:21 +01:00
Lizzie merged commit 24fe223692 into master 2026-03-25 10:48:54 +01:00
Lizzie deleted branch lizzie/dynarmic-ltu-fpt 2026-03-25 10:48:54 +01:00
Lizzie referenced this pull request from a commit 2026-03-27 01:11:51 +01:00
Sign in to join this conversation.
No description provided.