From b77b26742e0fd864facc1fa2512bb45391ad78e6 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 4 May 1998 12:36:59 +0000 Subject: fixed swap of unsigned16 --- c/src/exec/score/cpu/sh/sh.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'c/src/exec/score/cpu/sh') diff --git a/c/src/exec/score/cpu/sh/sh.h b/c/src/exec/score/cpu/sh/sh.h index b6491128ed..03d9077d3e 100644 --- a/c/src/exec/score/cpu/sh/sh.h +++ b/c/src/exec/score/cpu/sh/sh.h @@ -122,25 +122,25 @@ static inline unsigned int sh_swap_u32( unsigned int value ) { - register unsigned int swapped ; + register unsigned int swapped; asm volatile ( - "swap.b %1,%0 - swap.w %0,%0 - swap.b %0,%0" + "swap.b %1,%0; " + "swap.w %0,%0; " + "swap.b %0,%0" : "=r" (swapped) : "r" (value) ); return( swapped ); } -static inline unsigned int sh_swap_u32( +static inline unsigned int sh_swap_u16( unsigned int value ) { register unsigned int swapped ; - asm volatile ( "swap.b %1,%0 : "=r" (swapped) : "r" (value) ); + asm volatile ( "swap.b %1,%0" : "=r" (swapped) : "r" (value) ); return( swapped ); } -- cgit v1.2.3