-/* $OpenBSD: fpu.c,v 1.5 1996/10/14 01:15:52 briggs Exp $ */
+/* $OpenBSD: fpu.c,v 1.6 1997/01/19 03:58:05 briggs Exp $ */
/* $NetBSD: fpu.c,v 1.16 1996/06/11 02:56:22 scottr Exp $ */
/*
* state, so we can determine which we have by
* examining the size of the FP state frame
*/
- asm("fnop");
+ __asm("fnop");
nofault = (int *) 0;
* have if this will. We save the state in order to get the
* size of the frame.
*/
- asm("movl %0, a0; fsave a0@" : : "a" (fpframe) : "a0" );
+ __asm("movl %0, a0; fsave a0@" : : "a" (fpframe) : "a0" );
b = *((u_char *) fpframe + 1);
-/* $OpenBSD: machdep.c,v 1.25 1997/01/16 20:43:36 kstailey Exp $ */
+/* $OpenBSD: machdep.c,v 1.26 1997/01/19 03:58:06 briggs Exp $ */
/* $NetBSD: machdep.c,v 1.122 1996/10/15 06:40:39 scottr Exp $ */
/*
3) restore regs
*/
- asm("movl a0, sp@-");
- asm("movl a1, sp@-");
- asm("movl d0, sp@-");
- asm("movl d1, sp@-");
+ __asm("movl a0, sp@-");
+ __asm("movl a1, sp@-");
+ __asm("movl d0, sp@-");
+ __asm("movl d1, sp@-");
/* check to see if gray bars are turned off */
if (mac68k_machine.do_graybars) {
for (i = 0; i < 2 * videorowbytes / 4; i++)
((u_long *) videoaddr)[gray_nextaddr++] = 0x00000000;
}
- asm("movl sp@+, d1");
- asm("movl sp@+, d0");
- asm("movl sp@+, a1");
- asm("movl sp@+, a0");
+ __asm("movl sp@+, d1");
+ __asm("movl sp@+, d0");
+ __asm("movl sp@+, a1");
+ __asm("movl sp@+, a0");
}
#endif
* Be careful as we assume that no registers are clobbered
* when we call this from assembly.
*/
- asm("movl a0, sp@-");
- asm("movl a1, sp@-");
- asm("movl d0, sp@-");
- asm("movl d1, sp@-");
+ __asm("movl a0, sp@-");
+ __asm("movl a1, sp@-");
+ __asm("movl d0, sp@-");
+ __asm("movl d1, sp@-");
/* printf("*"); */
- asm("movl sp@+, d1");
- asm("movl sp@+, d0");
- asm("movl sp@+, a1");
- asm("movl sp@+, a0");
+ __asm("movl sp@+, d1");
+ __asm("movl sp@+, d0");
+ __asm("movl sp@+, a1");
+ __asm("movl sp@+, a0");
}
-/* $OpenBSD: macrom.c,v 1.6 1996/10/30 05:26:29 briggs Exp $ */
+/* $OpenBSD: macrom.c,v 1.7 1997/01/19 03:58:08 briggs Exp $ */
/* $NetBSD: macrom.c,v 1.26 1996/08/05 23:20:46 briggs Exp $ */
/*-
u_int32_t ticks;
- asm(" movl a0, %0" /* get arguments */
+ __asm(" movl a0, %0" /* get arguments */
:
: "g" (ticks)
: "a0" );
printf("mrg: mrg_VBLQueue: calling VBL task at 0x%x with VBLTask block at %p\n",
*((u_int32_t *)(vbltask + vblAddr)), vbltask);
#endif
- asm(" movml #0xfffe, sp@-
+ __asm(" movml #0xfffe, sp@-
movl %0, a0
movl %1, a1
jbsr a1@
void
mrg_init_stub_1()
{
- asm("movml #0xffff, sp@-");
+ __asm("movml #0xffff, sp@-");
printf("mrg: hit mrg_init_stub_1\n");
- asm("movml sp@+, #0xffff");
+ __asm("movml sp@+, #0xffff");
}
void
/* Gotta load a1 with VIA address. */
/* ADB int expects it from Mac intr routine. */
- asm("
+ __asm("
movml #0xffff, sp@-
movl %0, a0
movl _VIA, a1
/* Gotta load a1 with VIA address. */
/* ADB int expects it from Mac intr routine. */
- asm("
+ __asm("
movml #0xffff, sp@-
movl %0, a0
movl _VIA, a1
u_int32_t trapword;
caddr_t ptr;
- asm(" movl d1, %0
+ __asm(" movl d1, %0
movl d0, %1"
: "=g" (trapword), "=g" (numbytes) : : "d0", "d1");
bzero(ptr, numbytes); /* NewPtr, Clear ! */
}
- asm(" movl %0, a0" : : "g" (ptr) : "a0");
+ __asm(" movl %0, a0" : : "g" (ptr) : "a0");
return(result);
}
int result = noErr;
caddr_t ptr;
- asm(" movl a0, %0" : "=g" (ptr) : : "a0");
+ __asm(" movl a0, %0" : "=g" (ptr) : : "a0");
#if defined(MRG_SHOWTRAPS)
printf("mrg: DisposPtr(%x)\n", ptr);
{
caddr_t ptr;
- asm(" movl a0, %0" : "=g" (ptr) : : "a0");
+ __asm(" movl a0, %0" : "=g" (ptr) : : "a0");
#if defined(MRG_SHOWTRAPS)
printf("mrg: GetPtrSize(%x)\n", ptr);
caddr_t ptr;
int newbytes;
- asm(" movl a1, %0
+ __asm(" movl a1, %0
movl d0, %1"
: "=g" (ptr), "=g" (newbytes) : : "d0", "a1");
caddr_t ptr;
int trap_num;
- asm(" movl a0, %0
+ __asm(" movl a0, %0
movl d0, %1"
: "=g" (ptr), "=g" (trap_num) : : "d0", "a0");
/* store a0 in d0bucket */
/* This will change a1,d1,d0,a0 and possibly a6 */
- asm("
+ __asm("
movl %2, a1
movw %3, d1
movl %4, d0
#if defined(MRG_TEST)
if (ROMResourceMap) {
printf("mrg: testing CountResources\n");
- asm(" clrl sp@-
+ __asm(" clrl sp@-
clrl sp@-
.word 0xa99c
movw sp@+, %0"
: "=g" (rcnt));
printf("mrg: found %d resources in ROM\n", rcnt);
- asm(" clrl sp@-
+ __asm(" clrl sp@-
movl #0x44525652, sp@-
.word 0xa99c
movw sp@+, %0"
#if defined(MRG_TEST)
if (ROMResourceMap) {
printf("mrg: testing GetIndResource\n");
- asm(" clrl sp@-
+ __asm(" clrl sp@-
movl #0x44525652, sp@-
movw #0x01, sp@-
.word 0xa99d
(long)Get_Ind_Resource(0x44525652, 1),
(long)*Get_Ind_Resource(0x44525652, 1),
(long) *((u_int32_t *) *Get_Ind_Resource(0x44525652, 1)));
- asm(" clrl sp@-
+ __asm(" clrl sp@-
movl #0x44525652, sp@-
movw #0x02, sp@-
.word 0xa99d
/* This initializes ADBState (mrg_ADBStore2) and
enables interrupts */
- asm(" movml a0-a2, sp@-
+ __asm(" movml a0-a2, sp@-
movl %1, a0 /* ADBState, mrg_adbstore2 */
movl %0, a1
jbsr a1@
if (0 == mrg_ADBAlternateInit){
ADBReInit();
} else {
- asm("
+ __asm("
movml a0-a6/d0-d7, sp@-
movl %0, a1
movl %1, a3
-/* $OpenBSD: macrom.h,v 1.3 1996/05/26 18:36:25 briggs Exp $ */
+/* $OpenBSD: macrom.h,v 1.4 1997/01/19 03:58:08 briggs Exp $ */
/* $NetBSD: macrom.h,v 1.9 1996/05/25 14:45:35 briggs Exp $ */
/*-
/* trace all instructions, not just flow changes. */
#define tron() \
- asm("movw sr, d0 ; orw #0x8000, d0 ; movw d0, sr" : : : "d0")
+ __asm("movw sr, d0 ; orw #0x8000, d0 ; movw d0, sr" : : : "d0")
#define troff() \
- asm("movw sr, d0 ; andw #0x3fff, d0 ; movw d0, sr" : : : "d0")
+ __asm("movw sr, d0 ; andw #0x3fff, d0 ; movw d0, sr" : : : "d0")
-/* $OpenBSD: trap.c,v 1.5 1996/10/23 04:49:49 briggs Exp $ */
+/* $OpenBSD: trap.c,v 1.6 1997/01/19 03:58:09 briggs Exp $ */
/* $NetBSD: trap.c,v 1.41 1996/10/17 06:42:44 scottr Exp $ */
/*
void trap __P((int, unsigned, register unsigned, struct frame));
void syscall __P((register_t, struct frame));
-static inline void userret __P((register struct proc *,
+static __inline void userret __P((register struct proc *,
register struct frame *,
u_quad_t, u_int, int));
* Trap and syscall both need the following work done before returning
* to user mode.
*/
-static inline void
+static __inline void
userret(p, fp, oticks, faultaddr, fromtrap)
register struct proc *p;
register struct frame *fp;