Hi Michael, I've attached patch based on latest gcc master. Please apply when ready.
Changelog 2013-11-26 David Holsgrove <david.holsgr...@xilinx.com> * gcc/config/microblaze/predicates.md: Add cmp_op predicate. * gcc/config/microblaze/microblaze.md: Add branch_compare instruction which uses cmp_op predicate and emits cmp insn before branch. * gcc/config/microblaze/microblaze.c (microblaze_emit_compare): Rename to microblaze_expand_conditional_branch and consolidate logic. (microblaze_expand_conditional_branch): emit branch_compare insn instead of handling cmp op separate from branch insn. thanks, David On 15 July 2013 14:58, David Holsgrove <david.holsgr...@xilinx.com> wrote: > To facilitate optimization pass understanding of the conditional > branch for microblaze, remove the UNSPEC'd signed_compare / > unsigned_compare instructions, and replace with a complete > branch_compare which will output_asm_insn the correct cmp/cmpu > depending on comparison code and signed / unsigned. > > We then return the correct branch instruction. > > cbranchsi now calls an expanded microblaze_expand_conditional_branch > function which will carry out compare against zero, compare EQ/NE, > and all other compares appropriately. > > -funroll-loops optimization pass can now proceed > > Changelog > > 2013-07-15 David Holsgrove <david.holsgr...@xilinx.com> > > * gcc/config/microblaze/predicates.md: Add cmp_op predicate. > * gcc/config/microblaze/microblaze.md: Add branch_compare > instruction which uses cmp_op predicate and emits cmp insn > before branch. > * gcc/config/microblaze/microblaze.c > (microblaze_emit_compare): Rename to > microblaze_expand_conditional_branch and consolidate logic. > (microblaze_expand_conditional_branch): emit branch_compare > insn instead of handling cmp op separate from branch insn. > > thanks, > David
0007-Patch-microblaze-Add-branch_compare-instruction.patch
Description: Binary data