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]

Re: Division by zero


On 2/11/07, Paolo Bonzini <paolo.bonzini@lu.unisi.ch> wrote:

> I'm going to use an asm ().


Yeah, an asm volatile ("" : : "r" (x) : ) should please GCC and still be
portable to different platforms.

I thought using an asm () for each port to cause an exception specific
for that port. Such that divide-by-zero exception can be distinguished
from termination exception. However, asm volatile ("" : : "r" (x)) is
good for ports that not providing their specific asms. I'll mention it
in the email to newlib mailing list.

Thanks,
Jie


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