public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/13926] New: __bswap_64 in bits/byeswap.h only usable by gcc
@ 2012-03-28 13:49 djohnson at osc dot edu
2012-03-28 13:52 ` [Bug libc/13926] " djohnson at osc dot edu
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: djohnson at osc dot edu @ 2012-03-28 13:49 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13926
Bug #: 13926
Summary: __bswap_64 in bits/byeswap.h only usable by gcc
Product: glibc
Version: 2.15
Status: NEW
Severity: minor
Priority: P3
Component: libc
AssignedTo: unassigned@sourceware.org
ReportedBy: djohnson@osc.edu
CC: drepper.fsp@gmail.com
Classification: Unclassified
Hi,
I've found what I believe is a bug in the bits/byteswap.h file, and the defines
that control whether masks/shifts or gcc inline assembly are used to implement
the byte swap. The 16 and 32 bits swaps are compatible with non-gcc compilers,
but the 64 bit swap can never be defined for a non-gcc compiler. See attached
patch for what I think the defines should look like (untested patch.)
Doug
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/13926] __bswap_64 in bits/byeswap.h only usable by gcc
2012-03-28 13:49 [Bug libc/13926] New: __bswap_64 in bits/byeswap.h only usable by gcc djohnson at osc dot edu
@ 2012-03-28 13:52 ` djohnson at osc dot edu
2012-03-28 14:12 ` aj at suse dot de
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: djohnson at osc dot edu @ 2012-03-28 13:52 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13926
--- Comment #1 from Doug Johnson <djohnson at osc dot edu> 2012-03-28 13:48:21 UTC ---
Created attachment 6305
--> http://sourceware.org/bugzilla/attachment.cgi?id=6305
Proposed patch for bits/byteswap.h
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/13926] __bswap_64 in bits/byeswap.h only usable by gcc
2012-03-28 13:49 [Bug libc/13926] New: __bswap_64 in bits/byeswap.h only usable by gcc djohnson at osc dot edu
2012-03-28 13:52 ` [Bug libc/13926] " djohnson at osc dot edu
@ 2012-03-28 14:12 ` aj at suse dot de
2012-03-29 16:21 ` bugdal at aerifal dot cx
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: aj at suse dot de @ 2012-03-28 14:12 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13926
Andreas Jaeger <aj at suse dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2012-03-28
CC| |aj at suse dot de
--- Comment #2 from Andreas Jaeger <aj at suse dot de> 2012-03-28 14:04:56 UTC ---
Just checked git head:
This patch is needed for i386, x86-64, and the generic version.
s390 seems to do it right.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/13926] __bswap_64 in bits/byeswap.h only usable by gcc
2012-03-28 13:49 [Bug libc/13926] New: __bswap_64 in bits/byeswap.h only usable by gcc djohnson at osc dot edu
2012-03-28 13:52 ` [Bug libc/13926] " djohnson at osc dot edu
2012-03-28 14:12 ` aj at suse dot de
@ 2012-03-29 16:21 ` bugdal at aerifal dot cx
2012-04-03 7:19 ` aj at suse dot de
2014-06-25 11:26 ` fweimer at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: bugdal at aerifal dot cx @ 2012-03-29 16:21 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13926
Rich Felker <bugdal at aerifal dot cx> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugdal at aerifal dot cx
--- Comment #3 from Rich Felker <bugdal at aerifal dot cx> 2012-03-29 15:15:22 UTC ---
The inline asm for byte swapping is obsolete and useless anyway. Since at least
early gcc 4, gcc already generates the optimal machine code if you just write
the byte swap in the most naive possible way with bitshifts and masking. The
asm should be thrown out and just replaced with static inline functions.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/13926] __bswap_64 in bits/byeswap.h only usable by gcc
2012-03-28 13:49 [Bug libc/13926] New: __bswap_64 in bits/byeswap.h only usable by gcc djohnson at osc dot edu
` (2 preceding siblings ...)
2012-03-29 16:21 ` bugdal at aerifal dot cx
@ 2012-04-03 7:19 ` aj at suse dot de
2014-06-25 11:26 ` fweimer at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: aj at suse dot de @ 2012-04-03 7:19 UTC (permalink / raw)
To: glibc-bugs
http://sourceware.org/bugzilla/show_bug.cgi?id=13926
Andreas Jaeger <aj at suse dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
AssignedTo|unassigned at sourceware |aj at suse dot de
|dot org |
--- Comment #4 from Andreas Jaeger <aj at suse dot de> 2012-04-03 07:18:04 UTC ---
git commit b1aa60f32d34030b28bca04aeee084cd3bedecfa contains a fix.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libc/13926] __bswap_64 in bits/byeswap.h only usable by gcc
2012-03-28 13:49 [Bug libc/13926] New: __bswap_64 in bits/byeswap.h only usable by gcc djohnson at osc dot edu
` (3 preceding siblings ...)
2012-04-03 7:19 ` aj at suse dot de
@ 2014-06-25 11:26 ` fweimer at redhat dot com
4 siblings, 0 replies; 6+ messages in thread
From: fweimer at redhat dot com @ 2014-06-25 11:26 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=13926
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |security-
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-06-25 11:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-28 13:49 [Bug libc/13926] New: __bswap_64 in bits/byeswap.h only usable by gcc djohnson at osc dot edu
2012-03-28 13:52 ` [Bug libc/13926] " djohnson at osc dot edu
2012-03-28 14:12 ` aj at suse dot de
2012-03-29 16:21 ` bugdal at aerifal dot cx
2012-04-03 7:19 ` aj at suse dot de
2014-06-25 11:26 ` fweimer at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).