summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-12-08 02:01:32 +0000
committerChris Lattner <sabre@nondot.org>2006-12-08 02:01:32 +0000
commitf9bae438aa5dce85685de670702250bb930dfc49 (patch)
tree10b24a99c8597e3d604b919e65e017a69e1c291b
parent3b14fbe300b96c353a9abfadf481b64324f17375 (diff)
downloadllvm-f9bae438aa5dce85685de670702250bb930dfc49.tar.gz
llvm-f9bae438aa5dce85685de670702250bb930dfc49.tar.bz2
llvm-f9bae438aa5dce85685de670702250bb930dfc49.tar.xz
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32347 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/README.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt
index 422d021655..c04e06fbfe 100644
--- a/lib/Target/README.txt
+++ b/lib/Target/README.txt
@@ -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