diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2013-01-05 11:20:57 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2013-01-05 11:20:57 +0000 |
commit | 34fe484bd1ebda2a0a3be6925defcca214148624 (patch) | |
tree | e109e53aac9f159240d7bd2f6d81eb65a3a3bd78 /sys/lib | |
parent | 7d77ce8ae17a2d60c0c384747a1dfb8dabfca904 (diff) |
Switch m88k ports to ELF.
Diffstat (limited to 'sys/lib')
-rw-r--r-- | sys/lib/libkern/arch/m88k/bzero.S | 92 | ||||
-rw-r--r-- | sys/lib/libkern/arch/m88k/copy_subr.S | 308 |
2 files changed, 200 insertions, 200 deletions
diff --git a/sys/lib/libkern/arch/m88k/bzero.S b/sys/lib/libkern/arch/m88k/bzero.S index 071b3304998..bccf23df58d 100644 --- a/sys/lib/libkern/arch/m88k/bzero.S +++ b/sys/lib/libkern/arch/m88k/bzero.S @@ -1,4 +1,4 @@ -/* $OpenBSD: bzero.S,v 1.1 2006/11/17 22:32:38 miod Exp $ */ +/* $OpenBSD: bzero.S,v 1.2 2013/01/05 11:20:56 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1992 Carnegie Mellon University @@ -43,13 +43,13 @@ * * This is fast. Really fast. Especially for long lengths. */ -#define R_dest r2 -#define R_len r3 +#define R_dest %r2 +#define R_len %r3 -#define R_bytes r4 -#define R_mark_address r5 -#define R_addr r6 /* R_addr && R_temp SHARE */ -#define R_temp r6 /* R_addr && R_temp SHARE */ +#define R_bytes %r4 +#define R_mark_address %r5 +#define R_addr %r6 /* R_addr && R_temp SHARE */ +#define R_temp %r6 /* R_addr && R_temp SHARE */ ENTRY(bzero) /* @@ -68,8 +68,8 @@ ASLOCAL(now_word_aligned) * before we get into the main loop, grab the * address of the label "mark" below. */ - or.u R_mark_address, r0, hi16(_ASM_LABEL(mark)) - or R_mark_address, R_mark_address, lo16(_ASM_LABEL(mark)) + or.u R_mark_address, %r0, %hi16(_ASM_LABEL(mark)) + or R_mark_address, R_mark_address, %lo16(_ASM_LABEL(mark)) ASLOCAL(top_of_main_loop) #define MAX_AT_ONE_TIME 128 @@ -108,7 +108,7 @@ ASLOCAL(top_of_main_loop) * so if you change things here, WATCH OUT. */ br.n do_max - or R_bytes, r0, MAX_AT_ONE_TIME + or R_bytes, %r0, MAX_AT_ONE_TIME 1: /* @@ -126,38 +126,38 @@ ASLOCAL(top_of_main_loop) ASLOCAL(do_max) subu R_len, R_len, R_bytes /* NOTE: this is in the delay slot! */ - st r0, R_dest, 0x7c /* 128 */ - st r0, R_dest, 0x78 /* 124 */ - st r0, R_dest, 0x74 /* 120 */ - st r0, R_dest, 0x70 /* 116 */ - st r0, R_dest, 0x6c /* 112 */ - st r0, R_dest, 0x68 /* 108 */ - st r0, R_dest, 0x64 /* 104 */ - st r0, R_dest, 0x60 /* 100 */ - st r0, R_dest, 0x5c /* 96 */ - st r0, R_dest, 0x58 /* 92 */ - st r0, R_dest, 0x54 /* 88 */ - st r0, R_dest, 0x50 /* 84 */ - st r0, R_dest, 0x4c /* 80 */ - st r0, R_dest, 0x48 /* 76 */ - st r0, R_dest, 0x44 /* 72 */ - st r0, R_dest, 0x40 /* 68 */ - st r0, R_dest, 0x3c /* 64 */ - st r0, R_dest, 0x38 /* 60 */ - st r0, R_dest, 0x34 /* 56 */ - st r0, R_dest, 0x30 /* 52 */ - st r0, R_dest, 0x2c /* 44 */ - st r0, R_dest, 0x28 /* 40 */ - st r0, R_dest, 0x24 /* 36 */ - st r0, R_dest, 0x20 /* 32 */ - st r0, R_dest, 0x1c /* 28 */ - st r0, R_dest, 0x18 /* 24 */ - st r0, R_dest, 0x14 /* 20 */ - st r0, R_dest, 0x10 /* 16 */ - st r0, R_dest, 0x0c /* 12 */ - st r0, R_dest, 0x08 /* 8 */ - st r0, R_dest, 0x04 /* 4 */ - st r0, R_dest, 0x00 /* 0 */ + st %r0, R_dest, 0x7c /* 128 */ + st %r0, R_dest, 0x78 /* 124 */ + st %r0, R_dest, 0x74 /* 120 */ + st %r0, R_dest, 0x70 /* 116 */ + st %r0, R_dest, 0x6c /* 112 */ + st %r0, R_dest, 0x68 /* 108 */ + st %r0, R_dest, 0x64 /* 104 */ + st %r0, R_dest, 0x60 /* 100 */ + st %r0, R_dest, 0x5c /* 96 */ + st %r0, R_dest, 0x58 /* 92 */ + st %r0, R_dest, 0x54 /* 88 */ + st %r0, R_dest, 0x50 /* 84 */ + st %r0, R_dest, 0x4c /* 80 */ + st %r0, R_dest, 0x48 /* 76 */ + st %r0, R_dest, 0x44 /* 72 */ + st %r0, R_dest, 0x40 /* 68 */ + st %r0, R_dest, 0x3c /* 64 */ + st %r0, R_dest, 0x38 /* 60 */ + st %r0, R_dest, 0x34 /* 56 */ + st %r0, R_dest, 0x30 /* 52 */ + st %r0, R_dest, 0x2c /* 44 */ + st %r0, R_dest, 0x28 /* 40 */ + st %r0, R_dest, 0x24 /* 36 */ + st %r0, R_dest, 0x20 /* 32 */ + st %r0, R_dest, 0x1c /* 28 */ + st %r0, R_dest, 0x18 /* 24 */ + st %r0, R_dest, 0x14 /* 20 */ + st %r0, R_dest, 0x10 /* 16 */ + st %r0, R_dest, 0x0c /* 12 */ + st %r0, R_dest, 0x08 /* 8 */ + st %r0, R_dest, 0x04 /* 4 */ + st %r0, R_dest, 0x00 /* 0 */ ASLOCAL(mark) br.n _ASM_LABEL(top_of_main_loop) @@ -165,21 +165,21 @@ ASLOCAL(mark) ASLOCAL(done_doing_words) bcnd ne0, R_len, 1f - jmp r1 + jmp %r1 1: subu R_len, R_len, 1 bcnd.n ne0, R_len, 1b - st.b r0, R_dest, R_len + st.b %r0, R_dest, R_len 1: - jmp r1 + jmp %r1 ASLOCAL(not_initially_word_aligned) /* * Bzero to word-align the address (at least if the length allows it). */ bcnd eq0, R_len, 1b - st.b r0, R_dest, 0 + st.b %r0, R_dest, 0 addu R_dest, R_dest, 1 mask R_temp, R_dest, 0x3 bcnd.n eq0, R_temp, _ASM_LABEL(now_word_aligned) diff --git a/sys/lib/libkern/arch/m88k/copy_subr.S b/sys/lib/libkern/arch/m88k/copy_subr.S index ea01b0c95fd..2cadfdd178b 100644 --- a/sys/lib/libkern/arch/m88k/copy_subr.S +++ b/sys/lib/libkern/arch/m88k/copy_subr.S @@ -1,4 +1,4 @@ -/* $OpenBSD: copy_subr.S,v 1.3 2011/01/27 20:42:47 miod Exp $ */ +/* $OpenBSD: copy_subr.S,v 1.4 2013/01/05 11:20:56 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1992 Carnegie Mellon University @@ -36,14 +36,14 @@ */ #if defined(MEMCPY) || defined(MEMMOVE) -#define SRC r3 -#define DEST r2 -#define SAVE r5 +#define SRC %r3 +#define DEST %r2 +#define SAVE %r5 #else -#define SRC r2 -#define DEST r3 +#define SRC %r2 +#define DEST %r3 #endif -#define LEN r4 +#define LEN %r4 #ifdef MEMCPY ENTRY(memcpy) @@ -59,7 +59,7 @@ ENTRY(ovbcopy) #endif #if defined(MEMCPY) || defined(MEMMOVE) - or SAVE, DEST, r0 + or SAVE, DEST, %r0 #endif bcnd eq0,LEN,_ASM_LABEL(bcopy_out) /* nothing to do if == 0 */ @@ -67,41 +67,41 @@ ENTRY(ovbcopy) /* * check position of source and destination data */ - cmp r9,SRC,DEST /* compare source address to destination */ - bb1 eq,r9,_ASM_LABEL(bcopy_out) /* nothing to do if equal */ + cmp %r9,SRC,DEST /* compare source address to destination */ + bb1 eq,%r9,_ASM_LABEL(bcopy_out) /* nothing to do if equal */ #if defined(MEMMOVE) || defined(OVBCOPY) - bb1 lo,r9,_ASM_LABEL(bcopy_reverse) /* reverse copy if src < dest */ + bb1 lo,%r9,_ASM_LABEL(bcopy_reverse) /* reverse copy if src < dest */ #endif /* * source address is greater than destination address, or we do * not have to care about overlapping areas: copy forward */ - cmp r9,LEN,16 /* see if we have at least 16 bytes */ - bb1 lt,r9,_ASM_LABEL(f_byte_copy) /* copy bytes for small data length */ + cmp %r9,LEN,16 /* see if we have at least 16 bytes */ + bb1 lt,%r9,_ASM_LABEL(f_byte_copy) /* copy bytes for small data length */ /* * determine copy strategy based on alignment of source and destination */ - mask r6,SRC,3 /* get 2 low order bits of source address */ - mask r7,DEST,3 /* get 2 low order bits of destination addr */ - mak r6,r6,0<4> /* convert source bits to table offset */ - mak r7,r7,0<2> /* convert destination bits to table offset */ - or.u r12,r0,hi16(_ASM_LABEL(f_strat)) - or r12,r12,lo16(_ASM_LABEL(f_strat)) - addu r6,r6,r7 /* compute final table offset for strategy */ - ld r12,r12,r6 /* load the strategy routine */ - jmp r12 /* branch to strategy routine */ + mask %r6,SRC,3 /* get 2 low order bits of source address */ + mask %r7,DEST,3 /* get 2 low order bits of destination addr */ + mak %r6,%r6,0<4> /* convert source bits to table offset */ + mak %r7,%r7,0<2> /* convert destination bits to table offset */ + or.u %r12,%r0,%hi16(_ASM_LABEL(f_strat)) + or %r12,%r12,%lo16(_ASM_LABEL(f_strat)) + addu %r6,%r6,%r7 /* compute final table offset for strategy */ + ld %r12,%r12,%r6 /* load the strategy routine */ + jmp %r12 /* branch to strategy routine */ /* * Copy three bytes from src to destination then copy words */ ASLOCAL(f_3byte_word_copy) - ld.bu r6,SRC,0 /* load byte from source */ - ld.bu r7,SRC,1 /* load byte from source */ - ld.bu r8,SRC,2 /* load byte from source */ - st.b r6,DEST,0 /* store byte to destination */ - st.b r7,DEST,1 /* store byte to destination */ - st.b r8,DEST,2 /* store byte to destination */ + ld.bu %r6,SRC,0 /* load byte from source */ + ld.bu %r7,SRC,1 /* load byte from source */ + ld.bu %r8,SRC,2 /* load byte from source */ + st.b %r6,DEST,0 /* store byte to destination */ + st.b %r7,DEST,1 /* store byte to destination */ + st.b %r8,DEST,2 /* store byte to destination */ addu SRC,SRC,3 /* increment source pointer */ addu DEST,DEST,3 /* increment destination pointer */ br.n _ASM_LABEL(f_word_copy) /* copy full words */ @@ -111,8 +111,8 @@ ASLOCAL(f_3byte_word_copy) * Copy 1 halfword from src to destination then copy words */ ASLOCAL(f_1half_word_copy) - ld.hu r6,SRC,0 /* load half-word from source */ - st.h r6,DEST,0 /* store half-word to destination */ + ld.hu %r6,SRC,0 /* load half-word from source */ + st.h %r6,DEST,0 /* store half-word to destination */ addu SRC,SRC,2 /* increment source pointer */ addu DEST,DEST,2 /* increment destination pointer */ br.n _ASM_LABEL(f_word_copy) /* copy full words */ @@ -122,8 +122,8 @@ ASLOCAL(f_1half_word_copy) * Copy 1 byte from src to destination then copy words */ ASLOCAL(f_1byte_word_copy) - ld.bu r6,SRC,0 /* load 1 byte from source */ - st.b r6,DEST,0 /* store 1 byte to destination */ + ld.bu %r6,SRC,0 /* load 1 byte from source */ + st.b %r6,DEST,0 /* store 1 byte to destination */ addu SRC,SRC,1 /* increment source pointer */ addu DEST,DEST,1 /* increment destination pointer */ subu LEN,LEN,1 /* decrement remaining length */ @@ -132,48 +132,48 @@ ASLOCAL(f_1byte_word_copy) * Copy as many full words as possible, 4 words per loop */ ASLOCAL(f_word_copy) - cmp r10,LEN,16 /* see if we have 16 bytes remaining */ - bb1 lo,r10,_ASM_LABEL(f_byte_copy) /* not enough left, copy bytes */ - ld r6,SRC,0 /* load first word */ - ld r7,SRC,4 /* load second word */ - ld r8,SRC,8 /* load third word */ - ld r9,SRC,12 /* load fourth word */ - st r6,DEST,0 /* store first word */ - st r7,DEST,4 /* store second word */ - st r8,DEST,8 /* store third word */ - st r9,DEST,12 /* store fourth word */ + cmp %r10,LEN,16 /* see if we have 16 bytes remaining */ + bb1 lo,%r10,_ASM_LABEL(f_byte_copy) /* not enough left, copy bytes */ + ld %r6,SRC,0 /* load first word */ + ld %r7,SRC,4 /* load second word */ + ld %r8,SRC,8 /* load third word */ + ld %r9,SRC,12 /* load fourth word */ + st %r6,DEST,0 /* store first word */ + st %r7,DEST,4 /* store second word */ + st %r8,DEST,8 /* store third word */ + st %r9,DEST,12 /* store fourth word */ addu SRC,SRC,16 /* increment source pointer */ addu DEST,DEST,16 /* increment destination pointer */ br.n _ASM_LABEL(f_word_copy) /* branch to copy another block */ subu LEN,LEN,16 /* decrement remaining length */ ASLOCAL(f_1byte_half_copy) - ld.bu r6,SRC,0 /* load 1 byte from source */ - st.b r6,DEST,0 /* store 1 byte to destination */ + ld.bu %r6,SRC,0 /* load 1 byte from source */ + st.b %r6,DEST,0 /* store 1 byte to destination */ addu SRC,SRC,1 /* increment source pointer */ addu DEST,DEST,1 /* increment destination pointer */ subu LEN,LEN,1 /* decrement remaining length */ /* FALLTHROUGH */ ASLOCAL(f_half_copy) - cmp r10,LEN,16 /* see if we have 16 bytes remaining */ - bb1 lo,r10,_ASM_LABEL(f_byte_copy) /* not enough left, copy bytes */ - ld.hu r6,SRC,0 /* load first half-word */ - ld.hu r7,SRC,2 /* load second half-word */ - ld.hu r8,SRC,4 /* load third half-word */ - ld.hu r9,SRC,6 /* load fourth half-word */ - ld.hu r10,SRC,8 /* load fifth half-word */ - ld.hu r11,SRC,10 /* load sixth half-word */ - ld.hu r12,SRC,12 /* load seventh half-word */ - ld.hu r13,SRC,14 /* load eighth half-word */ - st.h r6,DEST,0 /* store first half-word */ - st.h r7,DEST,2 /* store second half-word */ - st.h r8,DEST,4 /* store third half-word */ - st.h r9,DEST,6 /* store fourth half-word */ - st.h r10,DEST,8 /* store fifth half-word */ - st.h r11,DEST,10 /* store sixth half-word */ - st.h r12,DEST,12 /* store seventh half-word */ - st.h r13,DEST,14 /* store eighth half-word */ + cmp %r10,LEN,16 /* see if we have 16 bytes remaining */ + bb1 lo,%r10,_ASM_LABEL(f_byte_copy) /* not enough left, copy bytes */ + ld.hu %r6,SRC,0 /* load first half-word */ + ld.hu %r7,SRC,2 /* load second half-word */ + ld.hu %r8,SRC,4 /* load third half-word */ + ld.hu %r9,SRC,6 /* load fourth half-word */ + ld.hu %r10,SRC,8 /* load fifth half-word */ + ld.hu %r11,SRC,10 /* load sixth half-word */ + ld.hu %r12,SRC,12 /* load seventh half-word */ + ld.hu %r13,SRC,14 /* load eighth half-word */ + st.h %r6,DEST,0 /* store first half-word */ + st.h %r7,DEST,2 /* store second half-word */ + st.h %r8,DEST,4 /* store third half-word */ + st.h %r9,DEST,6 /* store fourth half-word */ + st.h %r10,DEST,8 /* store fifth half-word */ + st.h %r11,DEST,10 /* store sixth half-word */ + st.h %r12,DEST,12 /* store seventh half-word */ + st.h %r13,DEST,14 /* store eighth half-word */ addu SRC,SRC,16 /* increment source pointer */ addu DEST,DEST,16 /* increment destination pointer */ br.n _ASM_LABEL(f_half_copy) /* branch to copy another block */ @@ -181,8 +181,8 @@ ASLOCAL(f_half_copy) ASLOCAL(f_byte_copy) bcnd eq0,LEN,_ASM_LABEL(bcopy_out) /* branch if nothing left to copy */ - ld.bu r6,SRC,0 /* load byte from source */ - st.b r6,DEST,0 /* store byte in destination */ + ld.bu %r6,SRC,0 /* load byte from source */ + st.b %r6,DEST,0 /* store byte in destination */ addu SRC,SRC,1 /* increment source pointer */ addu DEST,DEST,1 /* increment destination pointer */ br.n _ASM_LABEL(f_byte_copy) /* branch for next byte */ @@ -201,20 +201,20 @@ ASLOCAL(bcopy_reverse) /* * check for short data */ - cmp r9,LEN,16 /* see if we have at least 16 bytes */ - bb1 lt,r9,_ASM_LABEL(r_byte_copy) /* copy bytes for small data length */ + cmp %r9,LEN,16 /* see if we have at least 16 bytes */ + bb1 lt,%r9,_ASM_LABEL(r_byte_copy) /* copy bytes for small data length */ /* * determine copy strategy based on alignment of source and destination */ - mask r6,SRC,3 /* get 2 low order bits of source address */ - mask r7,DEST,3 /* get 2 low order bits of destination addr */ - mak r6,r6,0<4> /* convert source bits to table offset */ - mak r7,r7,0<2> /* convert destination bits to table offset */ - or.u r12,r0,hi16(_ASM_LABEL(r_strat)) - or r12,r12,lo16(_ASM_LABEL(r_strat)) - addu r6,r6,r7 /* compute final table offset for strategy */ - ld r12,r12,r6 /* load the strategy routine */ - jmp r12 /* branch to strategy routine */ + mask %r6,SRC,3 /* get 2 low order bits of source address */ + mask %r7,DEST,3 /* get 2 low order bits of destination addr */ + mak %r6,%r6,0<4> /* convert source bits to table offset */ + mak %r7,%r7,0<2> /* convert destination bits to table offset */ + or.u %r12,%r0,%hi16(_ASM_LABEL(r_strat)) + or %r12,%r12,%lo16(_ASM_LABEL(r_strat)) + addu %r6,%r6,%r7 /* compute final table offset for strategy */ + ld %r12,%r12,%r6 /* load the strategy routine */ + jmp %r12 /* branch to strategy routine */ /* * Copy three bytes from src to destination then copy words @@ -222,12 +222,12 @@ ASLOCAL(bcopy_reverse) ASLOCAL(r_3byte_word_copy) subu SRC,SRC,3 /* decrement source pointer */ subu DEST,DEST,3 /* decrement destination pointer */ - ld.bu r6,SRC,0 /* load byte from source */ - ld.bu r7,SRC,1 /* load byte from source */ - ld.bu r8,SRC,2 /* load byte from source */ - st.b r6,DEST,0 /* store byte to destination */ - st.b r7,DEST,1 /* store byte to destination */ - st.b r8,DEST,2 /* store byte to destination */ + ld.bu %r6,SRC,0 /* load byte from source */ + ld.bu %r7,SRC,1 /* load byte from source */ + ld.bu %r8,SRC,2 /* load byte from source */ + st.b %r6,DEST,0 /* store byte to destination */ + st.b %r7,DEST,1 /* store byte to destination */ + st.b %r8,DEST,2 /* store byte to destination */ br.n _ASM_LABEL(r_word_copy) /* copy full words */ subu LEN,LEN,3 /* decrement length */ @@ -237,8 +237,8 @@ ASLOCAL(r_3byte_word_copy) ASLOCAL(r_1half_word_copy) subu SRC,SRC,2 /* decrement source pointer */ subu DEST,DEST,2 /* decrement destination pointer */ - ld.hu r6,SRC,0 /* load half-word from source */ - st.h r6,DEST,0 /* store half-word to destination */ + ld.hu %r6,SRC,0 /* load half-word from source */ + st.h %r6,DEST,0 /* store half-word to destination */ br.n _ASM_LABEL(r_word_copy) /* copy full words */ subu LEN,LEN,2 /* decrement remaining length */ @@ -248,58 +248,58 @@ ASLOCAL(r_1half_word_copy) ASLOCAL(r_1byte_word_copy) subu SRC,SRC,1 /* decrement source pointer */ subu DEST,DEST,1 /* decrement destination pointer */ - ld.bu r6,SRC,0 /* load 1 byte from source */ - st.b r6,DEST,0 /* store 1 byte to destination */ + ld.bu %r6,SRC,0 /* load 1 byte from source */ + st.b %r6,DEST,0 /* store 1 byte to destination */ subu LEN,LEN,1 /* decrement remaining length */ /* FALLTHROUGH */ /* * Copy as many full words as possible, 4 words per loop */ ASLOCAL(r_word_copy) - cmp r10,LEN,16 /* see if we have 16 bytes remaining */ - bb1 lo,r10,_ASM_LABEL(r_byte_copy) /* not enough left, copy bytes */ + cmp %r10,LEN,16 /* see if we have 16 bytes remaining */ + bb1 lo,%r10,_ASM_LABEL(r_byte_copy) /* not enough left, copy bytes */ subu SRC,SRC,16 /* decrement source pointer */ subu DEST,DEST,16 /* decrement destination pointer */ - ld r6,SRC,0 /* load first word */ - ld r7,SRC,4 /* load second word */ - ld r8,SRC,8 /* load third word */ - ld r9,SRC,12 /* load fourth word */ - st r6,DEST,0 /* store first word */ - st r7,DEST,4 /* store second word */ - st r8,DEST,8 /* store third word */ - st r9,DEST,12 /* store fourth word */ + ld %r6,SRC,0 /* load first word */ + ld %r7,SRC,4 /* load second word */ + ld %r8,SRC,8 /* load third word */ + ld %r9,SRC,12 /* load fourth word */ + st %r6,DEST,0 /* store first word */ + st %r7,DEST,4 /* store second word */ + st %r8,DEST,8 /* store third word */ + st %r9,DEST,12 /* store fourth word */ br.n _ASM_LABEL(r_word_copy) /* branch to copy another block */ subu LEN,LEN,16 /* decrement remaining length */ ASLOCAL(r_1byte_half_copy) subu SRC,SRC,1 /* decrement source pointer */ subu DEST,DEST,1 /* decrement destination pointer */ - ld.bu r6,SRC,0 /* load 1 byte from source */ - st.b r6,DEST,0 /* store 1 byte to destination */ + ld.bu %r6,SRC,0 /* load 1 byte from source */ + st.b %r6,DEST,0 /* store 1 byte to destination */ subu LEN,LEN,1 /* decrement remaining length */ /* FALLTHROUGH */ ASLOCAL(r_half_copy) - cmp r10,LEN,16 /* see if we have 16 bytes remaining */ - bb1 lo,r10,_ASM_LABEL(r_byte_copy) /* not enough left, copy bytes */ + cmp %r10,LEN,16 /* see if we have 16 bytes remaining */ + bb1 lo,%r10,_ASM_LABEL(r_byte_copy) /* not enough left, copy bytes */ subu SRC,SRC,16 /* decrement source pointer */ subu DEST,DEST,16 /* decrement destination pointer */ - ld.hu r6,SRC,0 /* load first half-word */ - ld.hu r7,SRC,2 /* load second half-word */ - ld.hu r8,SRC,4 /* load third half-word */ - ld.hu r9,SRC,6 /* load fourth half-word */ - ld.hu r10,SRC,8 /* load fifth half-word */ - ld.hu r11,SRC,10 /* load sixth half-word */ - ld.hu r12,SRC,12 /* load seventh half-word */ - ld.hu r13,SRC,14 /* load eighth half-word */ - st.h r6,DEST,0 /* store first half-word */ - st.h r7,DEST,2 /* store second half-word */ - st.h r8,DEST,4 /* store third half-word */ - st.h r9,DEST,6 /* store fourth half-word */ - st.h r10,DEST,8 /* store fifth half-word */ - st.h r11,DEST,10 /* store sixth half-word */ - st.h r12,DEST,12 /* store seventh half-word */ - st.h r13,DEST,14 /* store eighth half-word */ + ld.hu %r6,SRC,0 /* load first half-word */ + ld.hu %r7,SRC,2 /* load second half-word */ + ld.hu %r8,SRC,4 /* load third half-word */ + ld.hu %r9,SRC,6 /* load fourth half-word */ + ld.hu %r10,SRC,8 /* load fifth half-word */ + ld.hu %r11,SRC,10 /* load sixth half-word */ + ld.hu %r12,SRC,12 /* load seventh half-word */ + ld.hu %r13,SRC,14 /* load eighth half-word */ + st.h %r6,DEST,0 /* store first half-word */ + st.h %r7,DEST,2 /* store second half-word */ + st.h %r8,DEST,4 /* store third half-word */ + st.h %r9,DEST,6 /* store fourth half-word */ + st.h %r10,DEST,8 /* store fifth half-word */ + st.h %r11,DEST,10 /* store sixth half-word */ + st.h %r12,DEST,12 /* store seventh half-word */ + st.h %r13,DEST,14 /* store eighth half-word */ br.n _ASM_LABEL(r_half_copy) /* branch to copy another block */ subu LEN,LEN,16 /* decrement remaining length */ @@ -307,56 +307,56 @@ ASLOCAL(r_byte_copy) bcnd eq0,LEN,_ASM_LABEL(bcopy_out) /* branch if nothing left to copy */ subu SRC,SRC,1 /* decrement source pointer */ subu DEST,DEST,1 /* decrement destination pointer */ - ld.bu r6,SRC,0 /* load byte from source */ - st.b r6,DEST,0 /* store byte in destination */ + ld.bu %r6,SRC,0 /* load byte from source */ + st.b %r6,DEST,0 /* store byte in destination */ br.n _ASM_LABEL(r_byte_copy) /* branch for next byte */ subu LEN,LEN,1 /* decrement remaining length */ #endif /* MEMMOVE || OVBCOPY */ ASLOCAL(bcopy_out) #if defined(MEMCPY) || defined(MEMMOVE) - jmp.n r1 /* all done, return to caller */ - or r2, SAVE, r0 + jmp.n %r1 /* all done, return to caller */ + or %r2, SAVE, %r0 #else - jmp r1 /* all done, return to caller */ + jmp %r1 /* all done, return to caller */ #endif - data - align 4 + .data + .align 2 ASLOCAL(f_strat) - word _ASM_LABEL(f_word_copy) - word _ASM_LABEL(f_byte_copy) - word _ASM_LABEL(f_half_copy) - word _ASM_LABEL(f_byte_copy) - word _ASM_LABEL(f_byte_copy) - word _ASM_LABEL(f_3byte_word_copy) - word _ASM_LABEL(f_byte_copy) - word _ASM_LABEL(f_1byte_half_copy) - word _ASM_LABEL(f_half_copy) - word _ASM_LABEL(f_byte_copy) - word _ASM_LABEL(f_1half_word_copy) - word _ASM_LABEL(f_byte_copy) - word _ASM_LABEL(f_byte_copy) - word _ASM_LABEL(f_1byte_half_copy) - word _ASM_LABEL(f_byte_copy) - word _ASM_LABEL(f_1byte_word_copy) + .word _ASM_LABEL(f_word_copy) + .word _ASM_LABEL(f_byte_copy) + .word _ASM_LABEL(f_half_copy) + .word _ASM_LABEL(f_byte_copy) + .word _ASM_LABEL(f_byte_copy) + .word _ASM_LABEL(f_3byte_word_copy) + .word _ASM_LABEL(f_byte_copy) + .word _ASM_LABEL(f_1byte_half_copy) + .word _ASM_LABEL(f_half_copy) + .word _ASM_LABEL(f_byte_copy) + .word _ASM_LABEL(f_1half_word_copy) + .word _ASM_LABEL(f_byte_copy) + .word _ASM_LABEL(f_byte_copy) + .word _ASM_LABEL(f_1byte_half_copy) + .word _ASM_LABEL(f_byte_copy) + .word _ASM_LABEL(f_1byte_word_copy) #if defined(MEMMOVE) || defined(OVBCOPY) ASLOCAL(r_strat) - word _ASM_LABEL(r_word_copy) - word _ASM_LABEL(r_byte_copy) - word _ASM_LABEL(r_half_copy) - word _ASM_LABEL(r_byte_copy) - word _ASM_LABEL(r_byte_copy) - word _ASM_LABEL(r_1byte_word_copy) - word _ASM_LABEL(r_byte_copy) - word _ASM_LABEL(r_1byte_half_copy) - word _ASM_LABEL(r_half_copy) - word _ASM_LABEL(r_byte_copy) - word _ASM_LABEL(r_1half_word_copy) - word _ASM_LABEL(r_byte_copy) - word _ASM_LABEL(r_byte_copy) - word _ASM_LABEL(r_1byte_half_copy) - word _ASM_LABEL(r_byte_copy) - word _ASM_LABEL(r_3byte_word_copy) + .word _ASM_LABEL(r_word_copy) + .word _ASM_LABEL(r_byte_copy) + .word _ASM_LABEL(r_half_copy) + .word _ASM_LABEL(r_byte_copy) + .word _ASM_LABEL(r_byte_copy) + .word _ASM_LABEL(r_1byte_word_copy) + .word _ASM_LABEL(r_byte_copy) + .word _ASM_LABEL(r_1byte_half_copy) + .word _ASM_LABEL(r_half_copy) + .word _ASM_LABEL(r_byte_copy) + .word _ASM_LABEL(r_1half_word_copy) + .word _ASM_LABEL(r_byte_copy) + .word _ASM_LABEL(r_byte_copy) + .word _ASM_LABEL(r_1byte_half_copy) + .word _ASM_LABEL(r_byte_copy) + .word _ASM_LABEL(r_3byte_word_copy) #endif |