2009-09-12 09:23:48 +08:00
|
|
|
//===------- bswapsi2 - Implement bswapsi2 ---------------------------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2009-10-28 01:49:50 +08:00
|
|
|
#include "../assembly.h"
|
2009-09-12 09:23:48 +08:00
|
|
|
|
|
|
|
//
|
|
|
|
// extern uint32_t __bswapsi2(uint32_t);
|
|
|
|
//
|
2009-09-14 02:34:39 +08:00
|
|
|
// Reverse all the bytes in a 32-bit integer.
|
2009-09-12 09:23:48 +08:00
|
|
|
//
|
2010-04-22 06:36:23 +08:00
|
|
|
.align 2
|
2009-10-28 01:50:21 +08:00
|
|
|
DEFINE_COMPILERRT_FUNCTION(__bswapsi2)
|
2009-09-12 09:23:48 +08:00
|
|
|
rev r0, r0 // reverse bytes in parameter and put into result register
|
|
|
|
bx lr
|