interest for ARM/thumb multiversionning ?

Ramana Radhakrishnan ramana.radhakrishnan@foss.arm.com
Wed Apr 29 22:36:00 GMT 2015



On 29/04/2015 09:24, Christian Bruel wrote:
> Hi Ramana, Richard
>
> After playing with the attritute ((target ("[thumb,arm]")), during the
> pending review, I added the "default" selector to neutralize
> -mflip-thumb for the setjmp/longjmp based tests.
>
> I was wondering it there would be an interest leverage on this to
> implement multiprocessing, like on the x86 ?
>

You mean multiversioning ? How would the dispatcher work in this case ?

Ramana

> something that would allow (from the x86 doc)
>
> __attribute__ ((target ("default")))
> int foo ()
> {
>    asm("...");
> return 0;
> }
>
> __attribute__ ((target ("thumb")))
> int foo ()
> {
>    asm("...");
> }
>
> int main ()
> {
> int (*p)() = &foo;
> assert ((*p) () == foo ());
> return 0;
> }
>
> I had initially not planned to do it, but this is a simple extension of
> the attribute target, if someone find a use for this I can implement it
> on the fly.
>
> Best Regards,
>
> Christian
>



More information about the Gcc mailing list