This is the mail archive of the gcc-patches@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]

Re: RFA: Mark DIVS and DIVU SH2A instructions as unusable in delayslots


Hi Joern,

 The problem is that the SH2A's "divs" and "divu" instructions should
 not be placed into the delay slot of a branch/jump instruction
 because they might cause an exception.  This is caught by the
 simulator which was how the problem was uncovered.

Does that mean that exceptions thrown by a div[su] instruction in a delay slot need special handling by the exception handler[s], or that
> the processor doesn't allow these instructions in a delay slot at all?

My understanding is that this processor does not allow these instructions in the delay slots at all. Or rather that the presence of such instructions in the delay slot is illegal and their behaviour will be undefined. This was confirmed for us by Allan Tajii of Renesas.

Cheers
  Nick


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