This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: Re: Dividing by zero does NOT generate exception
- From: "Paul D. DeRocco" <pderocco at ix dot netcom dot com>
- To: "eCos Discuss" <ecos-discuss at ecos dot sourceware dot org>
- Date: Fri, 4 Mar 2011 17:18:25 -0800
- Subject: RE: [ECOS] Re: Dividing by zero does NOT generate exception
> From: Quanren Xiong
>
> The hardware is KwikByte KB9200 board from eCosCentric, which
> is based on the ARM9 AT91RM9200 processor. But more RAM and
> ROM are added.
>
> I am new to the ARM architecture. Can someone confirm the
> processor does NOT generate exception on dividing by 0?
ARM does division in software, so it's up to the library routine. When I
worked with ARM/eCos a few years ago, division by zero didn't invoke any
exception; I doubt that has changed.
> Another odd thing I found is that It does NOT generate bad
> memory alignment exception either. For example, the following
> code will run just fine:
>
> unsigned int addr=0x00040041;
> *(int *)addr=0xFEFEFEFE;
>
> Should it generate a bad alignment exception?
Alignment faults can be enabled in register CP15. You should download the
data sheet on the processor from Atmel, and the one on the core itself from
ARM, so you can figure this stuff out.
--
Ciao, Paul D. DeRocco
Paul mailto:pderocco@ix.netcom.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss