[Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature #17

Merged
techwritescode merged 1 commit from r5900-objdump-mach into r5900-ee 2026-10-15 22:09:13 +00:00

llvm-objdump hit llvm_unreachable("Unknown EF_MIPS_ARCH value") on every R5900 object: getMIPSFeatures handled no EF_MIPS_MACH value except Octeon. This adds the 5900 case, mapped to the r5900 feature, so R5900 objects disassemble with the R5900 instructions enabled. Found during PS2-194.

  • New test llvm/test/tools/llvm-objdump/ELF/Mips/r5900.test. lit passes for llvm-objdump/ELF/Mips, MC/Mips, MC/Disassembler/Mips and Object.
  • The sdk-core bench ELFs (with and without LTO) now disassemble without crashing.
  • Not fixed here: lq/sq and the MMI instructions still show as <unknown>, because the disassembler has no decoder entries for them.

Upstream main has the same gap.

🤖 Generated with Claude Code

llvm-objdump hit `llvm_unreachable("Unknown EF_MIPS_ARCH value")` on every R5900 object: `getMIPSFeatures` handled no `EF_MIPS_MACH` value except Octeon. This adds the 5900 case, mapped to the `r5900` feature, so R5900 objects disassemble with the R5900 instructions enabled. Found during PS2-194. - New test `llvm/test/tools/llvm-objdump/ELF/Mips/r5900.test`. lit passes for llvm-objdump/ELF/Mips, MC/Mips, MC/Disassembler/Mips and Object. - The sdk-core bench ELFs (with and without LTO) now disassemble without crashing. - Not fixed here: `lq`/`sq` and the MMI instructions still show as `<unknown>`, because the disassembler has no decoder entries for them. Upstream main has the same gap. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
[Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature
Some checks failed
Check for private emails used in PRs / validate_email (pull_request) Has been skipped
action.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (pull_request) Failing after 0s
Check LLVM ABI annotations / Check LLVM_ABI annotations with ids (pull_request) Has been skipped
CI Checks / Build and Test Linux (pull_request) Has been skipped
CI Checks / Build and Test Windows (pull_request) Has been skipped
CI Checks / Compute macOS Projects (pull_request) Has been skipped
CI Checks / Build and Test macOS arm64 (pull_request) Has been skipped
release-binaries-all.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (pull_request) Failing after 0s
release-binaries.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (pull_request) Failing after 0s
release-documentation.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (pull_request) Failing after 0s
release-sources.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (pull_request) Failing after 0s
action.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (push) Failing after 0s
release-binaries-all.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (push) Failing after 0s
release-binaries.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (push) Failing after 0s
release-documentation.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (push) Failing after 0s
release-sources.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (push) Failing after 0s
Labelling new pull requests / greeter (pull_request_target) Has been cancelled
Labelling new pull requests / automate-prs-labels (pull_request_target) Has been cancelled
1bd67015ff
getMIPSFeatures had no case for EF_MIPS_MACH_5900, so llvm-objdump hit
llvm_unreachable on every R5900 object. Objects with this flag now
disassemble with the R5900 instructions enabled.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
techwritescode force-pushed r5900-objdump-mach from 1bd67015ff
Some checks failed
Check for private emails used in PRs / validate_email (pull_request) Has been skipped
action.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (pull_request) Failing after 0s
Check LLVM ABI annotations / Check LLVM_ABI annotations with ids (pull_request) Has been skipped
CI Checks / Build and Test Linux (pull_request) Has been skipped
CI Checks / Build and Test Windows (pull_request) Has been skipped
CI Checks / Compute macOS Projects (pull_request) Has been skipped
CI Checks / Build and Test macOS arm64 (pull_request) Has been skipped
release-binaries-all.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (pull_request) Failing after 0s
release-binaries.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (pull_request) Failing after 0s
release-documentation.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (pull_request) Failing after 0s
release-sources.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (pull_request) Failing after 0s
action.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (push) Failing after 0s
release-binaries-all.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (push) Failing after 0s
release-binaries.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (push) Failing after 0s
release-documentation.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (push) Failing after 0s
release-sources.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (push) Failing after 0s
Labelling new pull requests / greeter (pull_request_target) Has been cancelled
Labelling new pull requests / automate-prs-labels (pull_request_target) Has been cancelled
to 7724f9803d
Some checks failed
action.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (push) Failing after 0s
release-binaries-all.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (push) Failing after 0s
release-binaries.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (push) Failing after 0s
release-documentation.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (push) Failing after 0s
release-sources.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (push) Failing after 0s
Labelling new pull requests / greeter (pull_request_target) Has been skipped
Labelling new pull requests / automate-prs-labels (pull_request_target) Has been skipped
action.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (pull_request) Failing after 0s
Check LLVM ABI annotations / Check LLVM_ABI annotations with ids (pull_request) Has been skipped
CI Checks / Build and Test Linux (pull_request) Has been skipped
CI Checks / Build and Test Windows (pull_request) Has been skipped
CI Checks / Compute macOS Projects (pull_request) Has been skipped
CI Checks / Build and Test macOS arm64 (pull_request) Has been skipped
release-binaries-all.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (pull_request) Failing after 0s
release-binaries.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (pull_request) Failing after 0s
release-documentation.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (pull_request) Failing after 0s
release-sources.yml / [Object][Mips] Map EF_MIPS_MACH_5900 to the r5900 feature (pull_request) Failing after 0s
Add buildbot information to first PRs from new contributors / buildbot_comment (pull_request_target) Has been skipped
2026-10-15 22:09:02 +00:00
Compare
techwritescode deleted branch r5900-objdump-mach 2026-10-15 22:09:15 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ps2/llvm!17
No description provided.