[ARM]
- fixed copyright, - added a naive armv5 implementation for __swap_int{16,32}. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32294 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
68b6dce107
commit
f4e0ad68b3
@ -1,7 +1,7 @@
|
||||
/*
|
||||
** Copyright 2003, Axel D<EFBFBD>fler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
* Copyright 2009, Johannes Wischert. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
#include <asm_defs.h>
|
||||
|
||||
@ -14,7 +14,13 @@ FUNCTION(__swap_int16):
|
||||
rev16 r0,r0;
|
||||
#else
|
||||
#warning IMPLEMENT_ME
|
||||
and r1,r0,#0x000000ff
|
||||
and r2,r0,#0x0000ff00
|
||||
mov r1,r1,LSL #8
|
||||
mov r2,r2,ROR #8
|
||||
orr r0,r1,r2
|
||||
#endif
|
||||
mov pc,lr
|
||||
FUNCTION_END(__swap_int16)
|
||||
|
||||
/* uint32 __swap_int32(uint32 value)
|
||||
@ -24,7 +30,16 @@ FUNCTION(__swap_int32):
|
||||
rev r0,r0;
|
||||
#else
|
||||
#warning IMPLEMENT_ME
|
||||
mov r3,#0xff000000
|
||||
orr r3,#0x0000ff00
|
||||
and r1,r0,r3
|
||||
mov r1,r1,ROR #24
|
||||
mov r3,r3,ROR #8
|
||||
and r2,r0,r3
|
||||
mov r2,r2,ROR #8
|
||||
orr r0,r1,r2
|
||||
#endif
|
||||
mov pc,lr
|
||||
FUNCTION_END(__swap_int32)
|
||||
|
||||
/* uint64 __swap_int64(uint64 value)
|
||||
@ -39,6 +54,7 @@ FUNCTION(__swap_int64):
|
||||
#else
|
||||
#warning IMPLEMENT_ME
|
||||
#endif
|
||||
mov pc,lr
|
||||
FUNCTION_END(__swap_int64)
|
||||
|
||||
/* TODO: The following functions can surely be optimized. A simple optimization
|
||||
|
Loading…
Reference in New Issue
Block a user