Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/arch/sh3/include/cpu.h,v rcsdiff: /ftp/cvs/cvsroot/src/sys/arch/sh3/include/cpu.h,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.13 retrieving revision 1.14 diff -u -p -r1.13 -r1.14 --- src/sys/arch/sh3/include/cpu.h 2001/06/24 05:34:07 1.13 +++ src/sys/arch/sh3/include/cpu.h 2002/02/11 18:04:24 1.14 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.13 2001/06/24 05:34:07 msaitoh Exp $ */ +/* $NetBSD: cpu.h,v 1.14 2002/02/11 18:04:24 uch Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -149,6 +149,25 @@ void delay __P((int)); #define SH3_PHYS_TO_P2SEG(x) ((unsigned)(x) | SH3_P2SEG_BASE) #define SH3_P1SEG_TO_P2SEG(x) ((unsigned)(x) | SH3_P1234SEG_SIZE) +/* run on P2 */ +#define RUN_P2 \ +do { \ + u_int32_t p; \ + p = (u_int32_t)&&P2; \ + goto *(u_int32_t *)(p | 0x20000000); \ + P2: \ +} while (/*CONSTCOND*/0) + +/* run on P1 */ +#define RUN_P1 \ +do { \ + u_int32_t p; \ + p = (u_int32_t)&&P1; \ + __asm__ __volatile__("nop;nop;nop;nop;nop;nop;nop;nop"); \ + goto *(u_int32_t *)(p & ~0x20000000); \ + P1: \ +} while (/*CONSTCOND*/0) + /* * pull in #defines for kinds of processors */