qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] microblaze stack pointer?


From: Edgar E. Iglesias
Subject: Re: [Qemu-devel] microblaze stack pointer?
Date: Wed, 4 Apr 2018 15:34:50 +0200
User-agent: Mutt/1.5.24 (2015-08-30)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]