Summary: | __bswap_64 in bits/byeswap.h only usable by gcc | ||
---|---|---|---|
Product: | glibc | Reporter: | Doug Johnson <djohnson> |
Component: | libc | Assignee: | Andreas Jaeger <aj> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | aj, bugdal, drepper.fsp |
Priority: | P3 | Flags: | fweimer:
security-
|
Version: | 2.15 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | 2012-03-28 00:00:00 | |
Attachments: | Proposed patch for bits/byteswap.h |
Description
Doug Johnson
2012-03-28 13:43:31 UTC
Created attachment 6305 [details]
Proposed patch for bits/byteswap.h
Just checked git head: This patch is needed for i386, x86-64, and the generic version. s390 seems to do it right. 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. git commit b1aa60f32d34030b28bca04aeee084cd3bedecfa contains a fix. |