1//===------- bswapsi2 - Implement bswapsi2 ---------------------------------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "../assembly.h"
11
12//
13// extern uint32_t __bswapsi2(uint32_t);
14//
15// Reverse all the bytes in a 32-bit integer.
16//
17DEFINE_COMPILERRT_FUNCTION(__bswapsi2)
18	rev	r0, r0		// reverse bytes in parameter and put into result register
19	bx	lr
20