summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score/cpu/sh
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-04-27 16:10:16 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-04-27 16:10:16 +0000
commitb0aba4c46b14204f7de6471512136de7003877c4 (patch)
treec3128754275e49fb155f41a327d5938385395cb8 /c/src/exec/score/cpu/sh
parentFixed spelling errors. (diff)
downloadrtems-b0aba4c46b14204f7de6471512136de7003877c4.tar.bz2
Added swap of unsigned16
Diffstat (limited to 'c/src/exec/score/cpu/sh')
-rw-r--r--c/src/exec/score/cpu/sh/sh.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/c/src/exec/score/cpu/sh/sh.h b/c/src/exec/score/cpu/sh/sh.h
index 1561732c33..b6491128ed 100644
--- a/c/src/exec/score/cpu/sh/sh.h
+++ b/c/src/exec/score/cpu/sh/sh.h
@@ -134,7 +134,19 @@ static inline unsigned int sh_swap_u32(
return( swapped );
}
+static inline unsigned int sh_swap_u32(
+ unsigned int value
+)
+{
+ register unsigned int swapped ;
+
+ asm volatile ( "swap.b %1,%0 : "=r" (swapped) : "r" (value) );
+
+ return( swapped );
+}
+
#define CPU_swap_u32( value ) sh_swap_u32( value )
+#define CPU_swap_u16( value ) sh_swap_u16( value )
/*
* Simple spin delay in microsecond units for device drivers.