Boost logo

Boost :

Subject: Re: [boost] [context] Floating Point Exception
From: Daniel Larimer (dlarimer_at_[hidden])
Date: 2011-07-02 16:45:27


On Jul 2, 2011, at 2:12 PM, Oliver Kowalke wrote:

> Am 02.07.2011 18:17, schrieb Daniel Larimer:
>>
>> Your new code still has the invalid Unknown pseudo-op: .type.
>>
> .type tells the compile which kind of symbol is encountered -> function
>
> I need some assembler genereated by gcc to see how the meta infos look like on MacOS X (I've no installation)
>
>>>> 3) Compiled with:
>>>> gcc-4.5.0 -o fcontext_x86_64_sysv_macho_gas.S.o -c
>>>> fcontext_x86_64_sysv_macho_gas.S
>>> could you write a little helloworld-app and compile it with -S and send me the generated assembler?
>>>
>> Sure. Do you want it to use your context or just want to see int main( ) { printf( "hello world"); return 0; } ?
>>
>
> yes - at best you generated a shared library with position-independed code (-fPIC) and link the test app.
> The assembler (gcc -S) file should tell me how functions are addresses in pic on MacOSX/Mach-O.
> The meta infos (see above -> .type) are provided too.
>
>>> fixed missing fp x87 word initialisation
>>>
>> Seems to have fixed things. Asm version is 2x as fast as ucontext for my use case.
>>
> how do you test it? I get a spped-up factor of 10x on Linux/x86.
> boost.context contains a subfolder 'performance' with code measuring the CPU cycles

        I am sure I am probably seeing a 10x increase in context switching speed, but my use case involves other operations with every context switch, such as new. So context switching was probably only half of what I was measuring.

>
>>>> I noticed that none of the examples test for floating point ops. You might
>>>> want to include that as part of your standard testing.
>> I saw you added these tests to git... did it work on other platforms, or did you have to change multiple asm files?
>
> I've modified the asm files for x86 platform (added missing fp-register initialisation) and I've added an example and a test for floating point ops too (which should work on all platforms)
>
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk