From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: Laurent Vivier <laurent@vivier.eu>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] microblaze stack pointer?
Date: Wed, 4 Apr 2018 15:34:50 +0200 [thread overview]
Message-ID: <20180404133450.GP25124@toto> (raw)
In-Reply-To: <20c56323-b199-9fe1-8f1f-4f7247da0442@vivier.eu>
On Wed, Apr 04, 2018 at 02:30:26PM +0200, Laurent Vivier wrote:
> Hi,
Hi Laurent,
>
> cleaning up linux-user signal handling functions, I found something weird.
>
> In get_sp_from_cpustate(), SP is regs[14]:
>
> linux-user/microblaze/target_signal.h
>
> 24) static inline abi_ulong get_sp_from_cpustate(CPUMBState *state)
> 25) {
> 26) return state->regs[14];
> 27) }
>
> But in get_sigframe(), SP is regs[1];
>
> 4128) static abi_ulong get_sigframe(struct target_sigaction *ka,
> 4129) CPUMBState *env, int frame_size)
> 4130) {
> 4131) abi_ulong sp = env->regs[1];
> 4132)
> 4133) if ((ka->sa_flags & TARGET_SA_ONSTACK) != 0 &&
> !on_sig_stack(sp)) {
> 4134) sp = target_sigaltstack_used.ss_sp +
> target_sigaltstack_used.ss
> 4135) }
> 4136)
> 4137) return ((sp - frame_size) & -8UL);
> 4138) }
>
> Is this correct?
get_sp_from_cpustate() is wrong, it should be regs[1]...
Cheers,
Edgar
prev parent reply other threads:[~2018-04-04 13:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-04 12:30 [Qemu-devel] microblaze stack pointer? Laurent Vivier
2018-04-04 13:34 ` Edgar E. Iglesias [this message]
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=20180404133450.GP25124@toto \
--to=edgar.iglesias@gmail.com \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.