Commit 9e3e6ce
Fix incorrect length for __builtin_bswap16
The bswaphi pattern generates 2 assembly instructions with a length
of 8 bytes. The bswaphi pattern missed the length attribute, as a
result the default of 8 bytes was assumed. This allowed the "8 byte"
bswaphi pattern to be scheduled into the delay slot of a branch
instruction where only a 4 byte instruction can be placed. This
patch addresses the problem.
2026-04-18 Michael Eager <eager@eagercon.com>
gcc/ChangeLog:
PR target/103383
* config/microblaze/microblaze.md: bswaphi2: (set_attr length 8)
gcc/testsuite/ChangeLog:
PR target/103383
* gcc.target/microblaze/isa/pr103383.c: New test.
Signed-off-by: Nagaraju Mekala <nmekala@xilix.com>
Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com>
Signed-off-by: Michael J. Eager <eager@eagercon.com>1 parent 439467e commit 9e3e6ce
2 files changed
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
372 | 375 | | |
373 | 376 | | |
374 | 377 | | |
| |||
377 | 380 | | |
378 | 381 | | |
379 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
380 | 386 | | |
381 | 387 | | |
382 | 388 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments