Changeset b77b2674 in rtems


Ignore:
Timestamp:
May 4, 1998, 12:36:59 PM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
5ee559ac
Parents:
10b3c9b
Message:

fixed swap of unsigned16

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/score/cpu/sh/sh.h

    r10b3c9b rb77b2674  
    123123)
    124124{
    125   register unsigned int swapped ;
     125  register unsigned int swapped;
    126126 
    127127  asm volatile (
    128     "swap.b %1,%0
    129      swap.w %0,%0
    130      swap.b %0,%0"
     128    "swap.b %1,%0; "
     129    "swap.w %0,%0; "
     130    "swap.b %0,%0"
    131131    : "=r" (swapped)
    132132    : "r"  (value) );
     
    135135}
    136136
    137 static inline unsigned int sh_swap_u32(
     137static inline unsigned int sh_swap_u16(
    138138  unsigned int value
    139139)
     
    141141  register unsigned int swapped ;
    142142
    143   asm volatile ( "swap.b %1,%0 : "=r" (swapped) : "r"  (value) );
     143  asm volatile ( "swap.b %1,%0" : "=r" (swapped) : "r"  (value) );
    144144
    145145  return( swapped );
Note: See TracChangeset for help on using the changeset viewer.