summaryrefslogtreecommitdiff
path: root/lib/arm/bswapdi2.S
blob: 7e1aeb177ec513f8a020545eb08a24ccd92d9acb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//===------- bswapdi2 - Implement bswapdi2 ---------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//


//
// extern uint64_t __bswapdi2(uint64_t);
//
// Reverse all the bytes in a 64-bit integer.
//
		.globl ___bswapdi2
___bswapdi2:
	rev	r2, r1		// reverse bytes in high 32-bits into temp2
	rev	r3, r0		// reverse bytes in low 32-bit into temp3
	mov	r0, r2		// set low 32-bits of result to temp2
	mov	r1, r3		// set high 32-bits of result to temp3
	bx	lr