mirror of
https://github.com/gopher64/gopher64.git
synced 2026-04-25 15:06:00 +03:00
[PR #561] [CLOSED] Replace std::arch::x86_64 with unified SIMD compatibility interface #617
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/gopher64#617
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/gopher64/gopher64/pull/561
Author: @Copilot
Created: 8/27/2025
Status: ❌ Closed
Base:
main← Head:copilot/fix-6835eb3f-8788-4033-a73f-74d53a74142b📝 Commits (4)
c628302Initial planfd6995aWIP: Unified SIMD interface to prepare for std::simd migration71c775cComplete unified SIMD interface replacing std::arch::x86_64 imports119ca8bFix build issues: include missing aarch64 compatibility and remove unused function📊 Changes
7 files changed (+32 additions, -34 deletions)
View changed files
📝
src/device.rs(+2 -8)📝
src/device/rsp_cpu.rs(+2 -6)📝
src/device/rsp_su_instructions.rs(+2 -8)📝
src/device/rsp_vu_instructions.rs(+2 -8)📝
src/main.rs(+1 -0)📝
src/savestates.rs(+2 -4)➕
src/simd_compat.rs(+21 -0)📄 Description
This PR replaces direct usage of
std::arch::x86_64intrinsics with a unified SIMD compatibility interface to improve portability and prepare for future migration tostd::simdwhen it becomes stable.Problem
The codebase had scattered architecture-specific SIMD code with direct imports of
std::arch::x86_64::*throughout multiple files:This created:
std::simdwhen stableSolution
Created a unified SIMD compatibility layer in
src/simd_compat.rsthat:_mm_*calls work unchangedChanges
src/simd_compat.rswith unified SIMD interface supporting both x86_64 and aarch64std::arch::x86_64imports:src/device.rssrc/device/rsp_vu_instructions.rssrc/device/rsp_su_instructions.rssrc/device/rsp_cpu.rssrc/savestates.rsstd::arch::x86_64::*imports from active codeBenefits
✅ Improved maintainability: Single source of truth for SIMD operations
✅ Better portability: No direct architecture dependencies in business logic
✅ Future-ready: Clear migration path to
std::simdwhen available✅ Zero breaking changes: All existing code continues to work
✅ Performance preserved: Zero-cost abstraction maintains native performance
The changes provide a solid foundation for the codebase's SIMD operations while eliminating architecture-specific complexity and preparing for future Rust ecosystem improvements.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.