From: Nick Clifton <nickc@cygnus.com>
To: vlebedev@aplio.fr
Cc: gcc@gcc.gnu.org
Subject: Re: code generation for arm targets
Date: Wed, 22 Mar 2000 10:11:00 -0000 [thread overview]
Message-ID: <200003221810.KAA13226@elmo.cygnus.com> (raw)
Hi Vadim,
: I see some strange things in code generation for arm-elf target:
:
: 28 str lr, [sp, #-4]!
:
: Take a look at line 28.
:
: The lr register is saved in the "unallocated" stack area. The stack
: pointer is updated to include local variables frame only at line
: 33.
No its not.
: Wouldn't it be safer (with respect to interrupt and signal handling)
: to update the stack pointer immiedately upon entering the function?
You missed the ! at the end of the instruction. This indicates a
pre-indexed addressing mode. In this case the instruction will
compute:
sp = sp - 4
*sp = lr
so that stack pointer is updated before (or at the same time as) the
stack slot is written to.
Cheers
Nick
next reply other threads:[~2000-03-22 10:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-22 10:11 Nick Clifton [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-03-22 7:49 Vadim Lebedev
2000-03-22 10:11 ` Richard Earnshaw
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200003221810.KAA13226@elmo.cygnus.com \
--to=nickc@cygnus.com \
--cc=gcc@gcc.gnu.org \
--cc=vlebedev@aplio.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).