Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm32 provide an __ELF__ version of _C_FUNC and _C_...



details:   https://anonhg.NetBSD.org/src/rev/899df74c2b53
branches:  trunk
changeset: 477651:899df74c2b53
user:      cgd <cgd%NetBSD.org@localhost>
date:      Tue Oct 26 06:53:41 1999 +0000

description:
provide an __ELF__ version of _C_FUNC and _C_LABEL, convert the assembly
#defines in asm.h to use them, and convert code which needs to use C labels
to use _C_LABEL as well.  (I can't see any reason why the label vs. function
differentiation shouldn't be GC'd; i only added uses of _C_LABEL.)  This
should help if this port is converted to use ELF, and was checked by
compiling all kernels in arm32/conf (with some driver removals and some
MI header fixups re: common blocks) with an arm-linux ELF toolchain.

diffstat:

 sys/arch/arm32/arm32/bcopyinout.S           |   8 +-
 sys/arch/arm32/arm32/blockio.S              |  10 ++--
 sys/arch/arm32/arm32/copystr.S              |   6 +-
 sys/arch/arm32/arm32/cpufunc_asm.S          |  28 +++++-----
 sys/arch/arm32/arm32/cpuswitch.S            |  42 ++++++++--------
 sys/arch/arm32/arm32/exception.S            |  36 +++++++-------
 sys/arch/arm32/arm32/fusu.S                 |  20 ++++----
 sys/arch/arm32/arm32/locore.S               |  34 +++++++-------
 sys/arch/arm32/arm32/spl.S                  |  18 +++---
 sys/arch/arm32/dev/bus_space_notimpl.S      |   8 +-
 sys/arch/arm32/footbridge/footbridge_irq.S  |  68 ++++++++++++++--------------
 sys/arch/arm32/fpe-arm/armfpe_glue.S        |   4 +-
 sys/arch/arm32/include/asm.h                |  26 +++++++---
 sys/arch/arm32/iomd/iomd_fiq.S              |  14 ++--
 sys/arch/arm32/iomd/iomd_iic.S              |   6 +-
 sys/arch/arm32/iomd/iomd_io_asm.S           |   6 +-
 sys/arch/arm32/iomd/iomd_irq.S              |  62 ++++++++++++------------
 sys/arch/arm32/isa/isa_irq.S                |  66 +++++++++++++-------------
 sys/arch/arm32/mainbus/mainbus_io_asm.S     |   6 +-
 sys/arch/arm32/ofw/ofw_irq.S                |  70 ++++++++++++++--------------
 sys/arch/arm32/podulebus/icside_io_asm.S    |   6 +-
 sys/arch/arm32/podulebus/podulebus_io_asm.S |   6 +-
 sys/arch/arm32/podulebus/simide_io_asm.S    |   6 +-
 sys/arch/arm32/shark/fiq.S                  |  19 ++++---
 24 files changed, 292 insertions(+), 283 deletions(-)

diffs (truncated from 1788 to 300 lines):

diff -r 2a43124f0eba -r 899df74c2b53 sys/arch/arm32/arm32/bcopyinout.S
--- a/sys/arch/arm32/arm32/bcopyinout.S Tue Oct 26 06:38:31 1999 +0000
+++ b/sys/arch/arm32/arm32/bcopyinout.S Tue Oct 26 06:53:41 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcopyinout.S,v 1.19 1999/05/19 07:50:06 scw Exp $      */
+/*     $NetBSD: bcopyinout.S,v 1.20 1999/10/26 06:53:41 cgd Exp $      */
 
 /*
  * Copyright (c) 1995-1998 Mark Brinicombe.
@@ -47,7 +47,7 @@
        .text
        .align  0
 Lcurpcb:
-       .word   _curpcb
+       .word   _C_LABEL(curpcb)
 
 Lvm_min_address:
        .word   VM_MIN_ADDRESS
@@ -156,7 +156,7 @@
        ldr     r3, Lpgbase
        sub     r0, r6, r3
        mov     r0, r0, lsl #(PGSHIFT-2)        /* calculate VA of page */
-       bl      _cowfault
+       bl      _C_LABEL(cowfault)
        mov     r3, r0
        ldmfd   sp!, {r0-r2, lr}
        teq     r3, #0                          /* check for error return */
@@ -235,7 +235,7 @@
        mov     r2, r1
        mov     r1, r0
        add     r0, pc, #Lcopyinouttext - . - 8
-       b       _panic
+       b       _C_LABEL(panic)
 
 Lcopyinouttext:
        .asciz  "No valid PCB during copyinout() addr1=%08x addr2=%08x\n"
diff -r 2a43124f0eba -r 899df74c2b53 sys/arch/arm32/arm32/blockio.S
--- a/sys/arch/arm32/arm32/blockio.S    Tue Oct 26 06:38:31 1999 +0000
+++ b/sys/arch/arm32/arm32/blockio.S    Tue Oct 26 06:53:41 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: blockio.S,v 1.8 1998/12/12 17:28:05 mycroft Exp $      */
+/*     $NetBSD: blockio.S,v 1.9 1999/10/26 06:53:41 cgd Exp $  */
 
 /*
  * Copyright (c) 1994 Mark Brinicombe.
@@ -175,7 +175,7 @@
        tst     r2, #0x00000007
        tsteq   r1, #0x00000003
 
-       bne     _insw
+       bne     _C_LABEL(insw)
 
 /* Word aligned insw */
 
@@ -233,7 +233,7 @@
        tst     r2, #0x00000007
        tsteq   r1, #0x00000003
 
-       bne     _outsw
+       bne     _C_LABEL(outsw)
 
 /* Word aligned outsw */
 
@@ -301,7 +301,7 @@
 
        tst     r1, #0x00000003
 
-       bne     _insw
+       bne     _C_LABEL(insw)
 
 /* Word aligned insw */
 
@@ -397,7 +397,7 @@
 
        tst     r1, #0x00000003
 
-       bne     _outsw
+       bne     _C_LABEL(outsw)
 
 /* Word aligned outsw */
 
diff -r 2a43124f0eba -r 899df74c2b53 sys/arch/arm32/arm32/copystr.S
--- a/sys/arch/arm32/arm32/copystr.S    Tue Oct 26 06:38:31 1999 +0000
+++ b/sys/arch/arm32/arm32/copystr.S    Tue Oct 26 06:53:41 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: copystr.S,v 1.9 1998/06/17 20:10:39 mark Exp $ */
+/*     $NetBSD: copystr.S,v 1.10 1999/10/26 06:53:41 cgd Exp $ */
 
 /*
  * Copyright (c) 1995 Mark Brinicombe.
@@ -45,7 +45,7 @@
        .text
        .align  0
 Lcurpcb:
-       .word   _curpcb
+       .word   _C_LABEL(curpcb)
 
 Lvm_min_address:
        .word   VM_MIN_ADDRESS
@@ -203,7 +203,7 @@
        mov     r2, r1
        mov     r1, r0
        add     r0, pc, #Lcopystrpcbfaulttext - . - 8
-       b       _panic
+       b       _C_LABEL(panic)
 
 Lcopystrpcbfaulttext:
        .asciz  "No valid PCB during copyinoutstr() addr1=%08x addr2=%08x\n"
diff -r 2a43124f0eba -r 899df74c2b53 sys/arch/arm32/arm32/cpufunc_asm.S
--- a/sys/arch/arm32/arm32/cpufunc_asm.S        Tue Oct 26 06:38:31 1999 +0000
+++ b/sys/arch/arm32/arm32/cpufunc_asm.S        Tue Oct 26 06:53:41 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpufunc_asm.S,v 1.9 1998/12/12 17:28:05 mycroft Exp $  */
+/*     $NetBSD: cpufunc_asm.S,v 1.10 1999/10/26 06:53:41 cgd Exp $     */
 
 /*
  * arm8 support code Copyright (c) 1997 ARM Limited
@@ -183,7 +183,7 @@
        msr     cpsr_all , r1
 
        stmfd   sp!, {r0-r3, lr}
-       bl      _arm8_cache_cleanID
+       bl      _C_LABEL(arm8_cache_cleanID)
        ldmfd   sp!, {r0-r3, lr}
        mcr     15, 0, r0, c7, c7, 0            /* flush I+D cache */
 
@@ -207,7 +207,7 @@
 
 #ifdef CPU_SA110
 Lblock_userspace_access:
-       .word   _block_userspace_access
+       .word   _C_LABEL(block_userspace_access)
 
 ENTRY(sa110_setttb)
        /* We need to flush the cache as it uses virtual addresses that are about to change */
@@ -222,7 +222,7 @@
        str     r1, [r3]
 #endif
        stmfd   sp!, {r0-r3, lr}
-       bl      _sa110_cache_cleanID
+       bl      _C_LABEL(sa110_cache_cleanID)
        ldmfd   sp!, {r0-r3, lr}
        mcr     15, 0, r0, c7, c5, 0
        mcr     15, 0, r0, c7, c10, 4
@@ -486,18 +486,18 @@
  */
 
        .data
-       .global _sa110_cache_clean_addr
-_sa110_cache_clean_addr:
+       .global _C_LABEL(sa110_cache_clean_addr)
+_C_LABEL(sa110_cache_clean_addr):
        .word   0xf0000000
-       .global _sa110_cache_clean_size
-_sa110_cache_clean_size:
+       .global _C_LABEL(sa110_cache_clean_size)
+_C_LABEL(sa110_cache_clean_size):
        .word   0x00008000
 
        .text
 Lsa110_cache_clean_addr:
