diff options
author | dfr <dfr@FreeBSD.org> | 2001-09-22 18:22:53 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2001-09-22 18:22:53 +0000 |
commit | 8a0f924b1537b2acc7e02a5f545e5bc79f3dd40e (patch) | |
tree | 016b03b66aa56c190c444755df79683d1e4f47f6 /lib/libc/ia64/net/byte_swap_2.S | |
parent | 0e9a3ecd09c9a1c980b455127f6835e4e29b17d8 (diff) | |
download | FreeBSD-src-8a0f924b1537b2acc7e02a5f545e5bc79f3dd40e.zip FreeBSD-src-8a0f924b1537b2acc7e02a5f545e5bc79f3dd40e.tar.gz |
Fix byte swapping - it was totally broken.
Diffstat (limited to 'lib/libc/ia64/net/byte_swap_2.S')
-rw-r--r-- | lib/libc/ia64/net/byte_swap_2.S | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/ia64/net/byte_swap_2.S b/lib/libc/ia64/net/byte_swap_2.S index c758184..26073af 100644 --- a/lib/libc/ia64/net/byte_swap_2.S +++ b/lib/libc/ia64/net/byte_swap_2.S @@ -40,8 +40,9 @@ * Argument is an unsigned 2-byte integer (u_int16_t). */ ENTRY(NAME, 1) /* in0 = 0x0123 */ - extr.u ret0=in0,8,8 /* ret0 = 0x 01 */ + extr.u r2=in0,8,8 /* r2 = 0x 01 */ + dep r3=in0,r0,8,8 /* r3 = 0x23 */ ;; - dep ret0=ret0,in0,8,8 /* ret0 = 0x2301 */ + or ret0=r2,r3 /* ret0 = 0x2301 */ br.ret.sptk.few rp END(NAME) |