This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Conditionally falling back to the .c code or a different .S


Hi,
  I've got a few optimised routines for ARM string routines, optimised
for the newer processors.
I was wondering however what the right way was to conditionally use
them only if the library
was built for the newer CPUs.  We may well get around to using ifunc,
however for the moment
I'd like to understand the normal path.

  What I'd really like to say is 'use this assembler file if the CPU
it's built for is newer than ....
and these other flags aren't set'; I can see the preconfigure file in
the ports/sysdeps/arm directory,
which already uses $machine to select a directory (arm/eabi) depending
on the ABI being used.

  If I was to add code to detect ARMv7 say, would it be best to set
$submachine to ARMv7 and have
an ARMv7 directory that got searched first?

  If I did that however, what would I do when something newer comes
along?, if I set submachine to ARMv8 then
it would only search the ARMvN and the generic directory; what I
really want is to try the vN then if
that doesn't have anything try vN-1,.... fall back to the generic and
finally to the C version.
(Maybe that's just me trying to overly generalise it)

Thanks in advance,

Dave


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]