Alyssa Rosenzweig
b3ae81f75f
OpcodeDispatcher: allow garbage on shld shift
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:26:59 -04:00
Alyssa Rosenzweig
c1a1c37980
OpcodeDispatcher: mark ideas to improve SHLD
...
a bit tricky right now.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:26:59 -04:00
Alyssa Rosenzweig
56dd9f23d1
InstCountCI: Update
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
fb6f850bb4
OpcodeDispatcher: remove rcl sub
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
b6d8749525
OpcodeDispatcher: remove select from rcl
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
d3f1397325
OpcodeDispatcher: eliminate constants in RCR
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
0a164428fa
OpcodeDispatcher: eliminate select in RCR
...
the nzcv clobber I actually came ofr
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
7496175100
OpcodeDispatcher: optimize 32-bit rcl/rcr
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
0616a9cef1
OpcodeDispatcher: eliminate move in rcr 1-bit
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
97f8775354
OpcodeDispatcher: optimize <32-bit rcr op1
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
c92099aa98
OpcodeDispatcher: fuse orlshl in rcr 1-bit
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
7c288b09f1
OpcodeDispatcher: rmif mask rcl smaller OF
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
680af7b1b0
OpcodeDispatcher: rcr op 8x1 cleanup
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
349bc9efab
OpcodeDispatcher: unify rcr op 1bit codepaths
...
get additional opt for <32-bit
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
ad5c3cb268
OpcodeDispatcher: rmif mask for OF in rcr smaller
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
be8d37ef3d
OpcodeDispatcher: optimize 32-bit rol/ror imm
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
6ad2514bfe
OpcodeDispatcher: rmif mask rcl smaller cf
...
better on flagm. extra moves on non-flagm but, meh.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
3fa6129a14
OpcodeDispatcher: rmif mask rcr smaller cf
...
and do some constant folding to do so more.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
a57cebaf58
OpcodeDispatcher: skip OF calc for constant rotate >= 2
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
34fdb14da1
OpcodeDispatcher: add and use AndConst
...
this skips the constant folding, which saves the branching in the rotate
immediate implementations.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
974baca09c
OpcodeDispatcher: allow upper garbage with rcl/rcr smaller
...
we're masking immediately to something smaller
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
f22094a493
OpcodeDispatcher: use a branch for 8/16-bit rotate flags
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
d979b3a1da
OpcodeDispatcher: note idea to further optimize rcl
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Alyssa Rosenzweig
6d82c957fa
OpcodeDispatcher: fuse orlshl in rcl
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-30 22:22:57 -04:00
Ryan Houdek
28715a1df6
InstCountCI: Fixes test to not use relative data
...
JIT code and loaded code memory offsets aren't consistent run to run
which causes code generation consistency issues.
Instead use a register plus an immediate that can't fit in a single
16-bit encoding to get similar register allocation to RIP relative
addresses.
At some point it will probably be nice to support consistent placement
of both guest and host code so RIP relative can be used, but we don't have
support in our backend to do that.
2024-01-30 17:40:36 -08:00
Tony Wasserka
b40d8f5679
unittests/Library Forwarding: Add tests for fixed-size integer mapping
2024-01-30 19:54:45 +01:00
Ryan Houdek
2884337d85
Merge pull request #3391 from neobrain/fix_libfwd_custom_repack_nonstruct
...
Library Forwarding: Don't attempt custom repacking for non-struct types
2024-01-30 08:52:21 -08:00
Ryan Houdek
3036f3b3ff
Merge pull request #3390 from pmatos/TestHarnessArgs
...
Check that path arguments to TestHarnessRunner exist
2024-01-30 08:52:14 -08:00
Paulo Matos
b02ed40b5a
Check that path arguments to TestHarnessRunner exist
2024-01-30 16:37:31 +00:00
Tony Wasserka
0114c874a7
unittests/Library Forwarding: Respect silent flag when compiling SourceWithAST
2024-01-30 17:22:23 +01:00
Tony Wasserka
3ff3dc8769
Library Forwarding: Add unit test for diverging parameter type sizes
2024-01-30 17:22:23 +01:00
Tony Wasserka
d04c94fe80
Library Forwarding/gen: Map integers to fixed-size equivalents on guest
2024-01-30 17:22:23 +01:00
Tony Wasserka
0ebf260ed0
Library Forwarding: Consider struct metadata equal if it only differs in integer member type names
2024-01-30 17:22:23 +01:00
Tony Wasserka
28ae84cf60
Library Forwarding: Allow implicit conversions between various integer types
...
Generally, implicit integer conversions are prohibited for data wrapped in
guest_layout/host_layout, but a few types are exceptional:
* char vs signed char vs unsigned char vs other 8-bit ints
* wchar_t vs other 32-bit ints
* size_t vs uint32_t (32-bit only)
* long long vs other 64-bit ints
* long vs long long (64-bit only)
These combinations have the same data size, so conversions between them are
explicitly allowed now.
2024-01-30 17:22:23 +01:00
Tony Wasserka
26007168b0
Library Forwarding: Extend function pointer interface to take separate guest parameter lists
...
Some types (notably size_t on 32-bit) have different sizes on the guest than on
the host. This template function must be aware of these differences, so a
second parameter list with fixed-size types must be provided to describe the
guest types.
Note that this information can't be queried through type traits: To a C++
compiler, size_t is indistuingishable from uint64_t. For this reason, the
correct guest type must indeed be provided externally.
2024-01-30 17:22:23 +01:00
Tony Wasserka
a48237e218
Library Forwarding: Don't attempt custom repacking for non-struct types
2024-01-30 17:18:54 +01:00
Mai
fa3352004e
Merge pull request #3381 from alyssarosenzweig/opt/masking
...
Allow upper garbage on a bunch of instructions
2024-01-30 10:07:53 -05:00
Mai
b9378856da
Merge pull request #3389 from Sonicadvance1/panic_spill_libnss3
...
instcountci: Adds panicspill test from steamwebhelper
2024-01-30 10:05:31 -05:00
Paulo Matos
515e98f4cb
Update instruction counts
2024-01-30 10:47:56 +00:00
Ryan Houdek
ce2924731e
vixl/simulator: Enlarge simulator stack size
...
Simulator stack size defaults to 8KB. This new unit test requires at
least 15360 stack size. Just push it up to 8MB.
2024-01-29 19:48:38 -08:00
Ryan Houdek
c099fd01f1
instcountci: Adds panicspill test from steamwebhelper
...
This block of code causes our RA to panic spill and it gets hit my
steamwebhelper.
We should be able to spill without panic on this code at some point.
2024-01-29 19:48:38 -08:00
Ryan Houdek
36250b10f6
InstCountCI: Sanitize out adrp and adr
...
First time usage of adrp and adr, need to sanitize it.
2024-01-29 19:32:04 -08:00
Ryan Houdek
bc67910ee4
Merge pull request #3382 from pmatos/TypoFix
...
Fix typos; NFC
2024-01-29 16:10:14 -08:00
Ryan Houdek
79526b9c9e
Merge pull request #3379 from neobrain/fix_fexconfig_paths
...
FEXConfig: Initialize paths before trying to read configuration files
2024-01-29 16:01:12 -08:00
Mai
31a4158957
Merge pull request #3383 from alyssarosenzweig/opt/ptest
...
Optimize PTEST and VTESTP
2024-01-29 13:30:53 -05:00
Mai
58f3d3caf5
Merge pull request #3380 from alyssarosenzweig/opt/pdep
...
Optimize PDEP
2024-01-29 13:27:15 -05:00
Alyssa Rosenzweig
be52676b3b
InstCountCI: Update
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-29 13:24:11 -04:00
Alyssa Rosenzweig
ae48228943
OpcodeDispatcher: optimize vtestps/vtestpd
...
I don't really care about AVX but do the same thing we did for vptest.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-29 13:24:11 -04:00
Alyssa Rosenzweig
e8e35e48c7
OpcodeDispatcher: optimize ptest with tst
...
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-29 13:20:17 -04:00
Alyssa Rosenzweig
8b8f27a88f
OpcodeDispatcher: optimize ptest with umaxv
...
to check if the vector is zero, umaxv its elements and check if the reduced
scalar is zero.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
2024-01-29 13:20:17 -04:00