Login

Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.

ARM Community: ARM7TDMI - Exceptions - ARM Community

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

ARM7TDMI - Exceptions Rate Topic: -----

#1 User is offline   junaid 

  • Member
  • Pip
  • Group: Members
  • Posts: 6
  • Joined: 05-May 08

Posted 02 June 2011 - 10:25 AM

Hi All,
I have a doubt in ARM7TDMI exception,

Once exception (FIQ, IRQ, or Data Abort, Pre-fetch Abort) occured, then regardless of the previouse mode (ARM or THUMB) the lr value will be as follows
FIQ -> PC+4 , where PC is the next instruction to be executed after return frm exception
IRQ -> PC+4, where PC is the next instruction to be executed after return frm exception
Data Abrt -> PC+8, where PC is the instruction which got aborted
PreFetch -> PC + 4 , where where PC is the prefetched instruction.
Why this is same for both ARM and Thumb mode?
Can anyone explain?
0

#2 User is offline   isogen74 

  • Super Contributor
  • PipPipPipPip
  • Group: Members
  • Posts: 1097
  • Joined: 20-March 07

Posted 02 June 2011 - 02:09 PM

"Magic" =)

It makes writing exception handlers which don't care about the ARM/Thumb state of the interrupt code very easy.
When optimizing software, consider that the quickest code to run is the bit you removed from the call path.
2

#3 User is offline   ttfn 

  • Super Contributor
  • PipPipPipPip
  • Group: Members
  • Posts: 576
  • Joined: 29-September 06

Posted 02 June 2011 - 02:46 PM

It's just legacy. These numbers came from how early harms dealt with exceptions. The numbers are maintained for backwards compatibility.
2

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic