mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
add a note
llvm-svn: 32347
This commit is contained in:
parent
94eedf9be1
commit
02a2f33279
@ -303,6 +303,16 @@ unsigned int swap_32(unsigned int v) {
|
||||
return v;
|
||||
}
|
||||
|
||||
Nor is this (yes, it really is bswap):
|
||||
|
||||
unsigned long reverse(unsigned v) {
|
||||
unsigned t;
|
||||
t = v ^ ((v << 16) | (v >> 16));
|
||||
t &= ~0xff0000;
|
||||
v = (v << 24) | (v >> 8);
|
||||
return v ^ (t >> 8);
|
||||
}
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
These should turn into single 16-bit (unaligned?) loads on little/big endian
|
||||
|
Loading…
Reference in New Issue
Block a user