[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/6] oslib-posix: add helpers for stack alloc an
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 1/6] oslib-posix: add helpers for stack alloc and free |
Date: |
Mon, 4 Jul 2016 12:48:40 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 |
On 04/07/2016 12:35, Peter Lieven wrote:
> Am 04.07.2016 um 12:34 schrieb Paolo Bonzini:
>>
>> On 04/07/2016 12:25, Peter Lieven wrote:
>>>> No, you just pass the stack and the runtime takes care of initializing
>>>> the two stack pointers:
>>>>
>>>> uc.uc_link = &old_uc;
>>>> uc.uc_stack.ss_sp = co->stack;
>>>> uc.uc_stack.ss_size = stack_size;
>>>> uc.uc_stack.ss_flags = 0;
>>> So, you would basically copy the if/elif part from allocatestack.c ?
>> Yes, but note that _STACK_GROWS_{DOWN,UP} and
>> NEED_SEPARATE_REGISTER_STACK are glibc-specific. You need to use
>> HOST_IA64 and HOST_HPPA.
>
> Is HOST_HPPA the only supported target where the stack grows up?
Yes, I think so.
Paolo
Re: [Qemu-devel] [PATCH 1/6] oslib-posix: add helpers for stack alloc and free, Peter Lieven, 2016/07/04