diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2022-12-06 18:51:01 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2022-12-06 18:51:01 +0000 |
commit | e2b0570e1c23d093b3fa6a5a7bcbf9500e52de0b (patch) | |
tree | 553b7481ee9d6e51c4f1ab981bd82ca55a8e6e21 /sys/lib/libkern/arch | |
parent | 305e15285c45730bb7dad486b98571d7eff1243e (diff) |
_C_LABEL() and _ASM_LABEL() are no longer useful in the "everything
is ELF" world. Eliminate use of them in m88k code.
ok aoyama@
Diffstat (limited to 'sys/lib/libkern/arch')
-rw-r--r-- | sys/lib/libkern/arch/m88k/bzero.S | 18 | ||||
-rw-r--r-- | sys/lib/libkern/arch/m88k/copy_subr.S | 116 |
2 files changed, 67 insertions, 67 deletions
diff --git a/sys/lib/libkern/arch/m88k/bzero.S b/sys/lib/libkern/arch/m88k/bzero.S index a5e03a684b8..20ecefaf583 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.3 2022/01/11 09:21:35 jsg Exp $ */ +/* $OpenBSD: bzero.S,v 1.4 2022/12/06 18:51:00 guenther Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1992 Carnegie Mellon University @@ -60,16 +60,16 @@ ENTRY(bzero) * (of the destination address). If either are set, it's * not word aligned. */ - bb1 0, R_dest, _ASM_LABEL(not_initially_word_aligned) - bb1 1, R_dest, _ASM_LABEL(not_initially_word_aligned) + bb1 0, R_dest, not_initially_word_aligned + bb1 1, R_dest, not_initially_word_aligned 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(mark) + or R_mark_address, R_mark_address, %lo16(mark) ASLOCAL(top_of_main_loop) #define MAX_AT_ONE_TIME 128 @@ -89,7 +89,7 @@ ASLOCAL(top_of_main_loop) clr R_bytes, R_len, 2<0> /* if we're done clearing WORDS, jump out */ - bcnd eq0, R_bytes, _ASM_LABEL(done_doing_words) + bcnd eq0, R_bytes, done_doing_words /* if the number of bytes > MAX_AT_ONE_TIME, do only the max */ cmp R_temp, R_bytes, MAX_AT_ONE_TIME @@ -160,7 +160,7 @@ ASLOCAL(do_max) st %r0, R_dest, 0x00 /* 0 */ ASLOCAL(mark) - br.n _ASM_LABEL(top_of_main_loop) + br.n top_of_main_loop addu R_dest, R_dest, R_bytes /* bump up the dest address */ ASLOCAL(done_doing_words) @@ -182,9 +182,9 @@ ASLOCAL(not_initially_word_aligned) 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) + bcnd.n eq0, R_temp, now_word_aligned subu R_len, R_len, 1 - br _ASM_LABEL(not_initially_word_aligned) + br not_initially_word_aligned #undef R_dest #undef R_len diff --git a/sys/lib/libkern/arch/m88k/copy_subr.S b/sys/lib/libkern/arch/m88k/copy_subr.S index 6f8dcdc0362..212eb369a9d 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.6 2013/06/15 18:38:18 miod Exp $ */ +/* $OpenBSD: copy_subr.S,v 1.7 2022/12/06 18:51:00 guenther Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1992 Carnegie Mellon University @@ -60,15 +60,15 @@ ENTRY(bcopy) or SAVE, DEST, %r0 #endif - bcnd eq0,LEN,_ASM_LABEL(bcopy_out) /* nothing to do if == 0 */ + bcnd eq0,LEN,bcopy_out /* nothing to do if == 0 */ /* * 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 */ + bb1 eq,%r9,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,bcopy_reverse /* reverse copy if src < dest */ #endif /* @@ -76,7 +76,7 @@ ENTRY(bcopy) * 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 */ + bb1 lt,%r9,f_byte_copy /* copy bytes for small data length */ /* * determine copy strategy based on alignment of source and destination */ @@ -84,8 +84,8 @@ ENTRY(bcopy) 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)) + or.u %r12,%r0,%hi16(f_strat) + or %r12,%r12,%lo16(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 */ @@ -102,7 +102,7 @@ ASLOCAL(f_3byte_word_copy) 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 */ + br.n f_word_copy /* copy full words */ subu LEN,LEN,3 /* decrement length */ /* @@ -113,7 +113,7 @@ ASLOCAL(f_1half_word_copy) 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 */ + br.n f_word_copy /* copy full words */ subu LEN,LEN,2 /* decrement remaining length */ /* @@ -131,7 +131,7 @@ ASLOCAL(f_1byte_word_copy) */ 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 */ + bb1 lo,%r10,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 */ @@ -142,7 +142,7 @@ ASLOCAL(f_word_copy) 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 */ + br.n f_word_copy /* branch to copy another block */ subu LEN,LEN,16 /* decrement remaining length */ ASLOCAL(f_1byte_half_copy) @@ -155,7 +155,7 @@ ASLOCAL(f_1byte_half_copy) 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 */ + bb1 lo,%r10,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 */ @@ -174,16 +174,16 @@ ASLOCAL(f_half_copy) 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 */ + br.n f_half_copy /* branch to copy another block */ subu LEN,LEN,16 /* decrement remaining length */ ASLOCAL(f_byte_copy) - bcnd eq0,LEN,_ASM_LABEL(bcopy_out) /* branch if nothing left to copy */ + bcnd eq0,LEN,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 */ 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 */ + br.n f_byte_copy /* branch for next byte */ subu LEN,LEN,1 /* decrement remaining length */ #if defined(MEMMOVE) || defined(OVBCOPY) @@ -200,7 +200,7 @@ 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 */ + bb1 lt,%r9,r_byte_copy /* copy bytes for small data length */ /* * determine copy strategy based on alignment of source and destination */ @@ -208,8 +208,8 @@ ASLOCAL(bcopy_reverse) 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)) + or.u %r12,%r0,%hi16(r_strat) + or %r12,%r12,%lo16(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 */ @@ -226,7 +226,7 @@ ASLOCAL(r_3byte_word_copy) 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 */ + br.n r_word_copy /* copy full words */ subu LEN,LEN,3 /* decrement length */ /* @@ -237,7 +237,7 @@ ASLOCAL(r_1half_word_copy) 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 */ - br.n _ASM_LABEL(r_word_copy) /* copy full words */ + br.n r_word_copy /* copy full words */ subu LEN,LEN,2 /* decrement remaining length */ /* @@ -255,7 +255,7 @@ ASLOCAL(r_1byte_word_copy) */ 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 */ + bb1 lo,%r10,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 */ @@ -266,7 +266,7 @@ ASLOCAL(r_word_copy) 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 */ + br.n r_word_copy /* branch to copy another block */ subu LEN,LEN,16 /* decrement remaining length */ ASLOCAL(r_1byte_half_copy) @@ -279,7 +279,7 @@ ASLOCAL(r_1byte_half_copy) 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 */ + bb1 lo,%r10,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 */ @@ -298,16 +298,16 @@ ASLOCAL(r_half_copy) 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 */ + br.n r_half_copy /* branch to copy another block */ subu LEN,LEN,16 /* decrement remaining length */ ASLOCAL(r_byte_copy) - bcnd eq0,LEN,_ASM_LABEL(bcopy_out) /* branch if nothing left to copy */ + bcnd eq0,LEN,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 */ - br.n _ASM_LABEL(r_byte_copy) /* branch for next byte */ + br.n r_byte_copy /* branch for next byte */ subu LEN,LEN,1 /* decrement remaining length */ #endif /* MEMMOVE || OVBCOPY */ @@ -322,39 +322,39 @@ ASLOCAL(bcopy_out) .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 f_word_copy + .word f_byte_copy + .word f_half_copy + .word f_byte_copy + .word f_byte_copy + .word f_3byte_word_copy + .word f_byte_copy + .word f_1byte_half_copy + .word f_half_copy + .word f_byte_copy + .word f_1half_word_copy + .word f_byte_copy + .word f_byte_copy + .word f_1byte_half_copy + .word f_byte_copy + .word 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 r_word_copy + .word r_byte_copy + .word r_half_copy + .word r_byte_copy + .word r_byte_copy + .word r_1byte_word_copy + .word r_byte_copy + .word r_1byte_half_copy + .word r_half_copy + .word r_byte_copy + .word r_1half_word_copy + .word r_byte_copy + .word r_byte_copy + .word r_1byte_half_copy + .word r_byte_copy + .word r_3byte_word_copy #endif |