Subject: Re: ARM 7TDMI aborts
To: John Fremlin <vii@users.sourceforge.net>
From: Richard Earnshaw <rearnsha@arm.com>
List: port-arm32
Date: 06/03/2001 15:48:49
> Ben Harris <bjh21@netbsd.org> writes:
> 
> [...]
> 
> > > It doesn't give me a handy keyword. For data abt, ldr and str can
> > > apparently write back modified base registers, and ldm and stm insns
> > > can abort sort of halfway through. I guess this is the ARM6 early abt
> > > model?
> > 
> > Writing back modified base registers for LDR and STR is the "Base
> > Updated Abort Model", ie late aborts. 
> 
> So I want the arm7 fixups like I originally tried?

Just to clarify.

The ARM ARM defines two (plus a deprecated third) abort models --

Base restored: The base register is always the value before the 
instruction started execution.

Base updated: The base register is always the value after an 
post-addressing side-effect has been applied

Early abort (deprecated): LDC, LDM, STC & STM instructions have 
post-addressing side-effects applied, other instructions do not.

Some documents refer to late-abort: this is identical to Base Updated.

In all cases, if a load multiple updates the base-register with a value 
from memory and then aborts on a later word the base register is restored 
to its original value.

If you have the choice, use the Base Restored model since it saves the 
need to disassemble the instruction and potentially undo side-effects -- 
an issue that becomes particularly tedious if you also have to handle 
Thumb code.

R.