This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Removing cc0 the right way


I'm currently working on removing cc0 from the CRX port. It seemed to
work but I have found a problem: On the CRX there are many instructions
that effect the condition code register; When not using cc0 the
following code gets sometimes generated:

   compare instr
   add instr
   branch instr

Which creates a bug since 'add' changes the condition status. I tried 2
solutions:

1. Add clobber side-effect to all insns that effect the condition
status - this of-course failed since the compiler sometimes generates
pattern without this clobber.

2. Try to define compare and branch in the same define_expand and
define a define_split for them using the condition "reload_completed".
This solved the bug but I think it is still ugly because some
instruction scheduling is done after reload is completed and it might
still be dangerous.

Can you help me to get an idea how to continue or of some references on
this problem? (I didn't find sufficient information about it)

TIA,
Paul

PS: My colleague Tomer already sent the binutils port for CRX and is
now starting with porting newlib.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]