Skip to content

Commit

Permalink
microblaze: Fix -Os right shift optimization is allowed into delay slot
Browse files Browse the repository at this point in the history
In picolibc testing it's found that this produces code that compiler
squeezes into a single delay slot. And thus only the first instruction
emitted by this optimization is run and the rest is skipped.

Signed-off-by: Alp Sayin <[email protected]>
  • Loading branch information
alpsayin committed Oct 18, 2024
1 parent 297ef07 commit 39eb6ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gcc/config/microblaze/microblaze.md
Original file line number Diff line number Diff line change
Expand Up @@ -2286,7 +2286,7 @@ else
output_asm_insn ("bneid\t%3,.-4", operands);
return "sra\t%0,%0";
}
[(set_attr "type" "arith")
[(set_attr "type" "multi")
(set_attr "mode" "SI")
(set_attr "length" "20")]
)
Expand Down

0 comments on commit 39eb6ac

Please sign in to comment.