1 /* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
2 Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
3 On-Line Applications Research Corporation.
4 This file is part of the GNU C Library.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, write to the Free
18 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
23 * This file contains macros which are used to access MC68020
24 * registers which are not addressable by C. These are
25 * useful when developing the board specific support.
31 typedef void ( *mc68020_isr
)( void );
33 #define disable_intr( level ) \
35 asm volatile ( "movew %%sr,%0 ; \
37 : "=d" ((level)) : "0" ((level)) ); \
40 #define enable_intr( level ) \
41 { asm volatile ( "movew %0,%%sr " \
42 : "=d" ((level)) : "0" ((level)) ); \
45 #define flash_intr( level ) \
46 { asm volatile ( "movew %0,%%sr ; \
48 : "=d" ((level)) : "0" ((level)) ); \
51 #define get_vbr( vbr ) \
53 asm volatile ( "movec %%vbr,%0 " \
54 : "=a" (vbr) : "0" (vbr) ); \
57 #define set_vbr( vbr ) \
58 { register mc68020_isr *_vbr= (mc68020_isr *)(vbr); \
59 asm volatile ( "movec %0,%%vbr " \
60 : "=a" (_vbr) : "0" (_vbr) ); \
63 #define enable_caching() \
64 { register unsigned int _ctl=0x01; \
65 asm volatile ( "movec %0,%%cacr" \
66 : "=d" (_ctl) : "0" (_ctl) ); \
69 #define delay( microseconds ) \
70 { register unsigned int _delay=(microseconds); \
71 register unsigned int _tmp=123; \
76 : "=d" (_tmp), "=d" (_delay) \
77 : "0" (_tmp), "1" (_delay) ); \
80 #define enable_tracing()
81 #define cause_intr( X )
82 #define clear_intr( X )
84 extern mc68020_isr M68Kvec
[]; /* vector table address */
87 /* end of include file */