mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-11-23 05:29:53 +00:00
[next] SH: Use bitwise OR with mask for sign extension (#2389)
Some checks failed
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:ON name:ubuntu-24.04 x64 ASAN os:ubuntu-24.04]) (push) Waiting to run
Run Test / ${{ matrix.config.name }} (map[arch:x64 name:windows x64 MSVC 64bit os:windows-latest platform:windows python-arch:x64 python-version:3.9]) (push) Waiting to run
Run clang-tidy / clang-tidy (push) Waiting to run
RELEASE BUILD - PyPI 📦 Distribution / Build wheels on ${{ matrix.os }} (macos-latest) (push) Waiting to run
RELEASE BUILD - PyPI 📦 Distribution / Build wheels on ${{ matrix.os }} (windows-latest) (push) Waiting to run
RELEASE BUILD - PyPI 📦 Distribution / publish (push) Blocked by required conditions
Python Package CI / build (macOS-14, 3.12) (push) Waiting to run
Python Package CI / build (macOS-14, 3.8) (push) Waiting to run
Python Package CI / build (ubuntu-24.04, 3.12) (push) Waiting to run
Python Package CI / build (ubuntu-24.04, 3.8) (push) Waiting to run
Python Package CI / build (windows-2022, 3.12) (push) Waiting to run
Python Package CI / build (windows-2022, 3.8) (push) Waiting to run
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 cmake os:ubuntu-22.04]) (push) Failing after 1s
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:make diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 make os:ubuntu-22.04]) (push) Failing after 0s
RELEASE BUILD - PyPI 📦 Distribution / Build wheels on ${{ matrix.os }} (ubuntu-latest) (push) Failing after 1s
RELEASE BUILD - PyPI 📦 Distribution / Make SDist (push) Failing after 1s
Auto-Sync / check (push) Has been cancelled
Some checks failed
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:ON name:ubuntu-24.04 x64 ASAN os:ubuntu-24.04]) (push) Waiting to run
Run Test / ${{ matrix.config.name }} (map[arch:x64 name:windows x64 MSVC 64bit os:windows-latest platform:windows python-arch:x64 python-version:3.9]) (push) Waiting to run
Run clang-tidy / clang-tidy (push) Waiting to run
RELEASE BUILD - PyPI 📦 Distribution / Build wheels on ${{ matrix.os }} (macos-latest) (push) Waiting to run
RELEASE BUILD - PyPI 📦 Distribution / Build wheels on ${{ matrix.os }} (windows-latest) (push) Waiting to run
RELEASE BUILD - PyPI 📦 Distribution / publish (push) Blocked by required conditions
Python Package CI / build (macOS-14, 3.12) (push) Waiting to run
Python Package CI / build (macOS-14, 3.8) (push) Waiting to run
Python Package CI / build (ubuntu-24.04, 3.12) (push) Waiting to run
Python Package CI / build (ubuntu-24.04, 3.8) (push) Waiting to run
Python Package CI / build (windows-2022, 3.12) (push) Waiting to run
Python Package CI / build (windows-2022, 3.8) (push) Waiting to run
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:cmake diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 cmake os:ubuntu-22.04]) (push) Failing after 1s
Run Test / ${{ matrix.config.name }} (map[arch:x64 build-system:make diet-build:OFF enable-asan:OFF name:ubuntu-22.04 x64 make os:ubuntu-22.04]) (push) Failing after 0s
RELEASE BUILD - PyPI 📦 Distribution / Build wheels on ${{ matrix.os }} (ubuntu-latest) (push) Failing after 1s
RELEASE BUILD - PyPI 📦 Distribution / Make SDist (push) Failing after 1s
Auto-Sync / check (push) Has been cancelled
* Use bitwise OR with mask for sign extension Sign extend using bitwise OR with mask, instead of unary minus. Fixes error when building for UWP with Security Development Lifecycle (SDL). See https://learn.microsoft.com/en-us/cpp/build/reference/sdl-enable-additional-security-checks?view=msvc-170 * Remove unused store Remove unused store caught by clang-tidy. * Suppress clang-tidy false positive Ignore an unitialized va_list false positive emitted by clang-tidy --------- Co-authored-by: Wu ChenXu <kabeor00@gmail.com>
This commit is contained in:
parent
3a2cd3c331
commit
67d975662e
@ -1459,13 +1459,13 @@ static bool decode_long(uint32_t code, uint64_t address, MCInst *MI,
|
||||
if (code & 0x00010000) {
|
||||
// movi20s #imm,
|
||||
imm <<= 8;
|
||||
if (imm >= 1 << 27)
|
||||
imm = -((1 << 28) - imm);
|
||||
if (imm & (1 << (28 - 1)))
|
||||
imm |= ~((1 << 28) - 1);
|
||||
insn = SH_INS_MOVI20S;
|
||||
} else {
|
||||
// MOVI20
|
||||
if (imm >= 1 << 19)
|
||||
imm = -((1 << 20) - imm);
|
||||
if (imm & (1 << (28 - 1)))
|
||||
imm |= ~((1 << 20) - 1);
|
||||
insn = SH_INS_MOVI20;
|
||||
}
|
||||
set_imm(info, 0, imm);
|
||||
|
Loading…
Reference in New Issue
Block a user