diff options
author | dfr <dfr@FreeBSD.org> | 2001-10-06 08:35:05 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2001-10-06 08:35:05 +0000 |
commit | 1ccf57de34a8c8d3b3180985e03ffedc96ca8289 (patch) | |
tree | bddf85fac63fbaeb967df3434e1786ec162fadef /sys/libkern | |
parent | b76a3279bdca63c6fc6b203fbed361dd934f9d0b (diff) | |
download | FreeBSD-src-1ccf57de34a8c8d3b3180985e03ffedc96ca8289.zip FreeBSD-src-1ccf57de34a8c8d3b3180985e03ffedc96ca8289.tar.gz |
Implement these using mux1 and extr.u. I'll update the userland versions
similarly. Actually, they should be inline on gcc.
Diffstat (limited to 'sys/libkern')
-rw-r--r-- | sys/libkern/ia64/byte_swap_2.S | 8 | ||||
-rw-r--r-- | sys/libkern/ia64/byte_swap_4.S | 13 |
2 files changed, 7 insertions, 14 deletions
diff --git a/sys/libkern/ia64/byte_swap_2.S b/sys/libkern/ia64/byte_swap_2.S index c758184..fbee3c8 100644 --- a/sys/libkern/ia64/byte_swap_2.S +++ b/sys/libkern/ia64/byte_swap_2.S @@ -39,9 +39,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 */ - ;; - dep ret0=ret0,in0,8,8 /* ret0 = 0x2301 */ +ENTRY(NAME, 1) + mux1 r16=in0,@rev + ;; + extr.u r8=r16,48,16 br.ret.sptk.few rp END(NAME) diff --git a/sys/libkern/ia64/byte_swap_4.S b/sys/libkern/ia64/byte_swap_4.S index b96f3e8..d183644 100644 --- a/sys/libkern/ia64/byte_swap_4.S +++ b/sys/libkern/ia64/byte_swap_4.S @@ -39,16 +39,9 @@ * * Argument is an unsigned 4-byte integer (u_int32_t). */ -ENTRY(NAME, 1) /* in0 = 0x01234567 */ - extr.u r16=in0,0,8 /* r16 = 0x 67 */ - extr.u r17=in0,8,8 /* r17 = 0x 45 */ - extr.u r18=in0,16,8 /* r18 = 0x 23 */ - extr.u ret0=in0,24,8 /* ret0 = 0x 01 */ +ENTRY(NAME, 1) + mux1 r16=in0,@rev ;; - dep ret0=ret0,r16,24,8 /* ret0 = 0x67 01 */ - ;; - dep ret0=ret0,r17,16,8 /* ret0 = 0x6745 01 */ - ;; - dep ret0=ret0,r16,8,8 /* ret0 = 0x67452301 */ + extr.u r8=r16,32,32 br.ret.sptk.few rp END(NAME) |