Re: STM - Get assembler error when updating base register using ^
- From: Michael <MichaelDMcDonnell@xxxxxxxxx>
- Date: Fri, 29 Aug 2008 21:08:19 -0700 (PDT)
On Aug 29, 1:17 pm, Niklas Holsti <niklas.hol...@xxxxxxxxxxxxxxx>
wrote:
Michael wrote:
On Aug 29, 12:11 am, Niklas Holsti <niklas.hol...@xxxxxxxxxxxxxxx>
wrote:
Michael wrote:
stmia r0!, {r1-r14}^
I'm getting an error on the above instruction, but don't understand
why. Can anyone help? If you could point me to where it states that
this is illegal, I'd appreciate that also. Thanks.
I assume this question is for the ARM instruction set -- but you
don't say which ARM version. The ARM7TDMI Data *** (August 1995)
says, in section 4.11.4 (Use of the S bit, with LDM/STM) that "base
write-back should not be used" when R15 is not in the register list
and the S bit is set (i.e. the ^ is used), just as in your case.
The Data *** does not give a reason for this prohibition, but I
guess it has to do with the fact that this instruction (thanks to
the ^ modifier) deals with two register sets, the User bank
registers (transferred) and the current-mode registers (the Data
*** does not explicitly say so, but I assume that the base
register, here R0, is always the current-mode register, not the
User bank register).
Thanks, but it generates the same error msg even if you specify r15 in
the list. And sorry, yes, I'm referring to the ARM processor. Any
other ideas?
In fact the statement "base write-back should not be used" appears
in the same ARM7TDMI Data *** also when R15 is in the register
list for STM and the ^ modifier is used, which agrees with what you
experience. My apologies if my first reply implied that the
presence of R15 is significant for STM (I looked only at the
specific point in the Data *** that matched your instruction).
According to this Data ***, it seems that combining write-back
and ^ is allowed for LDM with R15 in the register list. I don't
know why LDM differs from STM on this point.
--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .- Hide quoted text -
- Show quoted text -
Thanks for your helpful comments.
.
- References:
- Re: STM - Get assembler error when updating base register using ^
- From: Niklas Holsti
- Re: STM - Get assembler error when updating base register using ^
- From: Niklas Holsti
- Re: STM - Get assembler error when updating base register using ^
- Prev by Date: computer skills
- Next by Date: Re: Orcad is a total piece of dog crap!
- Previous by thread: Re: STM - Get assembler error when updating base register using ^
- Next by thread: Re: Where is the ARM Instruction Set Manual? (the one with bit field encodings)
- Index(es):