|
Message-ID: <20151019211553.GO8645@brightrain.aerifal.cx> Date: Mon, 19 Oct 2015 17:15:53 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: [PATCH] convert arm memcpy asm to UAL, remove .word hacks On Mon, Oct 19, 2015 at 02:07:53PM -0700, Khem Raj wrote: > > > On Oct 18, 2015, at 5:17 PM, Rich Felker <dalias@...c.org> wrote: > > > > I've found that, contrary to the message in commit > > 9367fe926196f407705bb07cd29c6e40eb1774dd, all relevant gas versions > > actually do support .syntax unified, and assemble memcpy.s > > successfully with the attached patch applied. If there are no > > objections I'd like to go ahead and commit it. The only remaining > > .word hacks I'm aware of are in setjmp and longjmp, but they may still > > be needed to avoid wrongly flagging plain EABI (softfloat) binaries > > as needing hard float. > > IIRC .syntax should not affect the fp ABI assumptions, Its plainly > for unifying arm/thumb-ness in asm files and .eabi_attribute is the > directive which could set FP ABI and I don’t see it being set in asm > file which means it will be set depending on compiler cmdline. Right now setjmp and longjmp use .word to encode the instrutions: stc p11, cr8, [ip], #64 ldc p11, cr8, [ip], #64 because UAL does not permit them. Switching to the forms: vstmia ip!, {d8-d15} vldmia ip!, {d8-d15} would of course work, but these are floating point instructions, so they're not accessible without using .fpu, and then the object file is tagged as needing fpu, despite these instructions being needed even for no-fpu builds and only executed conditionally. (They're needed conditionally because, even if libc is soft ABI, the caller could be using "softfp" model, and in that case longjmp needs to be able to restore call-saved fp registers that have been modified between setjmp and longjmp.) Do you know a viable way to include these instructions without the file getting an ABI-tag marking it as requiring fpu? Rich
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.