Use .S sources for x86/x86_64 expl
Andreas Jaeger
aj@suse.com
Sat May 5 19:21:00 GMT 2012
On 05/05/2012 06:22 PM, Joseph S. Myers wrote:
> The x86/x86_64 implementation of expl uses a long inline asm inside a
> C source file.
>
> I don't think this is generally a good practice, it may offer some
> marginal convenience for accessing operands where the precise syntax
> varies between PIC and non-PIC, or x86 and x86_64, but it makes the
> code less flexible and harder to modify than either plain C code or a
> pure .S file, and we have macros to simplify writing such things as
> PIC accesses in .S files. When you want to add additional constant
> operands, or checks directly on the binary representation of the
> floating-point value, as part of fixing bugs, requiring everything to
> be specified as asm operands rather than just writing the desired
> instruction sequences directly rather gets in the way.
>
> Thus, I propose this patch which moves expl to using separate .S files
> for x86 and x86_64, the usual approach for the bulk of the other
> x86/x86_64 long double functions with assembly implementations, which
> works fine for them. Tested x86 and x86_64.
The idea was to be able to share the file between i386 and x86-64. When
I ported glibc to x86-64, I added those files where it was easy to do
such a mix. Duplication in general is bad.
If this mix now makes things too complicated, then I'm fine with
reversing it, and thus the patch is fine.
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
More information about the Libc-alpha
mailing list