head 1.8; access; symbols perseant-exfatfs-base-20250801:1.8 perseant-exfatfs-base-20240630:1.8 cjep_sun2x:1.8.0.44 cjep_sun2x-base:1.8 cjep_staticlib_x-base1:1.8 cjep_staticlib_x:1.8.0.42 cjep_staticlib_x-base:1.8 phil-wifi-20200421:1.8 phil-wifi-20200411:1.8 phil-wifi-20200406:1.8 pgoyette-compat-merge-20190127:1.8 pgoyette-compat-20190127:1.8 pgoyette-compat-20190118:1.8 pgoyette-compat-1226:1.8 pgoyette-compat-1126:1.8 pgoyette-compat-1020:1.8 pgoyette-compat-0930:1.8 pgoyette-compat-0906:1.8 pgoyette-compat-0728:1.8 pgoyette-compat-0625:1.8 pgoyette-compat-0521:1.8 pgoyette-compat-0502:1.8 pgoyette-compat-0422:1.8 pgoyette-compat-0415:1.8 pgoyette-compat-0407:1.8 pgoyette-compat-0330:1.8 pgoyette-compat-0322:1.8 pgoyette-compat-0315:1.8 pgoyette-compat:1.8.0.40 pgoyette-compat-base:1.8 perseant-stdc-iso10646:1.8.0.38 perseant-stdc-iso10646-base:1.8 prg-localcount2-base3:1.8 prg-localcount2-base2:1.8 prg-localcount2-base1:1.8 prg-localcount2:1.8.0.36 prg-localcount2-base:1.8 pgoyette-localcount-20170426:1.8 bouyer-socketcan-base1:1.8 pgoyette-localcount-20170320:1.8 bouyer-socketcan:1.8.0.34 bouyer-socketcan-base:1.8 pgoyette-localcount-20170107:1.8 pgoyette-localcount-20161104:1.8 localcount-20160914:1.8 pgoyette-localcount-20160806:1.8 pgoyette-localcount-20160726:1.8 pgoyette-localcount:1.8.0.32 pgoyette-localcount-base:1.8 netbsd-5-2-3-RELEASE:1.8 netbsd-5-1-5-RELEASE:1.8 yamt-pagecache-base9:1.8 yamt-pagecache-tag8:1.8 tls-earlyentropy:1.8.0.28 tls-earlyentropy-base:1.8 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.8 riastradh-drm2-base3:1.8 netbsd-5-2-2-RELEASE:1.8 netbsd-5-1-4-RELEASE:1.8 netbsd-5-2-1-RELEASE:1.8 netbsd-5-1-3-RELEASE:1.8 agc-symver:1.8.0.30 agc-symver-base:1.8 tls-maxphys-base:1.8 yamt-pagecache-base8:1.8 netbsd-5-2:1.8.0.26 yamt-pagecache-base7:1.8 netbsd-5-2-RELEASE:1.8 netbsd-5-2-RC1:1.8 yamt-pagecache-base6:1.8 yamt-pagecache-base5:1.8 yamt-pagecache-base4:1.8 netbsd-5-1-2-RELEASE:1.8 netbsd-5-1-1-RELEASE:1.8 yamt-pagecache-base3:1.8 yamt-pagecache-base2:1.8 yamt-pagecache:1.8.0.24 yamt-pagecache-base:1.8 bouyer-quota2-nbase:1.8 bouyer-quota2:1.8.0.22 bouyer-quota2-base:1.8 matt-nb5-pq3:1.8.0.20 matt-nb5-pq3-base:1.8 netbsd-5-1:1.8.0.18 netbsd-5-1-RELEASE:1.8 netbsd-5-1-RC4:1.8 netbsd-5-1-RC3:1.8 netbsd-5-1-RC2:1.8 netbsd-5-1-RC1:1.8 netbsd-5-0-2-RELEASE:1.8 netbsd-5-0-1-RELEASE:1.8 jym-xensuspend-nbase:1.8 netbsd-5-0:1.8.0.16 netbsd-5-0-RELEASE:1.8 netbsd-5-0-RC4:1.8 netbsd-5-0-RC3:1.8 netbsd-5-0-RC2:1.8 jym-xensuspend:1.8.0.14 jym-xensuspend-base:1.8 netbsd-5-0-RC1:1.8 netbsd-5:1.8.0.12 netbsd-5-base:1.8 mjf-devfs2:1.8.0.10 mjf-devfs2-base:1.8 yamt-pf42-base4:1.8 yamt-pf42-base3:1.8 hpcarm-cleanup-nbase:1.8 yamt-pf42-base2:1.8 yamt-pf42:1.8.0.8 yamt-pf42-base:1.8 keiichi-mipv6:1.8.0.6 keiichi-mipv6-base:1.8 cube-autoconf:1.8.0.4 cube-autoconf-base:1.8 hpcarm-cleanup:1.8.0.2 hpcarm-cleanup-base:1.8 netbsd-1-3-PATCH003:1.6 netbsd-1-3-PATCH003-CANDIDATE2:1.6 netbsd-1-3-PATCH003-CANDIDATE1:1.6 netbsd-1-3-PATCH003-CANDIDATE0:1.6 ARM32-BROKEN-RELOCS:1.7.0.2 netbsd-1-3-PATCH002:1.6 netbsd-1-3-PATCH001:1.6 netbsd-1-3-RELEASE:1.6 netbsd-1-3-BETA:1.6 netbsd-1-3:1.6.0.2 netbsd-1-3-base:1.6; locks; strict; comment @# @; 1.8 date 98.12.17.15.38.57; author pk; state dead; branches; next 1.7; 1.7 date 98.01.05.22.00.42; author cgd; state Exp; branches; next 1.6; 1.6 date 97.07.11.23.39.56; author matthias; state Exp; branches; next 1.5; 1.5 date 97.07.09.19.32.54; author matthias; state Exp; branches; next 1.4; 1.4 date 96.07.31.06.22.41; author phil; state Exp; branches; next 1.3; 1.3 date 95.05.29.18.11.35; author phil; state Exp; branches 1.3.6.1; next 1.2; 1.2 date 94.12.04.08.26.22; author mycroft; state Exp; branches; next 1.1; 1.1 date 94.04.07.19.44.50; author pk; state Exp; branches; next ; 1.3.6.1 date 96.07.31.15.58.00; author jtc; state Exp; branches; next ; desc @@ 1.8 log @These files now live in `src/libexec/ld.aout_so/arch' @ text @/* $NetBSD: mdprologue.S,v 1.7 1998/01/05 22:00:42 cgd Exp $ */ /* * Copyright (c) 1994 Matthias Pfaller. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Matthias Pfaller. * 4. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * Run-time link editor entry points for ns32k architecture. */ #include /* * rtld_entry(int version, struct crt_ldso *crtp) */ ENTRY_NOPROFILE(rtl_entry) enter [],0 sprd sb,tos addr _C_LABEL(_GLOBAL_OFFSET_TABLE_)(pc),r0 lprd sb,r0 /* PIC function prologue */ movd 12(fp),r0 /* -> crt_ldso structure */ movd 0(r0),r1 /* base address */ /* 1st entry in GOT */ /* + ld.so base address */ addr 0(0(sb))[r1:b],tos /* gives address of __DYNAMIC */ movd r0,tos /* crt_ldso pointer */ movd 8(fp),tos /* version */ jsr 0(_C_LABEL(rtld)(sb))[r1:b] /* call _rtld function */ lprd sb,-4(fp) exit [] ret 0 /* * First call to a procedure generally comes through here for * binding. */ ENTRY_NOPROFILE(binder_entry) save [r0,r1,r2] /* preserve scratch registers */ /* save r0 (for cerror) */ /* save r1 (maybe static chain) */ /* save r2 (maybe struct addr) */ addr -6(12(sp)),tos /* push address of PLT slot */ bsr _C_LABEL(binder) /* relocate function address */ cmpqd 0,tos movd r0,12(sp) /* prepare for jump */ restore [r0,r1,r2] /* restore scratch registers */ ret 0 /* jump into function */ /* Force cache line corresponding to address argument to be loaded */ .text /* * Now we have to 0x200-align the text segment. * We know that the a.out header is 0x20 bytes long. * The code so far is less then 0x1e0 bytes. So we * advance "." to address 0x1e0. */ .org 0x1e0 /* * We are at address 0x200 now. */ 0: ret 0; /* 0000 */ ASGLOBAL(_C_LABEL(cinv)) movd S_ARG0,r0 /* 0002 */ andd 0x1f0,r0 /* 0005 */ jump 0b(pc)[r0:b] /* 000b */ /* 000f */ .align 4,0xa2; ret 0 /* 0010 */ .align 4,0xa2; ret 0 /* 0020 */ .align 4,0xa2; ret 0 /* 0030 */ .align 4,0xa2; ret 0 /* 0040 */ .align 4,0xa2; ret 0 /* 0050 */ .align 4,0xa2; ret 0 /* 0060 */ .align 4,0xa2; ret 0 /* 0070 */ .align 4,0xa2; ret 0 /* 0080 */ .align 4,0xa2; ret 0 /* 0090 */ .align 4,0xa2; ret 0 /* 00a0 */ .align 4,0xa2; ret 0 /* 00b0 */ .align 4,0xa2; ret 0 /* 00c0 */ .align 4,0xa2; ret 0 /* 00d0 */ .align 4,0xa2; ret 0 /* 00e0 */ .align 4,0xa2; ret 0 /* 00f0 */ .align 4,0xa2; ret 0 /* 0100 */ .align 4,0xa2; ret 0 /* 0110 */ .align 4,0xa2; ret 0 /* 0120 */ .align 4,0xa2; ret 0 /* 0130 */ .align 4,0xa2; ret 0 /* 0140 */ .align 4,0xa2; ret 0 /* 0150 */ .align 4,0xa2; ret 0 /* 0160 */ .align 4,0xa2; ret 0 /* 0170 */ .align 4,0xa2; ret 0 /* 0180 */ .align 4,0xa2; ret 0 /* 0190 */ .align 4,0xa2; ret 0 /* 01a0 */ .align 4,0xa2; ret 0 /* 01b0 */ .align 4,0xa2; ret 0 /* 01c0 */ .align 4,0xa2; ret 0 /* 01d0 */ .align 4,0xa2; ret 0 /* 01e0 */ .align 4,0xa2; ret 0 /* 01f0 */ @ 1.7 log @RCS Id police @ text @d1 1 a1 1 /* $NetBSD$ */ @ 1.6 log @* Truncate the cinv table. It was twice as long as necessary as a result of an earlier version of th code. * Really align the cinv table modulo 0x200. Thank's to Ian for telling me where I goofed up. @ text @d1 2 a30 2 * * $Id: mdprologue.S,v 1.4 1996/07/31 06:22:41 phil Exp $ @ 1.5 log @* Flush the icache from user mode. The original code and the idea came from Ian Dall. I just did some slight optimizations. @ text @d84 2 a85 2 * The code so far is less then 0x60 bytes. * So we first do a 0x80-align. d88 1 a88 1 .align 7,0xa2 d91 1 a91 9 * Now we are at address 0xa0. Skip over the * remaining 0x60 bytes. */ .long 0,0,0,0,0,0,0,0 .long 0,0,0,0,0,0,0,0 .long 0,0,0,0,0,0,0,0 /* * We are at address 0x100 now. a131 33 .align 4,0xa2; ret 0 /* 0000 */ .align 4,0xa2; ret 0 /* 0010 */ .align 4,0xa2; ret 0 /* 0020 */ .align 4,0xa2; ret 0 /* 0030 */ .align 4,0xa2; ret 0 /* 0040 */ .align 4,0xa2; ret 0 /* 0050 */ .align 4,0xa2; ret 0 /* 0060 */ .align 4,0xa2; ret 0 /* 0070 */ .align 4,0xa2; ret 0 /* 0080 */ .align 4,0xa2; ret 0 /* 0090 */ .align 4,0xa2; ret 0 /* 00a0 */ .align 4,0xa2; ret 0 /* 00b0 */ .align 4,0xa2; ret 0 /* 00c0 */ .align 4,0xa2; ret 0 /* 00d0 */ .align 4,0xa2; ret 0 /* 00e0 */ .align 4,0xa2; ret 0 /* 00f0 */ .align 4,0xa2; ret 0 /* 0100 */ .align 4,0xa2; ret 0 /* 0110 */ .align 4,0xa2; ret 0 /* 0120 */ .align 4,0xa2; ret 0 /* 0130 */ .align 4,0xa2; ret 0 /* 0140 */ .align 4,0xa2; ret 0 /* 0150 */ .align 4,0xa2; ret 0 /* 0160 */ .align 4,0xa2; ret 0 /* 0170 */ .align 4,0xa2; ret 0 /* 0180 */ .align 4,0xa2; ret 0 /* 0190 */ .align 4,0xa2; ret 0 /* 01a0 */ .align 4,0xa2; ret 0 /* 01b0 */ .align 4,0xa2; ret 0 /* 01c0 */ .align 4,0xa2; ret 0 /* 01d0 */ .align 4,0xa2; ret 0 /* 01e0 */ .align 4,0xa2; ret 0 /* 01f0 */ @ 1.4 log @Fix for dynamically linked functions returning structs. PR#2586/Pfaller @ text @d30 1 a30 1 * $Id: mdprologue.S,v 1.3 1995/05/29 18:11:35 phil Exp $ d37 1 a37 2 .text .globl _rtld_entry, _binder_entry, _binder d40 1 a40 1 * _rtld_entry(int version, struct crt_ldso *crtp) d43 1 a43 1 _rtl_entry: d46 1 a46 1 addr __GLOBAL_OFFSET_TABLE_(pc),r0 d55 1 a55 1 jsr 0(_rtld(sb))[r1:b] /* call _rtld function */ d65 1 a65 1 _binder_entry: d71 1 a71 1 bsr _binder /* relocate function address */ d76 97 @ 1.3 log @Correct copyright. @ text @d30 1 a30 1 * $Id: mdprologue.S,v 1.2 1994/12/04 08:26:22 mycroft Exp $ d67 5 a71 4 movd tos,r1 /* grab return address (within PLT) */ movd r0,tos /* save r0 (for cerror) */ movzwd 0(r1),tos /* get function index */ addr -6(r1),tos /* point to PLT slot */ d73 4 a76 3 movd r0,tos /* prepare for jump */ movd 12(sp),r0 /* restore r0 */ ret 12 /* jump into function */ @ 1.3.6.1 log @Pulled up from rev 1.4 by request from Phil Nelson @ text @d30 1 a30 1 * $Id: mdprologue.S,v 1.4 1996/07/31 06:22:41 phil Exp $ d67 4 a70 5 save [r0,r1,r2] /* preserve scratch registers */ /* save r0 (for cerror) */ /* save r1 (maybe static chain) */ /* save r2 (maybe struct addr) */ addr -6(12(sp)),tos /* push address of PLT slot */ d72 3 a74 4 cmpqd 0,tos movd r0,12(sp) /* prepare for jump */ restore [r0,r1,r2] /* restore scratch registers */ ret 0 /* jump into function */ @ 1.2 log @Fix some other broken comments. @ text @d2 1 a2 1 * Copyright (c) 1994 Matthias Pfaller d15 1 a15 1 * This product includes software developed by Paul Mackerras. d30 1 a30 1 * $Id: mdprologue.S,v 1.1 1994/04/07 19:44:50 pk Exp $ @ 1.1 log @ns32k support by Matthias Pfaller. @ text @d30 1 a30 1 * $Id$ d68 1 a68 1 movd r0,tos /* save r0 (that's for cerror) */ @