Subject: Re: [boost] [coroutine] new location
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2012-09-05 17:28:29
Am 05.09.2012 23:01, schrieb Christopher Kormanyos:
> 1) How can I set the desired stack size to a small amount
> such as 256 bytes?
with a stack of 256 bytes I assume you are not interested in a stack
with a guard page :)
you could simply create your own stack allocator - it needs only satisfy
- member functions void * allocate( std::size_t) and void deallocate(
void *, std::size_t)
- most important the pointer returned by allocate() must be the start
address of the stack and because ARM uses descending stacks (I know the
instruction set supports ascending instructions too) it must be the
- simply calloc()/free() should do it
> 2) I do not want cross-build boost right now.
> Which asm/cpp files should I extract from context
> for ARM(R) to include as sources in my project?
> Please don't worry about me or my sanity here,
> I roll with cross-compilers and builds all the time!
- files fcontext.cpp and fcontext_arm_aapcs_elf_gas.S (headers?)
> 3) How can I disable saving/restoring of the
> floating-point context in Boost.Context?
> My target micro does not have an FPU?
If the Cortex-Mx has no FPU so that you do not use the compiler flag
--hard-float (or so) to compile your code.
The asm preserving the FPU registers is wrapped by:
#if (defined(__VFP_FP__) && !defined(__SOFTFP__))
In your case the FPU preserving instructions will not be compiled.
For sanity you could explictly disable FPU preserving via the 4th
argument of jump_fcontext().
intptr_t jump_fcontext( fcontext_t * ofc, fcontext_t const* nfc,
intptr_t vp, bool preserve_fpu = true);
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk