aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-11-29 01:48:01 +0000
committerChris Lattner <sabre@nondot.org>2006-11-29 01:48:01 +0000
commit5d52135a14da7ed417122b65e5493d9f15f2423c (patch)
treedead7c22d53980109a04360023802002b7281c6b /test
parenta5a57d66f5717873dbf3c48b174c0b0ce54b6612 (diff)
Upgrade the ugly darwin 64-bit bswap idiom (bswap %eax / bswap %edx /
xchgl %eax, %edx) to llvm.bswap.i64. This compiles: long long test2(long long A) { return _OSSwapInt64(A); } to: _test2: movl 8(%esp), %eax movl 4(%esp), %edx bswapl %eax bswapl %edx ret instead of: _test2: movl 8(%esp), %edx movl 4(%esp), %eax bswap %eax bswap %edx xchgl %eax, %edx ret GCC manages (with -fomit-frame-pointer) the uglier: _test2: subl $4, %esp movl 8(%esp), %eax movl 12(%esp), %edx bswap %eax bswap %edx xchgl %eax, %edx addl $4, %esp ret git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32001 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions