diff options
Diffstat (limited to 'sys/arch/vax/include')
-rw-r--r-- | sys/arch/vax/include/asm.h | 8 | ||||
-rw-r--r-- | sys/arch/vax/include/cdefs.h | 19 | ||||
-rw-r--r-- | sys/arch/vax/include/db_machdep.h | 10 | ||||
-rw-r--r-- | sys/arch/vax/include/endian.h | 6 | ||||
-rw-r--r-- | sys/arch/vax/include/macros.h | 81 | ||||
-rw-r--r-- | sys/arch/vax/include/pmap.h | 8 | ||||
-rw-r--r-- | sys/arch/vax/include/profile.h | 4 | ||||
-rw-r--r-- | sys/arch/vax/include/reloc.h | 18 | ||||
-rw-r--r-- | sys/arch/vax/include/vmparam.h | 4 |
9 files changed, 89 insertions, 69 deletions
diff --git a/sys/arch/vax/include/asm.h b/sys/arch/vax/include/asm.h index b0dd01c8104..03c373bc340 100644 --- a/sys/arch/vax/include/asm.h +++ b/sys/arch/vax/include/asm.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm.h,v 1.11 2013/03/28 17:41:04 martynas Exp $ */ +/* $OpenBSD: asm.h,v 1.12 2013/07/05 21:10:50 miod Exp $ */ /* $NetBSD: asm.h,v 1.9 1999/01/15 13:31:28 bouyer Exp $ */ /* * Copyright (c) 1982, 1993 @@ -69,11 +69,7 @@ /* let kernels and others override entrypoint alignment */ #ifndef _ALIGN_TEXT -# ifdef __ELF__ -# define _ALIGN_TEXT .align 4 -# else -# define _ALIGN_TEXT .align 2 -# endif +# define _ALIGN_TEXT .align 2 #endif #define _ALTENTRY(x) \ diff --git a/sys/arch/vax/include/cdefs.h b/sys/arch/vax/include/cdefs.h index 64646df2add..a1e0015d56b 100644 --- a/sys/arch/vax/include/cdefs.h +++ b/sys/arch/vax/include/cdefs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cdefs.h,v 1.8 2013/03/28 17:30:45 martynas Exp $ */ +/* $OpenBSD: cdefs.h,v 1.9 2013/07/05 21:10:50 miod Exp $ */ /* * Written by J.T. Conklin <jtc@wimsey.com> 01/17/95. @@ -8,15 +8,14 @@ #ifndef _MACHINE_CDEFS_H_ #define _MACHINE_CDEFS_H_ -#define __indr_reference(sym,alias) \ - __asm__(".stabs \"_" #alias "\",11,0,0,0"); \ - __asm__(".stabs \"_" #sym "\",1,0,0,0") -#define __warn_references(sym,msg) \ - __asm__(".stabs \"" msg "\",30,0,0,0"); \ - __asm__(".stabs \"_" #sym "\",1,0,0,0") +#define __warn_references(sym,msg) \ + __asm__(".section .gnu.warning." __STRING(sym) \ + " ; .ascii \"" msg "\" ; .text") #define __strong_alias(alias,sym) \ - __asm__(".global _" #alias "; _" #alias "= _" __STRING(sym)) -#define __weak_alias(alias,sym) \ - __asm__(".weak _" #alias "; _" #alias "= _" __STRING(sym)) + __asm__(".global " __STRING(alias) " ; " __STRING(alias) \ + " = " __STRING(sym)) +#define __weak_alias(alias,sym) \ + __asm__(".weak " __STRING(alias) " ; " __STRING(alias) \ + " = " __STRING(sym)) #endif /* !_MACHINE_CDEFS_H_ */ diff --git a/sys/arch/vax/include/db_machdep.h b/sys/arch/vax/include/db_machdep.h index 0d592a43ba1..2cd20cb7c7b 100644 --- a/sys/arch/vax/include/db_machdep.h +++ b/sys/arch/vax/include/db_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.h,v 1.14 2011/03/23 16:54:37 pirofti Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.15 2013/07/05 21:10:50 miod Exp $ */ /* $NetBSD: db_machdep.h,v 1.6 1998/08/10 14:33:33 ragge Exp $ */ /* @@ -73,9 +73,11 @@ extern db_regs_t ddb_regs; /* register state */ /* Prototypes */ void kdb_trap(struct trapframe *); -/* - * We use a.out symbols in DDB. - */ +#ifdef __ELF__ +#define DB_ELF_SYMBOLS +#define DB_ELFSIZE 32 +#else #define DB_AOUT_SYMBOLS +#endif #endif /* _MACHINE_DB_MACHDEP_H_ */ diff --git a/sys/arch/vax/include/endian.h b/sys/arch/vax/include/endian.h index cb190339d94..d3407e2a5d0 100644 --- a/sys/arch/vax/include/endian.h +++ b/sys/arch/vax/include/endian.h @@ -1,4 +1,4 @@ -/* $OpenBSD: endian.h,v 1.15 2011/03/12 04:03:04 guenther Exp $ */ +/* $OpenBSD: endian.h,v 1.16 2013/07/05 21:10:50 miod Exp $ */ /*- * Copyright (c) 1997 Niklas Hallqvist. All rights reserved. @@ -35,7 +35,7 @@ u_int32_t __swap32md_y, __swap32md_x = (x); \ \ __asm ("rotl $-8, %1, %0; insv %0, $16, $8, %0; " \ - "rotl $8, %1, r1; movb r1, %0" : \ + "rotl $8, %1, %%r1; movb %%r1, %0" : \ "&=r" (__swap32md_y) : "r" (__swap32md_x) : "r1", "cc"); \ __swap32md_y; \ }) @@ -43,7 +43,7 @@ #define __swap16md(x) __statement({ \ u_int16_t __swap16md_y, __swap16md_x = (x); \ \ - __asm ("rotl $8, %1, %0; rotl $-8, %1, r1; movb r1, %0; " \ + __asm ("rotl $8, %1, %0; rotl $-8, %1, %%r1; movb %%r1, %0; " \ "movzwl %0, %0" : \ "&=r" (__swap16md_y) : "r" (__swap16md_x) : "r1", "cc"); \ __swap16md_y; \ diff --git a/sys/arch/vax/include/macros.h b/sys/arch/vax/include/macros.h index 4ecfcca2af6..5040acdd4b8 100644 --- a/sys/arch/vax/include/macros.h +++ b/sys/arch/vax/include/macros.h @@ -1,4 +1,4 @@ -/* $OpenBSD: macros.h,v 1.19 2013/03/23 16:12:28 deraadt Exp $ */ +/* $OpenBSD: macros.h,v 1.20 2013/07/05 21:10:50 miod Exp $ */ /* $NetBSD: macros.h,v 1.20 2000/07/19 01:02:52 matt Exp $ */ /* @@ -55,69 +55,74 @@ ffs(int reg) static __inline__ size_t strlen(const char *cp) { - register size_t ret; + register size_t ret; - __asm__ __volatile("locc $0,$65535,(%1);subl3 r0,$65535,%0" - : "=r" (ret) - : "r" (cp) - : "r0","r1","cc" ); - return ret; + __asm__ __volatile("locc $0,$65535,(%1);subl3 %%r0,$65535,%0" + : "=r" (ret) + : "r" (cp) + : "r0","r1","cc" ); + return ret; } #if 0 static __inline__ char * strncat(char *cp, const char *c2, size_t count) { - __asm__ __volatile("locc $0,%2,(%1);subl3 r0,%2,r2;" - "locc $0,$65535,(%0);movc3 r2,(%1),(r1);movb $0,(r3)" - : - : "r" (cp), "r" (c2), "g"(count) - : "r0","r1","r2","r3","r4","r5","memory","cc"); - return cp; + __asm__ __volatile("locc $0,%2,(%1);subl3 %%r0,%2,%%r2;" + "locc $0,$65535,(%0);movc3 %%r2,(%1),(%%r1);" + "movb $0,(%%r3)" + : + : "r" (cp), "r" (c2), "g"(count) + : "r0","r1","r2","r3","r4","r5","memory","cc"); + return cp; } #endif static __inline__ char * strncpy(char *cp, const char *c2, size_t len) { - __asm__ __volatile("movl %2,r2;locc $0,r2,(%1);beql 1f;subl3 r0,%2,r2;" - "clrb (%0)[r2];1:;movc3 r2,(%1),(%0)" - : - : "r" (cp), "r" (c2), "g"(len) - : "r0","r1","r2","r3","r4","r5","memory","cc"); - return cp; + __asm__ __volatile("movl %2,%%r2;locc $0,%%r2,(%1);beql 1f;" + "subl3 %%r0,%2,%%r2;clrb (%0)[%%r2];1:" + "movc3 %%r2,(%1),(%0)" + : + : "r" (cp), "r" (c2), "g"(len) + : "r0","r1","r2","r3","r4","r5","memory","cc"); + return cp; } static __inline__ void * memchr(const void *cp, int c, size_t len) { - void *ret; - __asm__ __volatile("locc %2,%3,(%1);bneq 1f;clrl r1;1:movl r1,%0" - : "=g"(ret) - : "r" (cp), "r" (c), "g"(len) - : "r0","r1","cc"); - return ret; + void *ret; + __asm__ __volatile("locc %2,%3,(%1);bneq 1f;clrl %%r1;1:movl %%r1,%0" + : "=g"(ret) + : "r" (cp), "r" (c), "g"(len) + : "r0","r1","cc"); + return ret; } static __inline__ int strcmp(const char *cp, const char *c2) { - register int ret; - __asm__ __volatile("locc $0,$65535,(%1);subl3 r0,$65535,r0;incl r0;" - "cmpc3 r0,(%1),(%2);beql 1f;movl $1,r2;" - "cmpb (r1),(r3);bcc 1f;movl $-1,r2;1:movl r2,%0" - : "=g"(ret) - : "r" (cp), "r" (c2) - : "r0","r1","r2","r3","cc"); - return ret; + register int ret; + __asm__ __volatile("locc $0,$65535,(%1);subl3 %%r0,$65535,%%r0;" + "incl %%r0;cmpc3 %%r0,(%1),(%2);beql 1f;" + "movl $1,%%r2;cmpb (%%r1),(%%r3);bcc 1f;" + "movl $-1,%%r2;1:movl %%r2,%0" + : "=g"(ret) + : "r" (cp), "r" (c2) + : "r0","r1","r2","r3","cc"); + return ret; } /* End nya */ #if 0 /* unused, but no point in deleting it since it _is_ an instruction */ -static __inline__ int locc(int mask, char *cp, size_t size){ +static __inline__ int +locc(int mask, char *cp, size_t size) +{ register ret; - __asm__ __volatile("locc %1,%2,(%3);movl r0,%0" + __asm__ __volatile("locc %1,%2,(%3);movl %%r0,%0" : "=r" (ret) : "r" (mask),"r"(size),"r"(cp) : "r0","r1" ); @@ -130,7 +135,7 @@ scanc(u_int size, const u_char *cp, const u_char *table, int mask) { register int ret; - __asm__ __volatile("scanc %1,(%2),(%3),%4;movl r0,%0" + __asm__ __volatile("scanc %1,(%2),(%3),%4;movl %%r0,%0" : "=g"(ret) : "r"(size),"r"(cp),"r"(table),"r"(mask) : "r0","r1","r2","r3" ); @@ -142,7 +147,7 @@ skpc(int mask, size_t size, u_char *cp) { register int ret; - __asm__ __volatile("skpc %1,%2,(%3);movl r0,%0" + __asm__ __volatile("skpc %1,%2,(%3);movl %%r0,%0" : "=g"(ret) : "r"(mask),"r"(size),"r"(cp) : "r0","r1" ); @@ -151,7 +156,7 @@ skpc(int mask, size_t size, u_char *cp) #define cpu_switchto(o, n) \ __asm__ __volatile__( \ - "movl %0,r0; movl %1, r1; movpsl -(sp); jsb __cpu_switchto" \ + "movl %0, %%r0; movl %1, %%r1; movpsl -(%%sp); jsb __cpu_switchto" \ :: "g"(o), "g"(n) : "r0", "r1"); /* diff --git a/sys/arch/vax/include/pmap.h b/sys/arch/vax/include/pmap.h index a8710fe4f24..18a1ec1e89a 100644 --- a/sys/arch/vax/include/pmap.h +++ b/sys/arch/vax/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.35 2013/07/01 19:45:26 miod Exp $ */ +/* $OpenBSD: pmap.h,v 1.36 2013/07/05 21:10:50 miod Exp $ */ /* $NetBSD: pmap.h,v 1.37 1999/08/01 13:48:07 ragge Exp $ */ /* @@ -125,14 +125,14 @@ extern struct pmap kernel_pmap_store; #define pmap_copy_page(srcpg, dstpg) do { \ paddr_t __src = VM_PAGE_TO_PHYS(srcpg); \ paddr_t __dst = VM_PAGE_TO_PHYS(dstpg); \ - __asm__("addl3 $0x80000000,%0,r0;addl3 $0x80000000,%1,r1; \ - movc3 $4096,(r0),(r1)" \ + __asm__("addl3 $0x80000000,%0,%%r0;addl3 $0x80000000,%1,%%r1; \ + movc3 $4096,(%%r0),(%%r1)" \ :: "r"(__src),"r"(__dst):"r0","r1","r2","r3","r4","r5"); \ } while (0) #define pmap_zero_page(pg) do { \ paddr_t __pa = VM_PAGE_TO_PHYS(pg); \ - __asm__("addl3 $0x80000000,%0,r0;movc5 $0,(r0),$0,$4096,(r0)" \ + __asm__("addl3 $0x80000000,%0,%%r0;movc5 $0,(%%r0),$0,$4096,(%%r0)" \ :: "r"(__pa): "r0","r1","r2","r3","r4","r5"); \ } while (0) diff --git a/sys/arch/vax/include/profile.h b/sys/arch/vax/include/profile.h index 73190b6bca0..94436b85f07 100644 --- a/sys/arch/vax/include/profile.h +++ b/sys/arch/vax/include/profile.h @@ -1,4 +1,4 @@ -/* $OpenBSD: profile.h,v 1.7 2003/06/02 23:27:57 millert Exp $ */ +/* $OpenBSD: profile.h,v 1.8 2013/07/05 21:10:50 miod Exp $ */ /* $NetBSD: profile.h,v 1.5 1995/12/31 12:15:58 ragge Exp $ */ /* * Copyright (c) 1992 The Regents of the University of California. @@ -43,7 +43,7 @@ * to __mcount, so that our return address won't get popped from stack. */ #define MCOUNT \ -__asm__(".text; .globl mcount; mcount: pushl 16(fp); calls $1,__mcount; rsb"); +__asm__(".text; .globl mcount; mcount: pushl 16(%fp); calls $1,__mcount; rsb"); #ifdef _KERNEL /* diff --git a/sys/arch/vax/include/reloc.h b/sys/arch/vax/include/reloc.h new file mode 100644 index 00000000000..b733067eae3 --- /dev/null +++ b/sys/arch/vax/include/reloc.h @@ -0,0 +1,18 @@ +/* $OpenBSD: reloc.h,v 1.1 2013/07/05 21:10:50 miod Exp $ */ +/* VAX ELF relocation types */ + +#define R_VAX_NONE 0 +#define R_VAX_32 1 +#define R_VAX_16 2 +#define R_VAX_8 3 +#define R_VAX_PC32 4 +#define R_VAX_PC16 5 +#define R_VAX_PC8 6 +#define R_VAX_GOT32 7 +#define R_VAX_PLT32 13 +#define R_VAX_COPY 19 +#define R_VAX_GLOB_DAT 20 +#define R_VAX_JMP_SLOT 21 +#define R_VAX_RELATIVE 22 +#define R_VAX_GNU_VTINHERIT 23 +#define R_VAX_GNU_VTENTRY 24 diff --git a/sys/arch/vax/include/vmparam.h b/sys/arch/vax/include/vmparam.h index 6ebc1c02056..412cd23c27a 100644 --- a/sys/arch/vax/include/vmparam.h +++ b/sys/arch/vax/include/vmparam.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vmparam.h,v 1.32 2013/03/23 16:12:28 deraadt Exp $ */ +/* $OpenBSD: vmparam.h,v 1.33 2013/07/05 21:10:50 miod Exp $ */ /* $NetBSD: vmparam.h,v 1.32 2000/03/07 00:05:59 matt Exp $ */ /*- @@ -60,7 +60,7 @@ #define MAXTSIZ (8*1024*1024) /* max text size */ #endif #ifndef MAXDSIZ -#define MAXDSIZ (32*1024*1024) /* max data size */ +#define MAXDSIZ (40*1024*1024) /* max data size */ #endif #ifndef MAXSSIZ #define MAXSSIZ (8*1024*1024) /* max stack size */ |