-       .word   _sa110_cache_clean_addr
+       .word   _C_LABEL(sa110_cache_clean_addr)
 Lsa110_cache_clean_size:
-       .word   _sa110_cache_clean_size
+       .word   _C_LABEL(sa110_cache_clean_size)
 
 ENTRY(sa110_cache_cleanID)
 ENTRY(sa110_cache_cleanD)
@@ -645,7 +645,7 @@
 ENTRY(sa110_cache_cleanID_rng)
 ENTRY(sa110_cache_cleanD_rng)
        cmp     r1, #0x4000
-       bcs     _sa110_cache_cleanID
+       bcs     _C_LABEL(sa110_cache_cleanID)
 
        and     r2, r0, #0x1f
        add     r1, r1, r2
@@ -661,7 +661,7 @@
 
 ENTRY(sa110_cache_purgeID_rng)
        cmp     r1, #0x2000
-       bcs     _sa110_cache_purgeID
+       bcs     _C_LABEL(sa110_cache_purgeID)
 
        and     r2, r0, #0x1f
        add     r1, r1, r2
@@ -680,7 +680,7 @@
 
 ENTRY(sa110_cache_purgeD_rng)
        cmp     r1, #0x2000
-       bcs     _sa110_cache_purgeD
+       bcs     _C_LABEL(sa110_cache_purgeD)
 
        and     r2, r0, #0x1f
        add     r1, r1, r2
@@ -697,7 +697,7 @@
 
 ENTRY(sa110_cache_syncI_rng)
        cmp     r1, #0x4000
-       bcs     _sa110_cache_syncI
+       bcs     _C_LABEL(sa110_cache_syncI)
 
        and     r2, r0, #0x1f
        add     r1, r1, r2
diff -r 2a43124f0eba -r 899df74c2b53 sys/arch/arm32/arm32/cpuswitch.S
--- a/sys/arch/arm32/arm32/cpuswitch.S  Tue Oct 26 06:38:31 1999 +0000
+++ b/sys/arch/arm32/arm32/cpuswitch.S  Tue Oct 26 06:53:41 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpuswitch.S,v 1.30 1999/03/24 12:41:27 tron Exp $      */
+/*     $NetBSD: cpuswitch.S,v 1.31 1999/10/26 06:53:41 cgd Exp $       */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -78,10 +78,10 @@
        .text
 
 Lwhichqs:
-       .word   _whichqs
+       .word   _C_LABEL(whichqs)
 
 Lqs:
-       .word   _qs
+       .word   _C_LABEL(qs)
 
 /*
  * On entry
@@ -142,12 +142,12 @@
        mov     r2, r1
        mov     r1, r0
        add     r0, pc, #Ltext1 - . - 8
-       bl      _printf
+       bl      _C_LABEL(printf)
 
        ldr     r2, Lqs
        ldr     r1, [r2]
        add     r0, pc, #Ltext2 - . - 8
-       b       _panic  
+       b       _C_LABEL(panic) 
 
 Ltext1:
        .asciz  "setrunqueue : %08x %08x\n"
@@ -208,25 +208,25 @@
  */
 
 Lcurproc:
-       .word   _curproc
+       .word   _C_LABEL(curproc)
 
 Lcurpcb:
-       .word   _curpcb
+       .word   _C_LABEL(curpcb)
 
 Lwant_resched:
-       .word   _want_resched
+       .word   _C_LABEL(want_resched)
 
 Lcpufuncs:     
-       .word   _cpufuncs
+       .word   _C_LABEL(cpufuncs)
        
        .data
-       .global _curpcb
-_curpcb:
+       .global _C_LABEL(curpcb)
+_C_LABEL(curpcb):
        .word   0x00000000
        .text
 
 Lblock_userspace_access:
-       .word   _block_userspace_access
+       .word   _C_LABEL(block_userspace_access)
 
 /*
  * Idle loop, exercised while waiting for a process to wake up.
@@ -293,9 +293,9 @@
 
 #ifdef spl0
        mov     r0, #(_SPL_0)
-       bl      _splx
+       bl      _C_LABEL(splx)
 #else
-       bl      _spl0
+       bl      _C_LABEL(spl0)
 #endif
 
        /* Push the old spl level onto the stack */
@@ -336,7 +336,7 @@
 
        add     r0, pc, #switchpanic - . - 8
        mrs     r1, cpsr_all
-       bl      _panic
+       bl      _C_LABEL(panic)
 
 switchpanic:
        .asciz  "Yikes! In cpu_switch() but not in SVC mode (%08x)\n"
@@ -562,7 +562,7 @@
 #ifdef ARMFPE
        add     r0, r1, #(USER_SIZE) & 0x00ff
        add     r0, r0, #(USER_SIZE) & 0xff00 



Home | Main Index | Thread Index | Old Index