diff options
author | 1996-07-18 16:56:55 +0000 | |
---|---|---|
committer | 1996-07-18 16:56:55 +0000 | |
commit | 1762384a20ae6e2abd64e9972e725703beb24f6e (patch) | |
tree | 40e1ed4ea0c1c0ea7cbd5ff941e45b9051106691 /sys/lib/libkern/arch/mips/bcopy.S | |
parent | make pcvt recognize most S3 adapters up to date (diff) | |
download | wireguard-openbsd-1762384a20ae6e2abd64e9972e725703beb24f6e.tar.xz wireguard-openbsd-1762384a20ae6e2abd64e9972e725703beb24f6e.zip |
Add macros to handle endian issues.
Diffstat (limited to 'sys/lib/libkern/arch/mips/bcopy.S')
-rw-r--r-- | sys/lib/libkern/arch/mips/bcopy.S | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/lib/libkern/arch/mips/bcopy.S b/sys/lib/libkern/arch/mips/bcopy.S index 3bfebd20e67..50937442a9e 100644 --- a/sys/lib/libkern/arch/mips/bcopy.S +++ b/sys/lib/libkern/arch/mips/bcopy.S @@ -41,10 +41,10 @@ forward: beq a3, zero, 1f subu a2, a2, a3 # subtract from remaining count /*XXX FIXME Endian dependent */ - lwr v1, 0(a0) # get next 4 bytes (unaligned) - lwl v1, 3(a0) + LWLO v1, 0(a0) # get next 4 bytes (unaligned) + LWHI v1, 3(a0) addu a0, a0, a3 - swr v1, 0(a1) # store 1, 2, or 3 bytes to align a1 + SWLO v1, 0(a1) # store 1, 2, or 3 bytes to align a1 addu a1, a1, a3 1: and v1, a2, 3 # compute number of words left @@ -53,8 +53,8 @@ forward: addu a3, a3, a0 # compute ending address 2: /*XXX FIXME Endian dependent */ - lwr v1, 0(a0) # copy words a0 unaligned, a1 aligned - lwl v1, 3(a0) + LWLO v1, 0(a0) # copy words a0 unaligned, a1 aligned + LWHI v1, 3(a0) addu a0, a0, 4 sw v1, 0(a1) addu a1, a1, 4 @@ -65,9 +65,9 @@ forward: aligned: beq a3, zero, 1f subu a2, a2, a3 # subtract from remaining count - lwr v1, 0(a0) # copy 1, 2, or 3 bytes to align + LWLO v1, 0(a0) # copy 1, 2, or 3 bytes to align addu a0, a0, a3 - swr v1, 0(a1) + SWLO v1, 0(a1) addu a1, a1, a3 1: and v1, a2, 3 # compute number of whole words left |