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


Nick Clifton wrote:

Hi Joern, Hi Alex,

 A customer of ours recently reported a problem with the SH2A port
 uncovered by the PlumHall testsuite.  Obviously I cannot reproduce
 that test here, but I was able to find the problem and a simple
 patch to fix it.

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?



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