Skip to content

How to build glibc with HW FPU properly #14

Open
@VVIsaev

Description

@VVIsaev

I tried to build glibc with following configuration:

$ CROSS_COMPILE=arc64-linux-gnu- ASFLAGS='-mfpu=fpud' CFLAGS='-O2 -mfpu=fpud' CXXFLAGS='-O2 -mfpu=fpud' ../configure --target=arc64-linux-gnu --host=arc64-linux-gnu --build=x86_64 --enable-shared --disable-profile --disable-werror --without-gd --prefix=/home/isaev/tmp/glibc-gnuhf
$ make

Then I checked __longjmp() in libc.so.6, see source:

...
        LDR.as r24,   r0, 15

#if defined(__ARCV3__)
        LDR.as r25,   r0, 16
        LDR.as r26,   r0, 17
#endif

#if defined (__ARC_FLOAT_ABI_HARD__)
        FLDR.as f16,  r0, 18
...
        FLDR.as f31,  r0, 33
#endif

        MOVR.f r0, r1
        j.d    [blink]
...

But in built libc I do't see such code:

0000000000035608 <__longjmp>:
...
   35644:       100f 0e58               ldl.as  r24,[r0,15]
   35648:       1010 0e59               ldl.as  r25,[r0,16]
   3564c:       1011 0e5a               ldl.as  r26,[r0,17]
   35650:       580a 8040               movl.f  r0,r1
   35654:       2021 07c0               j.d     [blink]
...

So I don't see fp related code in __longjmp.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions