|
Message-ID: <97041122-710c-0b4c-d4de-d89d87a9ee83@phoenixsoftware.it> Date: Thu, 13 Sep 2018 03:06:52 +0200 From: Pierluigi Passaro <pierluigi.passaro@...enixsoftware.it> To: musl@...ts.openwall.com Subject: Re: Cortex-M support This looks a good starting point: I'm targeting Cortex-M4 / M7 and maybe Cortex-R. I'm inspecting the code and trying to get a build. I have a few questions: 1) NOMMU support looks disabled I'm wondering if in the file arch/arm/reloc.h, some code should be added (or not). Somthing like #if (__ARM_ARCH_PROFILE == 'M') || (__ARM_ARCH_PROFILE == 'R') #define DL_NOMMU_SUPPORT 1 #endif 2) trying to enable hardfp support, the build fails - fabs try calling vabs.f64 assembly instruction - sqrt try calling vsqrt.f64 assembly instruction As far as I understood, vXXX.f64 instructions are only available with single/double precision FPU, not with half precision. I'm wondering if the assembly optimization should be wrapped by something like #if ... && (__ARM_FP > 7) I'm still trying to setup a reasonable build/test environment, but I suppose I need some suggestions on how to proceed. Any hints? Thanks Regards Pier On 13/09/2018 02:52, Rich Felker wrote: > On Wed, Sep 12, 2018 at 08:41:15PM -0400, Christopher Friedt wrote: >> It does :) Although only through thumbv2, so there would be some assembly >> rework required for cortex-m0. > There's also no fdpic ABI support yet, so it's only going to be > nonshared text. For bare-metal/pseudo-kernel or a single-program > userspace on Linux it probably doesn't matter, but if you're trying to > run a real userspace it's very inefficient. I'd like to add fdpic > soon. > > Also, I think it won't work unless the kernel traps and emulates the > cp15 thread-pointer access, since we don't support the get_tls > syscall. (We can add it if needed, but the whole idea of the syscall > is silly since it's no more efficient than trapping on the kernel > side, but support for switching to it makes userspace slower/heavier. > > Rich > > >> On Wed., Sep. 12, 2018, 8:39 p.m. Pierluigi Passaro, < >> pierluigi.passaro@...enixsoftware.it> wrote: >> >>> Hi, >>> I was wondering if musl already supports Cortex-M or not. >>> Thanks >>> Regards >>> Pier >>>
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.