This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

Re: PATCH: Add x32 ffs


On Wed, May 16, 2012 at 10:00 AM, Roland McGrath <roland@hack.frob.com> wrote:
> Though the code is the same, I think it's better to #include the x86_64
> file and add weak_alias (__fs, ffsl). ?That way if the x86_64 code ever
> changed or improved, x32 would use the version that can make the x86_64
> assumptions about what instructions can be used.
>
> Thanks,
> Roland

This is what I am checking in.  Tested on Linux/x32.  Thanks.

-- 
H.J.
----
	* sysdeps/x86_64/x32/ffs.c: New file.

diff --git a/sysdeps/x86_64/x32/ffs.c b/sysdeps/x86_64/x32/ffs.c
new file mode 100644
index 0000000..fa7de8b
--- /dev/null
+++ b/sysdeps/x86_64/x32/ffs.c
@@ -0,0 +1,4 @@
+#define ffsl __something_else
+#include <sysdeps/x86_64/ffs.c>
+#undef ffsl
+weak_alias (__ffs, ffsl)


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