Commit f9f2c0ba authored by Keith M. Wesolowski's avatar Keith M. Wesolowski

[SPARC32]: Nuke a.out build cruft

This removes C_LABEL and asm/cprefix.h as well as NEW_GAS.  These were
used to support building on SunOS and with ancient binutils.
parent 7d202bd0
...@@ -11,21 +11,12 @@ ...@@ -11,21 +11,12 @@
# Uncomment the first CFLAGS if you are doing kgdb source level # Uncomment the first CFLAGS if you are doing kgdb source level
# debugging of the kernel to get the proper debugging information. # debugging of the kernel to get the proper debugging information.
IS_EGCS := $(shell if $(CC) -m32 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo y; else echo n; fi; )
NEW_GAS := $(shell if $(LD) --version 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi)
ifeq ($(NEW_GAS),y)
AS := $(AS) -32 AS := $(AS) -32
LDFLAGS := -m elf32_sparc LDFLAGS := -m elf32_sparc
endif
#CFLAGS := $(CFLAGS) -g -pipe -fcall-used-g5 -fcall-used-g7 #CFLAGS := $(CFLAGS) -g -pipe -fcall-used-g5 -fcall-used-g7
ifneq ($(IS_EGCS),y)
CFLAGS := $(CFLAGS) -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
else
CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
AFLAGS := $(AFLAGS) -m32 AFLAGS := $(AFLAGS) -m32
endif
#LDFLAGS_vmlinux = -N -Ttext 0xf0004000 #LDFLAGS_vmlinux = -N -Ttext 0xf0004000
# Since 2.5.40, the first stage is left not btfix-ed. # Since 2.5.40, the first stage is left not btfix-ed.
......
This diff is collapsed.
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
*/ */
#include <asm/cprefix.h>
#include <asm/head.h> #include <asm/head.h>
#include <asm/asi.h> #include <asm/asi.h>
#include <asm/contregs.h> #include <asm/contregs.h>
...@@ -217,9 +216,9 @@ tsetup_patch6: ...@@ -217,9 +216,9 @@ tsetup_patch6:
/* Call MMU-architecture dependent stack checking /* Call MMU-architecture dependent stack checking
* routine. * routine.
*/ */
.globl C_LABEL(tsetup_mmu_patchme) .globl tsetup_mmu_patchme
C_LABEL(tsetup_mmu_patchme): tsetup_mmu_patchme:
b C_LABEL(tsetup_sun4c_stackchk) b tsetup_sun4c_stackchk
andcc %sp, 0x7, %g0 andcc %sp, 0x7, %g0
/* Architecture specific stack checking routines. When either /* Architecture specific stack checking routines. When either
...@@ -229,8 +228,8 @@ C_LABEL(tsetup_mmu_patchme): ...@@ -229,8 +228,8 @@ C_LABEL(tsetup_mmu_patchme):
*/ */
#define glob_tmp g1 #define glob_tmp g1
.globl C_LABEL(tsetup_sun4c_stackchk) .globl tsetup_sun4c_stackchk
C_LABEL(tsetup_sun4c_stackchk): tsetup_sun4c_stackchk:
/* Done by caller: andcc %sp, 0x7, %g0 */ /* Done by caller: andcc %sp, 0x7, %g0 */
bne trap_setup_user_stack_is_bolixed bne trap_setup_user_stack_is_bolixed
sra %sp, 29, %glob_tmp sra %sp, 29, %glob_tmp
...@@ -276,8 +275,8 @@ tsetup_sun4c_onepage: ...@@ -276,8 +275,8 @@ tsetup_sun4c_onepage:
jmpl %t_retpc + 0x8, %g0 jmpl %t_retpc + 0x8, %g0
mov %t_kstack, %sp mov %t_kstack, %sp
.globl C_LABEL(tsetup_srmmu_stackchk) .globl tsetup_srmmu_stackchk
C_LABEL(tsetup_srmmu_stackchk): tsetup_srmmu_stackchk:
/* Check results of callers andcc %sp, 0x7, %g0 */ /* Check results of callers andcc %sp, 0x7, %g0 */
bne trap_setup_user_stack_is_bolixed bne trap_setup_user_stack_is_bolixed
sethi %hi(PAGE_OFFSET), %glob_tmp sethi %hi(PAGE_OFFSET), %glob_tmp
......
This diff is collapsed.
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
*/ */
#include <asm/cprefix.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/psr.h> #include <asm/psr.h>
...@@ -47,9 +46,9 @@ rtrap_7win_patch5: and %g1, 0x7f, %g1 ...@@ -47,9 +46,9 @@ rtrap_7win_patch5: and %g1, 0x7f, %g1
.globl ret_trap_entry, rtrap_patch1, rtrap_patch2 .globl ret_trap_entry, rtrap_patch1, rtrap_patch2
.globl rtrap_patch3, rtrap_patch4, rtrap_patch5 .globl rtrap_patch3, rtrap_patch4, rtrap_patch5
.globl C_LABEL(ret_trap_lockless_ipi) .globl ret_trap_lockless_ipi
ret_trap_entry: ret_trap_entry:
C_LABEL(ret_trap_lockless_ipi): ret_trap_lockless_ipi:
andcc %t_psr, PSR_PS, %g0 andcc %t_psr, PSR_PS, %g0
be 1f be 1f
nop nop
...@@ -64,7 +63,7 @@ C_LABEL(ret_trap_lockless_ipi): ...@@ -64,7 +63,7 @@ C_LABEL(ret_trap_lockless_ipi):
be signal_p be signal_p
nop nop
call C_LABEL(schedule) call schedule
nop nop
ld [%curptr + TI_FLAGS], %g2 ld [%curptr + TI_FLAGS], %g2
...@@ -76,7 +75,7 @@ signal_p: ...@@ -76,7 +75,7 @@ signal_p:
clr %o0 clr %o0
mov %l5, %o2 mov %l5, %o2
mov %l6, %o3 mov %l6, %o3
call C_LABEL(do_signal) call do_signal
add %sp, STACKFRAME_SZ, %o1 ! pt_regs ptr add %sp, STACKFRAME_SZ, %o1 ! pt_regs ptr
/* Fall through. */ /* Fall through. */
...@@ -95,7 +94,7 @@ ret_trap_continue: ...@@ -95,7 +94,7 @@ ret_trap_continue:
WRITE_PAUSE WRITE_PAUSE
mov 1, %o1 mov 1, %o1
call C_LABEL(try_to_clear_window_buffer) call try_to_clear_window_buffer
add %sp, STACKFRAME_SZ, %o0 add %sp, STACKFRAME_SZ, %o0
b signal_p b signal_p
...@@ -131,8 +130,8 @@ rtrap_patch2: and %glob_tmp, 0xff, %glob_tmp ...@@ -131,8 +130,8 @@ rtrap_patch2: and %glob_tmp, 0xff, %glob_tmp
* branch to the user stack checking routine * branch to the user stack checking routine
* for return from traps. * for return from traps.
*/ */
.globl C_LABEL(rtrap_mmu_patchme) .globl rtrap_mmu_patchme
C_LABEL(rtrap_mmu_patchme): b C_LABEL(sun4c_rett_stackchk) rtrap_mmu_patchme: b sun4c_rett_stackchk
andcc %fp, 0x7, %g0 andcc %fp, 0x7, %g0
ret_trap_userwins_ok: ret_trap_userwins_ok:
...@@ -165,7 +164,7 @@ ret_trap_unaligned_pc: ...@@ -165,7 +164,7 @@ ret_trap_unaligned_pc:
wr %t_psr, PSR_ET, %psr wr %t_psr, PSR_ET, %psr
WRITE_PAUSE WRITE_PAUSE
call C_LABEL(do_memaccess_unaligned) call do_memaccess_unaligned
nop nop
b signal_p b signal_p
...@@ -215,15 +214,15 @@ ret_trap_user_stack_is_bolixed: ...@@ -215,15 +214,15 @@ ret_trap_user_stack_is_bolixed:
wr %t_psr, PSR_ET, %psr wr %t_psr, PSR_ET, %psr
WRITE_PAUSE WRITE_PAUSE
call C_LABEL(window_ret_fault) call window_ret_fault
add %sp, STACKFRAME_SZ, %o0 add %sp, STACKFRAME_SZ, %o0
b signal_p b signal_p
ld [%curptr + TI_FLAGS], %g2 ld [%curptr + TI_FLAGS], %g2
.globl C_LABEL(sun4c_rett_stackchk) .globl sun4c_rett_stackchk
C_LABEL(sun4c_rett_stackchk): sun4c_rett_stackchk:
be 1f be 1f
and %fp, 0xfff, %g1 ! delay slot and %fp, 0xfff, %g1 ! delay slot
...@@ -286,8 +285,8 @@ sun4c_rett_onepage: ...@@ -286,8 +285,8 @@ sun4c_rett_onepage:
b ret_trap_userwins_ok b ret_trap_userwins_ok
save %g0, %g0, %g0 save %g0, %g0, %g0
.globl C_LABEL(srmmu_rett_stackchk) .globl srmmu_rett_stackchk
C_LABEL(srmmu_rett_stackchk): srmmu_rett_stackchk:
bne ret_trap_user_stack_is_bolixed bne ret_trap_user_stack_is_bolixed
sethi %hi(PAGE_OFFSET), %g1 sethi %hi(PAGE_OFFSET), %g1
cmp %g1, %fp cmp %g1, %fp
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
*/ */
#include <asm/cprefix.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/asm_offsets.h> #include <asm/asm_offsets.h>
#include <asm/errno.h> #include <asm/errno.h>
...@@ -31,7 +30,7 @@ ...@@ -31,7 +30,7 @@
jmp %l2; \ jmp %l2; \
rett %l2 + 4; rett %l2 + 4;
#define LABEL(func) CONCAT(func, _low) #define LABEL(func) func##_low
.globl LABEL(sunosnop) .globl LABEL(sunosnop)
LABEL(sunosnop): LABEL(sunosnop):
......
...@@ -298,8 +298,7 @@ EXPORT_SYMBOL(__copy_user); ...@@ -298,8 +298,7 @@ EXPORT_SYMBOL(__copy_user);
EXPORT_SYMBOL(__strncpy_from_user); EXPORT_SYMBOL(__strncpy_from_user);
/* Networking helper routines. */ /* Networking helper routines. */
/* XXX This is NOVERS because C_LABEL_STR doesn't get the version number. -DaveM */ EXPORT_SYMBOL(__csum_partial_copy_sparc_generic);
EXPORT_SYMBOL_NOVERS(__csum_partial_copy_sparc_generic);
EXPORT_SYMBOL(csum_partial); EXPORT_SYMBOL(csum_partial);
/* Cache flushing. */ /* Cache flushing. */
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
* Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)
*/ */
#include <asm/cprefix.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
.text .text
...@@ -19,50 +18,50 @@ ...@@ -19,50 +18,50 @@
* value as in [%sp + STACKFRAME_SZ + PT_I0] */ * value as in [%sp + STACKFRAME_SZ + PT_I0] */
/* SunOS getpid() returns pid in %o0 and ppid in %o1 */ /* SunOS getpid() returns pid in %o0 and ppid in %o1 */
.globl C_LABEL(sunos_getpid) .globl sunos_getpid
C_LABEL(sunos_getpid): sunos_getpid:
call C_LABEL(sys_getppid) call sys_getppid
nop nop
call C_LABEL(sys_getpid) call sys_getpid
st %o0, [%sp + STACKFRAME_SZ + PT_I1] st %o0, [%sp + STACKFRAME_SZ + PT_I1]
b C_LABEL(ret_sys_call) b ret_sys_call
st %o0, [%sp + STACKFRAME_SZ + PT_I0] st %o0, [%sp + STACKFRAME_SZ + PT_I0]
/* SunOS getuid() returns uid in %o0 and euid in %o1 */ /* SunOS getuid() returns uid in %o0 and euid in %o1 */
.globl C_LABEL(sunos_getuid) .globl sunos_getuid
C_LABEL(sunos_getuid): sunos_getuid:
call C_LABEL(sys_geteuid16) call sys_geteuid16
nop nop
call C_LABEL(sys_getuid16) call sys_getuid16
st %o0, [%sp + STACKFRAME_SZ + PT_I1] st %o0, [%sp + STACKFRAME_SZ + PT_I1]
b C_LABEL(ret_sys_call) b ret_sys_call
st %o0, [%sp + STACKFRAME_SZ + PT_I0] st %o0, [%sp + STACKFRAME_SZ + PT_I0]
/* SunOS getgid() returns gid in %o0 and egid in %o1 */ /* SunOS getgid() returns gid in %o0 and egid in %o1 */
.globl C_LABEL(sunos_getgid) .globl sunos_getgid
C_LABEL(sunos_getgid): sunos_getgid:
call C_LABEL(sys_getegid16) call sys_getegid16
nop nop
call C_LABEL(sys_getgid16) call sys_getgid16
st %o0, [%sp + STACKFRAME_SZ + PT_I1] st %o0, [%sp + STACKFRAME_SZ + PT_I1]
b C_LABEL(ret_sys_call) b ret_sys_call
st %o0, [%sp + STACKFRAME_SZ + PT_I0] st %o0, [%sp + STACKFRAME_SZ + PT_I0]
/* SunOS's execv() call only specifies the argv argument, the /* SunOS's execv() call only specifies the argv argument, the
* environment settings are the same as the calling processes. * environment settings are the same as the calling processes.
*/ */
.globl C_LABEL(sunos_execv) .globl sunos_execv
C_LABEL(sunos_execv): sunos_execv:
st %g0, [%sp + STACKFRAME_SZ + PT_I2] st %g0, [%sp + STACKFRAME_SZ + PT_I2]
call C_LABEL(sparc_execve) call sparc_execve
add %sp, STACKFRAME_SZ, %o0 add %sp, STACKFRAME_SZ, %o0
b C_LABEL(ret_sys_call) b ret_sys_call
ld [%sp + STACKFRAME_SZ + PT_I0], %o0 ld [%sp + STACKFRAME_SZ + PT_I0], %o0
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
*/ */
#include <linux/init.h> #include <linux/init.h>
#include <asm/cprefix.h>
#include <asm/head.h> #include <asm/head.h>
#include <asm/psr.h> #include <asm/psr.h>
#include <asm/page.h> #include <asm/page.h>
...@@ -15,8 +14,8 @@ ...@@ -15,8 +14,8 @@
#include <asm/vaddrs.h> #include <asm/vaddrs.h>
#include <asm/contregs.h> #include <asm/contregs.h>
.globl C_LABEL(sun4m_cpu_startup), C_LABEL(__smp4m_processor_id) .globl sun4m_cpu_startup, __smp4m_processor_id
.globl C_LABEL(sun4d_cpu_startup), C_LABEL(__smp4d_processor_id) .globl sun4d_cpu_startup, __smp4d_processor_id
__INIT __INIT
.align 4 .align 4
...@@ -26,21 +25,21 @@ ...@@ -26,21 +25,21 @@
* in and sets PIL in %psr to 15, no irqs. * in and sets PIL in %psr to 15, no irqs.
*/ */
C_LABEL(sun4m_cpu_startup): sun4m_cpu_startup:
cpu1_startup: cpu1_startup:
sethi %hi(C_LABEL(trapbase_cpu1)), %g3 sethi %hi(trapbase_cpu1), %g3
b 1f b 1f
or %g3, %lo(C_LABEL(trapbase_cpu1)), %g3 or %g3, %lo(trapbase_cpu1), %g3
cpu2_startup: cpu2_startup:
sethi %hi(C_LABEL(trapbase_cpu2)), %g3 sethi %hi(trapbase_cpu2), %g3
b 1f b 1f
or %g3, %lo(C_LABEL(trapbase_cpu2)), %g3 or %g3, %lo(trapbase_cpu2), %g3
cpu3_startup: cpu3_startup:
sethi %hi(C_LABEL(trapbase_cpu3)), %g3 sethi %hi(trapbase_cpu3), %g3
b 1f b 1f
or %g3, %lo(C_LABEL(trapbase_cpu3)), %g3 or %g3, %lo(trapbase_cpu3), %g3
1: 1:
/* Set up a sane %psr -- PIL<0xf> S<0x1> PS<0x1> CWP<0x0> */ /* Set up a sane %psr -- PIL<0xf> S<0x1> PS<0x1> CWP<0x0> */
...@@ -58,7 +57,7 @@ cpu3_startup: ...@@ -58,7 +57,7 @@ cpu3_startup:
WRITE_PAUSE WRITE_PAUSE
/* Give ourselves a stack and curptr. */ /* Give ourselves a stack and curptr. */
set C_LABEL(current_set), %g5 set current_set, %g5
srl %g3, 10, %g4 srl %g3, 10, %g4
and %g4, 0xc, %g4 and %g4, 0xc, %g4
ld [%g5 + %g4], %g6 ld [%g5 + %g4], %g6
...@@ -73,13 +72,13 @@ cpu3_startup: ...@@ -73,13 +72,13 @@ cpu3_startup:
WRITE_PAUSE WRITE_PAUSE
/* Init our caches, etc. */ /* Init our caches, etc. */
set C_LABEL(poke_srmmu), %g5 set poke_srmmu, %g5
ld [%g5], %g5 ld [%g5], %g5
call %g5 call %g5
nop nop
/* Start this processor. */ /* Start this processor. */
call C_LABEL(smp4m_callin) call smp4m_callin
nop nop
b,a smp_do_cpu_idle b,a smp_do_cpu_idle
...@@ -88,22 +87,22 @@ cpu3_startup: ...@@ -88,22 +87,22 @@ cpu3_startup:
.align 4 .align 4
smp_do_cpu_idle: smp_do_cpu_idle:
call C_LABEL(init_idle) call init_idle
nop nop
call C_LABEL(cpu_idle) call cpu_idle
mov 0, %o0 mov 0, %o0
call C_LABEL(cpu_panic) call cpu_panic
nop nop
C_LABEL(__smp4m_processor_id): __smp4m_processor_id:
rd %tbr, %g2 rd %tbr, %g2
srl %g2, 12, %g2 srl %g2, 12, %g2
and %g2, 3, %g2 and %g2, 3, %g2
retl retl
mov %g1, %o7 mov %g1, %o7
C_LABEL(__smp4d_processor_id): __smp4d_processor_id:
lda [%g0] ASI_M_VIKING_TMP1, %g2 lda [%g0] ASI_M_VIKING_TMP1, %g2
retl retl
mov %g1, %o7 mov %g1, %o7
...@@ -114,7 +113,7 @@ C_LABEL(__smp4d_processor_id): ...@@ -114,7 +113,7 @@ C_LABEL(__smp4d_processor_id):
__INIT __INIT
.align 4 .align 4
C_LABEL(sun4d_cpu_startup): sun4d_cpu_startup:
/* Set up a sane %psr -- PIL<0xf> S<0x1> PS<0x1> CWP<0x0> */ /* Set up a sane %psr -- PIL<0xf> S<0x1> PS<0x1> CWP<0x0> */
set (PSR_PIL | PSR_S | PSR_PS), %g1 set (PSR_PIL | PSR_S | PSR_PS), %g1
wr %g1, 0x0, %psr ! traps off though wr %g1, 0x0, %psr ! traps off though
...@@ -126,7 +125,7 @@ C_LABEL(sun4d_cpu_startup): ...@@ -126,7 +125,7 @@ C_LABEL(sun4d_cpu_startup):
WRITE_PAUSE WRITE_PAUSE
/* Set tbr - we use just one trap table. */ /* Set tbr - we use just one trap table. */
set C_LABEL(trapbase), %g1 set trapbase, %g1
wr %g1, 0x0, %tbr wr %g1, 0x0, %tbr
WRITE_PAUSE WRITE_PAUSE
...@@ -138,7 +137,7 @@ C_LABEL(sun4d_cpu_startup): ...@@ -138,7 +137,7 @@ C_LABEL(sun4d_cpu_startup):
sta %g1, [%g0] ASI_M_VIKING_TMP1 sta %g1, [%g0] ASI_M_VIKING_TMP1
/* Give ourselves a stack and curptr. */ /* Give ourselves a stack and curptr. */
set C_LABEL(current_set), %g5 set current_set, %g5
srl %g3, 1, %g4 srl %g3, 1, %g4
ld [%g5 + %g4], %g6 ld [%g5 + %g4], %g6
...@@ -152,13 +151,13 @@ C_LABEL(sun4d_cpu_startup): ...@@ -152,13 +151,13 @@ C_LABEL(sun4d_cpu_startup):
WRITE_PAUSE WRITE_PAUSE
/* Init our caches, etc. */ /* Init our caches, etc. */
set C_LABEL(poke_srmmu), %g5 set poke_srmmu, %g5
ld [%g5], %g5 ld [%g5], %g5
call %g5 call %g5
nop nop
/* Start this processor. */ /* Start this processor. */
call C_LABEL(smp4d_callin) call smp4d_callin
nop nop
b,a smp_do_cpu_idle b,a smp_do_cpu_idle
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
*/ */
#include <asm/cprefix.h>
#include <asm/contregs.h> #include <asm/contregs.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
...@@ -164,8 +163,8 @@ spwin_fromuser: ...@@ -164,8 +163,8 @@ spwin_fromuser:
* the label 'spwin_user_stack_is_bolixed' which will take * the label 'spwin_user_stack_is_bolixed' which will take
* care of things at that point. * care of things at that point.
*/ */
.globl C_LABEL(spwin_mmu_patchme) .globl spwin_mmu_patchme
C_LABEL(spwin_mmu_patchme): b C_LABEL(spwin_sun4c_stackchk) spwin_mmu_patchme: b spwin_sun4c_stackchk
andcc %sp, 0x7, %g0 andcc %sp, 0x7, %g0
spwin_good_ustack: spwin_good_ustack:
...@@ -253,7 +252,7 @@ spnwin_patch3: and %twin_tmp, 0xff, %twin_tmp ! patched on 7win Sparcs ...@@ -253,7 +252,7 @@ spnwin_patch3: and %twin_tmp, 0xff, %twin_tmp ! patched on 7win Sparcs
/* Turn on traps and call c-code to deal with it. */ /* Turn on traps and call c-code to deal with it. */
wr %t_psr, PSR_ET, %psr wr %t_psr, PSR_ET, %psr
nop nop
call C_LABEL(window_overflow_fault) call window_overflow_fault
nop nop
/* Return from trap if C-code actually fixes things, if it /* Return from trap if C-code actually fixes things, if it
...@@ -307,8 +306,8 @@ spwin_bad_ustack_from_kernel: ...@@ -307,8 +306,8 @@ spwin_bad_ustack_from_kernel:
* As noted above %curptr cannot be touched by this routine at all. * As noted above %curptr cannot be touched by this routine at all.
*/ */
.globl C_LABEL(spwin_sun4c_stackchk) .globl spwin_sun4c_stackchk
C_LABEL(spwin_sun4c_stackchk): spwin_sun4c_stackchk:
/* LOCATION: Window to be saved on the stack */ /* LOCATION: Window to be saved on the stack */
/* See if the stack is in the address space hole but first, /* See if the stack is in the address space hole but first,
...@@ -379,8 +378,8 @@ spwin_sun4c_onepage: ...@@ -379,8 +378,8 @@ spwin_sun4c_onepage:
* works for all current v8/srmmu implementations, we'll * works for all current v8/srmmu implementations, we'll
* see... * see...
*/ */
.globl C_LABEL(spwin_srmmu_stackchk) .globl spwin_srmmu_stackchk
C_LABEL(spwin_srmmu_stackchk): spwin_srmmu_stackchk:
/* LOCATION: Window to be saved on the stack */ /* LOCATION: Window to be saved on the stack */
/* Because of SMP concerns and speed we play a trick. /* Because of SMP concerns and speed we play a trick.
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
* Copyright (C) 1995 David S. Miller * Copyright (C) 1995 David S. Miller
*/ */
#include <asm/cprefix.h>
#include <asm/contregs.h> #include <asm/contregs.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
...@@ -135,8 +134,8 @@ fwin_from_user: ...@@ -135,8 +134,8 @@ fwin_from_user:
/* Branch to the architecture specific stack validation /* Branch to the architecture specific stack validation
* routine. They can be found below... * routine. They can be found below...
*/ */
.globl C_LABEL(fwin_mmu_patchme) .globl fwin_mmu_patchme
C_LABEL(fwin_mmu_patchme): b C_LABEL(sun4c_fwin_stackchk) fwin_mmu_patchme: b sun4c_fwin_stackchk
andcc %sp, 0x7, %g0 andcc %sp, 0x7, %g0
#define STACK_OFFSET (THREAD_SIZE - TRACEREG_SZ - STACKFRAME_SZ) #define STACK_OFFSET (THREAD_SIZE - TRACEREG_SZ - STACKFRAME_SZ)
...@@ -190,7 +189,7 @@ fwin_user_stack_is_bolixed: ...@@ -190,7 +189,7 @@ fwin_user_stack_is_bolixed:
wr %t_psr, PSR_ET, %psr ! enable traps wr %t_psr, PSR_ET, %psr ! enable traps
nop nop
call C_LABEL(window_underflow_fault) call window_underflow_fault
mov %g4, %o0 mov %g4, %o0
b ret_trap_entry b ret_trap_entry
...@@ -244,8 +243,8 @@ fwin_user_finish_up: ...@@ -244,8 +243,8 @@ fwin_user_finish_up:
*/ */
.align 4 .align 4
.globl C_LABEL(sun4c_fwin_stackchk) .globl sun4c_fwin_stackchk
C_LABEL(sun4c_fwin_stackchk): sun4c_fwin_stackchk:
/* LOCATION: Window 'W' */ /* LOCATION: Window 'W' */
/* Caller did 'andcc %sp, 0x7, %g0' */ /* Caller did 'andcc %sp, 0x7, %g0' */
...@@ -295,8 +294,8 @@ sun4c_fwin_onepage: ...@@ -295,8 +294,8 @@ sun4c_fwin_onepage:
/* A page had bad page permissions, losing... */ /* A page had bad page permissions, losing... */
b,a fwin_user_stack_is_bolixed b,a fwin_user_stack_is_bolixed
.globl C_LABEL(srmmu_fwin_stackchk) .globl srmmu_fwin_stackchk
C_LABEL(srmmu_fwin_stackchk): srmmu_fwin_stackchk:
/* LOCATION: Window 'W' */ /* LOCATION: Window 'W' */
/* Caller did 'andcc %sp, 0x7, %g0' */ /* Caller did 'andcc %sp, 0x7, %g0' */
......
...@@ -5,12 +5,10 @@ ...@@ -5,12 +5,10 @@
* Copyright (C) 1999 David S. Miller (davem@redhat.com) * Copyright (C) 1999 David S. Miller (davem@redhat.com)
*/ */
#include <asm/cprefix.h>
.text .text
.align 4 .align 4
.globl C_LABEL(__ashldi3) .globl __ashldi3
C_LABEL(__ashldi3): __ashldi3:
cmp %o2, 0 cmp %o2, 0
be 9f be 9f
mov 0x20, %g2 mov 0x20, %g2
......
...@@ -5,12 +5,10 @@ ...@@ -5,12 +5,10 @@
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
*/ */
#include <asm/cprefix.h>
.text .text
.align 4 .align 4
.globl C_LABEL(__ashrdi3) .globl __ashrdi3
C_LABEL(__ashrdi3): __ashrdi3:
tst %o2 tst %o2
be 3f be 3f
or %g0, 32, %g2 or %g0, 32, %g2
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <asm/cprefix.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/psr.h> #include <asm/psr.h>
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <asm/cprefix.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/psr.h> #include <asm/psr.h>
...@@ -29,7 +28,7 @@ ___set_bit: ...@@ -29,7 +28,7 @@ ___set_bit:
wr %g5, 0x0, %psr wr %g5, 0x0, %psr
nop; nop; nop nop; nop; nop
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
set C_LABEL(bitops_spinlock), %g5 set bitops_spinlock, %g5
2: ldstub [%g5], %g7 ! Spin on the byte lock for SMP. 2: ldstub [%g5], %g7 ! Spin on the byte lock for SMP.
orcc %g7, 0x0, %g0 ! Did we get it? orcc %g7, 0x0, %g0 ! Did we get it?
bne 2b ! Nope... bne 2b ! Nope...
...@@ -39,7 +38,7 @@ ___set_bit: ...@@ -39,7 +38,7 @@ ___set_bit:
and %g7, %g2, %g2 and %g7, %g2, %g2
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
st %g5, [%g1] st %g5, [%g1]
set C_LABEL(bitops_spinlock), %g5 set bitops_spinlock, %g5
stb %g0, [%g5] stb %g0, [%g5]
#else #else
st %g5, [%g1] st %g5, [%g1]
...@@ -58,7 +57,7 @@ ___clear_bit: ...@@ -58,7 +57,7 @@ ___clear_bit:
wr %g5, 0x0, %psr wr %g5, 0x0, %psr
nop; nop; nop nop; nop; nop
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
set C_LABEL(bitops_spinlock), %g5 set bitops_spinlock, %g5
2: ldstub [%g5], %g7 ! Spin on the byte lock for SMP. 2: ldstub [%g5], %g7 ! Spin on the byte lock for SMP.
orcc %g7, 0x0, %g0 ! Did we get it? orcc %g7, 0x0, %g0 ! Did we get it?
bne 2b ! Nope... bne 2b ! Nope...
...@@ -68,7 +67,7 @@ ___clear_bit: ...@@ -68,7 +67,7 @@ ___clear_bit:
and %g7, %g2, %g2 and %g7, %g2, %g2
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
st %g5, [%g1] st %g5, [%g1]
set C_LABEL(bitops_spinlock), %g5 set bitops_spinlock, %g5
stb %g0, [%g5] stb %g0, [%g5]
#else #else
st %g5, [%g1] st %g5, [%g1]
...@@ -87,7 +86,7 @@ ___change_bit: ...@@ -87,7 +86,7 @@ ___change_bit:
wr %g5, 0x0, %psr wr %g5, 0x0, %psr
nop; nop; nop nop; nop; nop
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
set C_LABEL(bitops_spinlock), %g5 set bitops_spinlock, %g5
2: ldstub [%g5], %g7 ! Spin on the byte lock for SMP. 2: ldstub [%g5], %g7 ! Spin on the byte lock for SMP.
orcc %g7, 0x0, %g0 ! Did we get it? orcc %g7, 0x0, %g0 ! Did we get it?
bne 2b ! Nope... bne 2b ! Nope...
...@@ -97,7 +96,7 @@ ___change_bit: ...@@ -97,7 +96,7 @@ ___change_bit:
and %g7, %g2, %g2 and %g7, %g2, %g2
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
st %g5, [%g1] st %g5, [%g1]
set C_LABEL(bitops_spinlock), %g5 set bitops_spinlock, %g5
stb %g0, [%g5] stb %g0, [%g5]
#else #else
st %g5, [%g1] st %g5, [%g1]
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
*/ */
#include <asm/cprefix.h>
#include <asm/page.h> #include <asm/page.h>
/* Zero out 64 bytes of memory at (buf + offset). /* Zero out 64 bytes of memory at (buf + offset).
...@@ -46,9 +45,9 @@ ...@@ -46,9 +45,9 @@
.text .text
.align 4 .align 4
.globl C_LABEL(bzero_1page), C_LABEL(__copy_1page) .globl bzero_1page, __copy_1page
C_LABEL(bzero_1page): bzero_1page:
/* NOTE: If you change the number of insns of this routine, please check /* NOTE: If you change the number of insns of this routine, please check
* arch/sparc/mm/hypersparc.S */ * arch/sparc/mm/hypersparc.S */
/* %o0 = buf */ /* %o0 = buf */
...@@ -67,7 +66,7 @@ C_LABEL(bzero_1page): ...@@ -67,7 +66,7 @@ C_LABEL(bzero_1page):
retl retl
nop nop
C_LABEL(__copy_1page): __copy_1page:
/* NOTE: If you change the number of insns of this routine, please check /* NOTE: If you change the number of insns of this routine, please check
* arch/sparc/mm/hypersparc.S */ * arch/sparc/mm/hypersparc.S */
/* %o0 = dst, %o1 = src */ /* %o0 = dst, %o1 = src */
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
* BSD4.4 portable checksum routine * BSD4.4 portable checksum routine
*/ */
#include <asm/cprefix.h>
#include <asm/errno.h> #include <asm/errno.h>
#define CSUM_BIGCHUNK(buf, offset, sum, t0, t1, t2, t3, t4, t5) \ #define CSUM_BIGCHUNK(buf, offset, sum, t0, t1, t2, t3, t4, t5) \
...@@ -104,8 +103,8 @@ csum_partial_fix_alignment: ...@@ -104,8 +103,8 @@ csum_partial_fix_alignment:
/* The common case is to get called with a nicely aligned /* The common case is to get called with a nicely aligned
* buffer of size 0x20. Follow the code path for that case. * buffer of size 0x20. Follow the code path for that case.
*/ */
.globl C_LABEL(csum_partial) .globl csum_partial
C_LABEL(csum_partial): /* %o0=buf, %o1=len, %o2=sum */ csum_partial: /* %o0=buf, %o1=len, %o2=sum */
andcc %o0, 0x7, %g0 ! alignment problems? andcc %o0, 0x7, %g0 ! alignment problems?
bne csum_partial_fix_alignment ! yep, handle it bne csum_partial_fix_alignment ! yep, handle it
sethi %hi(cpte - 8), %g7 ! prepare table jmp ptr sethi %hi(cpte - 8), %g7 ! prepare table jmp ptr
...@@ -142,8 +141,8 @@ cpte: bne csum_partial_end_cruft ! yep, handle it ...@@ -142,8 +141,8 @@ cpte: bne csum_partial_end_cruft ! yep, handle it
cpout: retl ! get outta here cpout: retl ! get outta here
mov %o2, %o0 ! return computed csum mov %o2, %o0 ! return computed csum
.globl C_LABEL(__csum_partial_copy_start), C_LABEL(__csum_partial_copy_end) .globl __csum_partial_copy_start, __csum_partial_copy_end
C_LABEL(__csum_partial_copy_start): __csum_partial_copy_start:
/* Work around cpp -rob */ /* Work around cpp -rob */
#define ALLOC #alloc #define ALLOC #alloc
...@@ -329,8 +328,8 @@ cc_dword_align: ...@@ -329,8 +328,8 @@ cc_dword_align:
* out of you, game over, lights out. * out of you, game over, lights out.
*/ */
.align 8 .align 8
.globl C_LABEL(__csum_partial_copy_sparc_generic) .globl __csum_partial_copy_sparc_generic
C_LABEL(__csum_partial_copy_sparc_generic): __csum_partial_copy_sparc_generic:
/* %o0=src, %o1=dest, %g1=len, %g7=sum */ /* %o0=src, %o1=dest, %g1=len, %g7=sum */
xor %o0, %o1, %o4 ! get changing bits xor %o0, %o1, %o4 ! get changing bits
andcc %o4, 3, %g0 ! check for mismatched alignment andcc %o4, 3, %g0 ! check for mismatched alignment
...@@ -472,7 +471,7 @@ ccslow: cmp %g1, 0 ...@@ -472,7 +471,7 @@ ccslow: cmp %g1, 0
4: addcc %g7, %g5, %g7 4: addcc %g7, %g5, %g7
retl retl
addx %g0, %g7, %o0 addx %g0, %g7, %o0
C_LABEL(__csum_partial_copy_end): __csum_partial_copy_end:
/* We do these strange calculations for the csum_*_from_user case only, ie. /* We do these strange calculations for the csum_*_from_user case only, ie.
* we only bother with faults on loads... */ * we only bother with faults on loads... */
...@@ -551,7 +550,7 @@ C_LABEL(__csum_partial_copy_end): ...@@ -551,7 +550,7 @@ C_LABEL(__csum_partial_copy_end):
mov %i5, %o0 mov %i5, %o0
mov %i7, %o1 mov %i7, %o1
mov %i4, %o2 mov %i4, %o2
call C_LABEL(lookup_fault) call lookup_fault
mov %g7, %i4 mov %g7, %i4
cmp %o0, 2 cmp %o0, 2
bne 1f bne 1f
...@@ -561,7 +560,7 @@ C_LABEL(__csum_partial_copy_end): ...@@ -561,7 +560,7 @@ C_LABEL(__csum_partial_copy_end):
mov %i0, %o1 mov %i0, %o1
mov %i1, %o0 mov %i1, %o0
5: 5:
call C_LABEL(__memcpy) call __memcpy
mov %i2, %o2 mov %i2, %o2
tst %o0 tst %o0
bne,a 2f bne,a 2f
...@@ -570,7 +569,7 @@ C_LABEL(__csum_partial_copy_end): ...@@ -570,7 +569,7 @@ C_LABEL(__csum_partial_copy_end):
2: 2:
mov %i1, %o0 mov %i1, %o0
6: 6:
call C_LABEL(__bzero) call __bzero
mov %i3, %o1 mov %i3, %o1
1: 1:
ld [%sp + 168], %o2 ! struct_ptr of parent ld [%sp + 168], %o2 ! struct_ptr of parent
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
* Returns 0 if successful, otherwise count of bytes not copied yet * Returns 0 if successful, otherwise count of bytes not copied yet
*/ */
#include <asm/cprefix.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/asmmacro.h> #include <asm/asmmacro.h>
#include <asm/page.h> #include <asm/page.h>
...@@ -118,7 +117,7 @@ ...@@ -118,7 +117,7 @@
.globl __copy_user_begin .globl __copy_user_begin
__copy_user_begin: __copy_user_begin:
.globl C_LABEL(__copy_user) .globl __copy_user
dword_align: dword_align:
andcc %o1, 1, %g0 andcc %o1, 1, %g0
be 4f be 4f
...@@ -145,7 +144,7 @@ dword_align: ...@@ -145,7 +144,7 @@ dword_align:
b 3f b 3f
add %o0, 2, %o0 add %o0, 2, %o0
C_LABEL(__copy_user): /* %o0=dst %o1=src %o2=len */ __copy_user: /* %o0=dst %o1=src %o2=len */
xor %o0, %o1, %o4 xor %o0, %o1, %o4
1: 1:
andcc %o4, 3, %o5 andcc %o4, 3, %o5
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
* Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
*/ */
#include <asm/cprefix.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/psr.h> #include <asm/psr.h>
#include <asm/smp.h> #include <asm/smp.h>
......
/* $Id: lshrdi3.S,v 1.1 1999/03/21 06:37:45 davem Exp $ */ /* $Id: lshrdi3.S,v 1.1 1999/03/21 06:37:45 davem Exp $ */
#include <asm/cprefix.h> .globl __lshrdi3
__lshrdi3:
.globl C_LABEL(__lshrdi3)
C_LABEL(__lshrdi3):
cmp %o2, 0 cmp %o2, 0
be 3f be 3f
mov 0x20, %g2 mov 0x20, %g2
......
#include <asm/cprefix.h>
.text .text
.align 4 .align 4
.global C_LABEL(__memcmp), C_LABEL(memcmp) .global __memcmp, memcmp
C_LABEL(__memcmp): __memcmp:
C_LABEL(memcmp): memcmp:
#if 1 #if 1
cmp %o2, 0 cmp %o2, 0
ble L3 ble L3
......
...@@ -9,13 +9,11 @@ ...@@ -9,13 +9,11 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <asm/cprefix.h>
#define FUNC(x) \ #define FUNC(x) \
.globl C_LABEL(x); \ .globl x; \
.type C_LABEL(x),@function; \ .type x,@function; \
.align 4; \ .align 4; \
C_LABEL(x): x:
#undef FASTER_REVERSE #undef FASTER_REVERSE
#undef FASTER_NONALIGNED #undef FASTER_NONALIGNED
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
*/ */
#include <asm/cprefix.h>
/* In essence, this is just a fancy strlen. */ /* In essence, this is just a fancy strlen. */
#define LO_MAGIC 0x01010101 #define LO_MAGIC 0x01010101
...@@ -13,9 +11,9 @@ ...@@ -13,9 +11,9 @@
.text .text
.align 4 .align 4
.globl C_LABEL(__memscan_zero), C_LABEL(__memscan_generic) .globl __memscan_zero, __memscan_generic
.globl C_LABEL(memscan) .globl memscan
C_LABEL(__memscan_zero): __memscan_zero:
/* %o0 = addr, %o1 = size */ /* %o0 = addr, %o1 = size */
cmp %o1, 0 cmp %o1, 0
bne,a 1f bne,a 1f
...@@ -114,8 +112,8 @@ mzero_found_it: ...@@ -114,8 +112,8 @@ mzero_found_it:
retl retl
sub %o0, 2, %o0 sub %o0, 2, %o0
C_LABEL(memscan): memscan:
C_LABEL(__memscan_generic): __memscan_generic:
/* %o0 = addr, %o1 = c, %o2 = size */ /* %o0 = addr, %o1 = c, %o2 = size */
cmp %o2, 0 cmp %o2, 0
bne,a 0f bne,a 0f
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
* occurs and we were called as clear_user. * occurs and we were called as clear_user.
*/ */
#include <asm/cprefix.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
/* Work around cpp -rob */ /* Work around cpp -rob */
...@@ -61,12 +60,12 @@ ...@@ -61,12 +60,12 @@
.globl __bzero_begin .globl __bzero_begin
__bzero_begin: __bzero_begin:
.globl C_LABEL(__bzero), C_LABEL(__memset), .globl __bzero, __memset,
.globl C_LABEL(memset) .globl memset
.globl C_LABEL(__memset_start), C_LABEL(__memset_end) .globl __memset_start, __memset_end
C_LABEL(__memset_start): __memset_start:
C_LABEL(__memset): __memset:
C_LABEL(memset): memset:
and %o1, 0xff, %g3 and %o1, 0xff, %g3
sll %g3, 8, %g2 sll %g3, 8, %g2
or %g3, %g2, %g3 or %g3, %g2, %g3
...@@ -90,7 +89,7 @@ C_LABEL(memset): ...@@ -90,7 +89,7 @@ C_LABEL(memset):
b 4f b 4f
sub %o0, %o2, %o0 sub %o0, %o2, %o0
C_LABEL(__bzero): __bzero:
mov %g0, %g3 mov %g0, %g3
1: 1:
cmp %o1, 7 cmp %o1, 7
...@@ -168,7 +167,7 @@ C_LABEL(__bzero): ...@@ -168,7 +167,7 @@ C_LABEL(__bzero):
0: 0:
retl retl
clr %o0 clr %o0
C_LABEL(__memset_end): __memset_end:
.section .fixup,#alloc,#execinstr .section .fixup,#alloc,#execinstr
.align 4 .align 4
...@@ -195,7 +194,7 @@ C_LABEL(__memset_end): ...@@ -195,7 +194,7 @@ C_LABEL(__memset_end):
save %sp, -104, %sp save %sp, -104, %sp
mov %i5, %o0 mov %i5, %o0
mov %i7, %o1 mov %i7, %o1
call C_LABEL(lookup_fault) call lookup_fault
mov %i4, %o2 mov %i4, %o2
ret ret
restore restore
......
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
* Copyright (C) 1996 Jakub Jelinek (jj@sunsite.mff.cuni.cz) * Copyright (C) 1996 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
*/ */
#include <asm/cprefix.h>
#define LO_MAGIC 0x01010101 #define LO_MAGIC 0x01010101
#define HI_MAGIC 0x80808080 #define HI_MAGIC 0x80808080
...@@ -42,8 +40,8 @@ ...@@ -42,8 +40,8 @@
mov 2, %o0 mov 2, %o0
.align 4 .align 4
.global C_LABEL(strlen) .global strlen
C_LABEL(strlen): strlen:
mov %o0, %o1 mov %o0, %o1
andcc %o0, 3, %g0 andcc %o0, 3, %g0
bne 0b bne 0b
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
* Copyright (C) 1996 Jakub Jelinek (jj@sunsite.mff.cuni.cz) * Copyright (C) 1996 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
*/ */
#include <asm/cprefix.h>
#define LO_MAGIC 0x01010101 #define LO_MAGIC 0x01010101
#define HI_MAGIC 0x80808080 #define HI_MAGIC 0x80808080
...@@ -47,10 +45,10 @@ ...@@ -47,10 +45,10 @@
mov 3, %o0 mov 3, %o0
.align 4 .align 4
.global C_LABEL(__strlen_user), C_LABEL(__strnlen_user) .global __strlen_user, __strnlen_user
C_LABEL(__strlen_user): __strlen_user:
sethi %hi(32768), %o1 sethi %hi(32768), %o1
C_LABEL(__strnlen_user): __strnlen_user:
mov %o1, %g1 mov %o1, %g1
mov %o0, %o1 mov %o0, %o1
andcc %o0, 3, %g0 andcc %o0, 3, %g0
......
...@@ -3,13 +3,11 @@ ...@@ -3,13 +3,11 @@
* generic strncmp routine. * generic strncmp routine.
*/ */
#include <asm/cprefix.h>
.text .text
.align 4 .align 4
.global C_LABEL(__strncmp), C_LABEL(strncmp) .global __strncmp, strncmp
C_LABEL(__strncmp): __strncmp:
C_LABEL(strncmp): strncmp:
mov %o0, %g3 mov %o0, %g3
mov 0, %o3 mov 0, %o3
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
* Copyright(C) 1996 David S. Miller * Copyright(C) 1996 David S. Miller
*/ */
#include <asm/cprefix.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/errno.h> #include <asm/errno.h>
...@@ -17,8 +16,8 @@ ...@@ -17,8 +16,8 @@
* bytes copied if we hit a null byte * bytes copied if we hit a null byte
*/ */
.globl C_LABEL(__strncpy_from_user) .globl __strncpy_from_user
C_LABEL(__strncpy_from_user): __strncpy_from_user:
/* %o0=dest, %o1=src, %o2=count */ /* %o0=dest, %o1=src, %o2=count */
mov %o2, %o3 mov %o2, %o3
1: 1:
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Makefile for the FPU instruction emulation. # Makefile for the FPU instruction emulation.
# #
obj-y := math.o ashldi3.o obj-y := math.o
EXTRA_AFLAGS := -ansi EXTRA_AFLAGS := -ansi
EXTRA_CFLAGS = -I. -I$(TOPDIR)/include/math-emu -w EXTRA_CFLAGS = -I. -I$(TOPDIR)/include/math-emu -w
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include <asm/page.h> #include <asm/page.h>
#include <asm/pgtsrmmu.h> #include <asm/pgtsrmmu.h>
#include <asm/viking.h> #include <asm/viking.h>
#include <asm/cprefix.h>
#include <asm/btfixup.h> #include <asm/btfixup.h>
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
......
...@@ -26,17 +26,17 @@ ...@@ -26,17 +26,17 @@
#define GET_PROCESSOR_MID(reg, tmp) \ #define GET_PROCESSOR_MID(reg, tmp) \
rd %tbr, %reg; \ rd %tbr, %reg; \
sethi %hi(C_LABEL(mid_xlate)), %tmp; \ sethi %hi(mid_xlate), %tmp; \
srl %reg, 12, %reg; \ srl %reg, 12, %reg; \
or %tmp, %lo(C_LABEL(mid_xlate)), %tmp; \ or %tmp, %lo(mid_xlate), %tmp; \
and %reg, 3, %reg; \ and %reg, 3, %reg; \
ldub [%tmp + %reg], %reg; ldub [%tmp + %reg], %reg;
#define GET_PROCESSOR_OFFSET(reg, tmp) \ #define GET_PROCESSOR_OFFSET(reg, tmp) \
GET_PROCESSOR_ID(reg) \ GET_PROCESSOR_ID(reg) \
sethi %hi(C_LABEL(cpu_offset)), %tmp; \ sethi %hi(cpu_offset), %tmp; \
sll %reg, 2, %reg; \ sll %reg, 2, %reg; \
or %tmp, %lo(C_LABEL(cpu_offset)), %tmp; \ or %tmp, %lo(cpu_offset), %tmp; \
ld [%tmp + %reg], %reg; ld [%tmp + %reg], %reg;
/* All trap entry points _must_ begin with this macro or else you /* All trap entry points _must_ begin with this macro or else you
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <linux/in6.h> #include <linux/in6.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/cprefix.h>
/* computes the checksum of a memory block at buff, length len, /* computes the checksum of a memory block at buff, length len,
* and adds in "sum" (32-bit) * and adds in "sum" (32-bit)
...@@ -51,7 +50,7 @@ csum_partial_copy_nocheck (const char *src, char *dst, int len, ...@@ -51,7 +50,7 @@ csum_partial_copy_nocheck (const char *src, char *dst, int len,
register int l asm("g1") = len; register int l asm("g1") = len;
__asm__ __volatile__ ( __asm__ __volatile__ (
"call " C_LABEL_STR(__csum_partial_copy_sparc_generic) "\n\t" "call __csum_partial_copy_sparc_generic\n\t"
" mov %6, %%g7\n" " mov %6, %%g7\n"
: "=&r" (ret), "=&r" (d), "=&r" (l) : "=&r" (ret), "=&r" (d), "=&r" (l)
: "0" (ret), "1" (d), "2" (l), "r" (sum) : "0" (ret), "1" (d), "2" (l), "r" (sum)
...@@ -81,7 +80,7 @@ csum_partial_copy_from_user(const char *src, char *dst, int len, ...@@ -81,7 +80,7 @@ csum_partial_copy_from_user(const char *src, char *dst, int len,
".word 1f,2\n\t" ".word 1f,2\n\t"
".previous\n" ".previous\n"
"1:\n\t" "1:\n\t"
"call " C_LABEL_STR(__csum_partial_copy_sparc_generic) "\n\t" "call __csum_partial_copy_sparc_generic\n\t"
" st %8, [%%sp + 64]\n" " st %8, [%%sp + 64]\n"
: "=&r" (ret), "=&r" (d), "=&r" (l), "=&r" (s) : "=&r" (ret), "=&r" (d), "=&r" (l), "=&r" (s)
: "0" (ret), "1" (d), "2" (l), "3" (s), "r" (err) : "0" (ret), "1" (d), "2" (l), "3" (s), "r" (err)
...@@ -110,7 +109,7 @@ csum_partial_copy_to_user(const char *src, char *dst, int len, ...@@ -110,7 +109,7 @@ csum_partial_copy_to_user(const char *src, char *dst, int len,
".word 1f,1\n\t" ".word 1f,1\n\t"
".previous\n" ".previous\n"
"1:\n\t" "1:\n\t"
"call " C_LABEL_STR(__csum_partial_copy_sparc_generic) "\n\t" "call __csum_partial_copy_sparc_generic\n\t"
" st %8, [%%sp + 64]\n" " st %8, [%%sp + 64]\n"
: "=&r" (ret), "=&r" (d), "=&r" (l), "=&r" (s) : "=&r" (ret), "=&r" (d), "=&r" (l), "=&r" (s)
: "0" (ret), "1" (d), "2" (l), "3" (s), "r" (err) : "0" (ret), "1" (d), "2" (l), "3" (s), "r" (err)
......
/* cprefix.h: This file is included by assembly source which needs
* to know what the c-label prefixes are. The newer versions
* of cpp that come with gcc predefine such things to help
* us out. The reason this stuff is needed is to make
* solaris compiles of the kernel work.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
*/
#ifndef __SPARC_CPREFIX_H
#define __SPARC_CPREFIX_H
#if defined(__svr4__) || defined(__ELF__)
#define C_LABEL_PREFIX
#define C_LABEL_STR(name) #name
#else
#define C_LABEL_PREFIX _
#define C_LABEL_STR(name) "_" #name
#endif
#define CONCAT(a, b) CONCAT2(a, b)
#define CONCAT2(a, b) a##b
#define C_LABEL(name) CONCAT(C_LABEL_PREFIX, name)
#endif /* !(__SPARC_CPREFIX_H) */
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
/* Data/text faults. Defaults to sun4c version at boot time. */ /* Data/text faults. Defaults to sun4c version at boot time. */
#define SPARC_TFAULT rd %psr, %l0; rd %wim, %l3; b sun4c_fault; mov 1, %l7; #define SPARC_TFAULT rd %psr, %l0; rd %wim, %l3; b sun4c_fault; mov 1, %l7;
#define SPARC_DFAULT rd %psr, %l0; rd %wim, %l3; b sun4c_fault; mov 0, %l7; #define SPARC_DFAULT rd %psr, %l0; rd %wim, %l3; b sun4c_fault; mov 0, %l7;
#define SRMMU_TFAULT rd %psr, %l0; rd %wim, %l3; b C_LABEL(srmmu_fault); mov 1, %l7; #define SRMMU_TFAULT rd %psr, %l0; rd %wim, %l3; b srmmu_fault; mov 1, %l7;
#define SRMMU_DFAULT rd %psr, %l0; rd %wim, %l3; b C_LABEL(srmmu_fault); mov 0, %l7; #define SRMMU_DFAULT rd %psr, %l0; rd %wim, %l3; b srmmu_fault; mov 0, %l7;
/* This is for traps we should NEVER get. */ /* This is for traps we should NEVER get. */
#define BAD_TRAP(num) \ #define BAD_TRAP(num) \
...@@ -41,17 +41,17 @@ ...@@ -41,17 +41,17 @@
/* Software trap for Linux system calls. */ /* Software trap for Linux system calls. */
#define LINUX_SYSCALL_TRAP \ #define LINUX_SYSCALL_TRAP \
sethi %hi(C_LABEL(sys_call_table)), %l7; \ sethi %hi(sys_call_table), %l7; \
or %l7, %lo(C_LABEL(sys_call_table)), %l7; \ or %l7, %lo(sys_call_table), %l7; \
b linux_sparc_syscall; \ b linux_sparc_syscall; \
rd %psr, %l0; rd %psr, %l0;
/* Software trap for SunOS4.1.x system calls. */ /* Software trap for SunOS4.1.x system calls. */
#define SUNOS_SYSCALL_TRAP \ #define SUNOS_SYSCALL_TRAP \
rd %psr, %l0; \ rd %psr, %l0; \
sethi %hi(C_LABEL(sunos_sys_table)), %l7; \ sethi %hi(sunos_sys_table), %l7; \
b linux_sparc_syscall; \ b linux_sparc_syscall; \
or %l7, %lo(C_LABEL(sunos_sys_table)), %l7; or %l7, %lo(sunos_sys_table), %l7;
#define SUNOS_NO_SYSCALL_TRAP \ #define SUNOS_NO_SYSCALL_TRAP \
b sunos_syscall; \ b sunos_syscall; \
...@@ -80,8 +80,8 @@ ...@@ -80,8 +80,8 @@
/* Software trap for Sparc-netbsd system calls. */ /* Software trap for Sparc-netbsd system calls. */
#define NETBSD_SYSCALL_TRAP \ #define NETBSD_SYSCALL_TRAP \
sethi %hi(C_LABEL(sys_call_table)), %l7; \ sethi %hi(sys_call_table), %l7; \
or %l7, %lo(C_LABEL(sys_call_table)), %l7; \ or %l7, %lo(sys_call_table), %l7; \
b bsd_syscall; \ b bsd_syscall; \
rd %psr, %l0; rd %psr, %l0;
......
...@@ -106,9 +106,9 @@ ...@@ -106,9 +106,9 @@
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
#define LOAD_CURRENT4M(dest_reg, idreg) \ #define LOAD_CURRENT4M(dest_reg, idreg) \
rd %tbr, %idreg; \ rd %tbr, %idreg; \
sethi %hi(C_LABEL(current_set)), %dest_reg; \ sethi %hi(current_set), %dest_reg; \
srl %idreg, 10, %idreg; \ srl %idreg, 10, %idreg; \
or %dest_reg, %lo(C_LABEL(current_set)), %dest_reg; \ or %dest_reg, %lo(current_set), %dest_reg; \
and %idreg, 0xc, %idreg; \ and %idreg, 0xc, %idreg; \
ld [%idreg + %dest_reg], %dest_reg; ld [%idreg + %dest_reg], %dest_reg;
...@@ -119,15 +119,15 @@ ...@@ -119,15 +119,15 @@
/* Blackbox - take care with this... - check smp4m and smp4d before changing this. */ /* Blackbox - take care with this... - check smp4m and smp4d before changing this. */
#define LOAD_CURRENT(dest_reg, idreg) \ #define LOAD_CURRENT(dest_reg, idreg) \
sethi %hi(___b_load_current), %idreg; \ sethi %hi(___b_load_current), %idreg; \
sethi %hi(C_LABEL(current_set)), %dest_reg; \ sethi %hi(current_set), %dest_reg; \
sethi %hi(C_LABEL(boot_cpu_id4)), %idreg; \ sethi %hi(boot_cpu_id4), %idreg; \
or %dest_reg, %lo(C_LABEL(current_set)), %dest_reg; \ or %dest_reg, %lo(current_set), %dest_reg; \
ldub [%idreg + %lo(C_LABEL(boot_cpu_id4))], %idreg; \ ldub [%idreg + %lo(boot_cpu_id4)], %idreg; \
ld [%idreg + %dest_reg], %dest_reg; ld [%idreg + %dest_reg], %dest_reg;
#else #else
#define LOAD_CURRENT(dest_reg, idreg) \ #define LOAD_CURRENT(dest_reg, idreg) \
sethi %hi(C_LABEL(current_set)), %idreg; \ sethi %hi(current_set), %idreg; \
ld [%idreg + %lo(C_LABEL(current_set))], %dest_reg; ld [%idreg + %lo(current_set)], %dest_reg;
#endif #endif
#endif /* !(_SPARC_WINMACRO_H) */ #endif /* !(_SPARC_WINMACRO_H) */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment