Landing: da222271bcd2
Project / Subsystem
gcc / or1k
Date
2026-06-04
Author
Stafford Horne
Commit
da222271bcd25927f1641dd6970b4736a42cba43
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- or1k
- patch_id
- —
- commit_hash
- da222271bcd25927f1641dd6970b4736a42cba43
- source_type
- github
- headline
- OpenRISC fixes 64-bit shift operations in GCC
- tldr
- GCC for OpenRISC now correctly handles 64-bit shift operations by defining `SHIFT_COUNT_TRUNCATED` and correcting shift amount predicates.
- author
- Stafford Horne
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • or1k
- • bugfix
- • code_generation
- • bit_manipulation
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-06-04T00:00:00.000Z
This commit resolves long-standing issues with 64-bit shift operations on the OpenRISC architecture within GCC. The fix involves defining SHIFT_COUNT_TRUNCATED to signal that shift amounts are limited to the low 5 bits, as expected by the hardware. Additionally, the predicate for 32-bit shift immediate operands was corrected from six to five bits, ensuring proper code generation for all shift instructions.