shader: support S_ASHR_I64 #658
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!658
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/658/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ElijaOwO on GitHub · 2026-09-17 02:48 UTC · original
ElijaOwO:shader-s-ashr-i64→main· +330 −1 · 7 files · 2 commits · merged 2026-09-17 06:48 UTCAdded support for the SOP2 S_ASHR_I64 instruction (0x23).
Added focused shader CFG regression test for decoding and
arithmetic-shift lowering.
Tested on Windows with clang-cl 22.1.3.
Summary by CodeRabbit
New Features
Tests
@coderabbitai[bot] on GitHub · 2026-09-17 02:48 UTC · original · edited 2026-09-17 06:48 UTC
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Advanced
Run ID:
6d9dbd04-6979-45e5-8237-606d13e1be42📥 Commits
Reviewing files that changed from the base of the PR and between
63fb822f8aand ae252875e5b96ed9b8e95277b3e88d097cb79d77.📒 Files selected for processing (4)
src/graphics/shader/recompiler/frontend/decode/ScalarAluOps.cppsrc/graphics/shader/recompiler/frontend/decode/ShaderDecoder.hsrc/graphics/shader/recompiler/frontend/translate/Scalar.cpptests/shaderCfgTests.cppIncluded review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Walkthrough
The shader recompiler now recognizes
S_ASHR_I64, translates it as a 64-bit arithmetic right shift, and tests both decoding and IR lowering.Changes
Scalar 64-bit arithmetic right shift
src/graphics/shader/recompiler/frontend/decode/ShaderDecoder.h,src/graphics/shader/recompiler/frontend/decode/ScalarAluOps.cpp,src/graphics/shader/recompiler/frontend/translate/Scalar.cpp,tests/shaderCfgTests.cppOpcode::S_ASHR_I64, maps opcode0x23, emits 64-bit arithmetic right-shift IR, and validates decoding and lowering.Priority: ⬇️ Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Feature
Sequence Diagram(s)
Suggested reviewers:
nmzikMerge Risk: ⚪ Minimal · up to
ae252The decoder, lowering, and regression coverage are aligned, with no remaining concrete merge risk identified.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
S_ASHR_I64shader instruction.Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (1 skipped: 1 too large.)
✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment
@coderabbitai helpto get the list of available commands.