Compare commits

...

4 Commits

Author SHA1 Message Date
Bram Speeckaert
06b0ae9d5b
Merge a307d9d9b8 into 2c92e5b5b3 2024-11-12 16:23:51 +08:00
OatmealDome
2c92e5b5b3
Merge pull request #13160 from cpba/flatpak-6.8-runtime
Flatpak: Upgrade kde runtime to 6.8
2024-11-12 00:30:46 -05:00
Carles Pastor
fe96bf4108 Flatpak: Upgrade kde runtime to 6.8
this version bundles SDL2-2.30.6, the temporary measure of building the
vendored version from exports is no longer necessary.
2024-11-10 12:06:06 +01:00
Sintendo
a307d9d9b8 JitArm64_LoadStore: Optimize zero stores in stX
The value being stored must be loaded into a register. In the case of an
immediate value, this means it must be materialized. The value is
eventually byteswapped before performing the store.

This can be simplified for the value 0 for two reasons:
- ARM64 has a dedicated zero register, so does not need to be
  materialized.
- Byteswapping zero is still zero, so we can skip this step.

We could skip byteswapping for other values by immediately materializing
the byteswapped value in a register, but the benefits are not so clear
there (if the value needs to be materialized anyway, it is better to do
it up front).

Before:
0x5280001b   mov    w27, #0x0                 ; =0
0xb9404fba   ldr    w26, [x29, #0x4c]
0x12881862   mov    w2, #-0x40c4              ; =-16580
0x0b020342   add    w2, w26, w2
0x5ac00b61   rev    w1, w27
0xb8226b81   str    w1, [x28, x2]

After:
0xb9404fbb   ldr    w27, [x29, #0x4c]
0x12881862   mov    w2, #-0x40c4              ; =-16580
0x0b020362   add    w2, w27, w2
0xb8226b9f   str    wzr, [x28, x2]
2024-11-02 23:15:22 +01:00
4 changed files with 9 additions and 27 deletions

View File

@ -1,22 +0,0 @@
{
"name": "SDL2",
"buildsystem": "autotools",
"config-opts": ["--disable-static"],
"sources": [
{
"type": "dir",
"path": "../../Externals/SDL/SDL"
}
],
"cleanup": [ "/bin/sdl2-config",
"/include",
"/lib/libSDL2.la",
"/lib/libSDL2main.a",
"/lib/libSDL2main.la",
"/lib/libSDL2_test.a",
"/lib/libSDL2_test.la",
"/lib/cmake",
"/share/aclocal",
"/lib/pkgconfig"]
}

View File

@ -1,6 +1,6 @@
app-id: org.DolphinEmu.dolphin-emu
runtime: org.kde.Platform
runtime-version: '6.7'
runtime-version: '6.8'
sdk: org.kde.Sdk
command: dolphin-emu-wrapper
rename-desktop-file: dolphin-emu.desktop
@ -47,9 +47,6 @@ modules:
url: https://github.com/Unrud/xdg-screensaver-shim/archive/0.0.2.tar.gz
sha256: 0ed2a69fe6ee6cbffd2fe16f85116db737f17fb1e79bfb812d893cf15c728399
# build the vendored SDL2 from Externals until the runtime gets 2.30.6
- SDL2/SDL2.json
- name: dolphin-emu
buildsystem: cmake-ninja
config-opts:

View File

@ -181,7 +181,8 @@ void JitArm64::SafeStoreFromReg(s32 dest, u32 value, s32 regOffset, u32 flags, s
if (!jo.fastmem)
gpr.Lock(ARM64Reg::W0);
ARM64Reg RS = gpr.R(value);
// Don't materialize zero.
ARM64Reg RS = gpr.IsImm(value, 0) ? ARM64Reg::WZR : gpr.R(value);
ARM64Reg reg_dest = ARM64Reg::INVALID_REG;
ARM64Reg reg_off = ARM64Reg::INVALID_REG;

View File

@ -257,6 +257,12 @@ void ByteswapAfterLoad(ARM64XEmitter* emit, ARM64FloatEmitter* float_emit, ARM64
ARM64Reg ByteswapBeforeStore(ARM64XEmitter* emit, ARM64FloatEmitter* float_emit, ARM64Reg tmp_reg,
ARM64Reg src_reg, u32 flags, bool want_reversed)
{
// Byteswapping zero is still zero.
// We'd typically expect a writable register to be passed in, but recognize
// WZR for optimization purposes.
if ((flags & BackPatchInfo::FLAG_FLOAT) == 0 && src_reg == ARM64Reg::WZR)
return ARM64Reg::WZR;
ARM64Reg dst_reg = src_reg;
if (want_reversed == !(flags & BackPatchInfo::FLAG_REVERSE))