diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2001-03-08 22:25:07 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2001-03-08 22:25:07 +0000 |
commit | b93d300700fbfc226e6dd5b00615f52d48335e7c (patch) | |
tree | 9aa15523f6d62316c2270d9e5b6e4b32b66177e3 | |
parent | c07ea3e349bc61796630dabed6cacc1ab6dec27e (diff) |
Define ff1() as a one-liner assembly inline, rather than a function in
locore_asm_routines.
-rw-r--r-- | sys/arch/mvme88k/include/asm_macro.h | 20 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/locore_asm_routines.S | 7 |
2 files changed, 15 insertions, 12 deletions
diff --git a/sys/arch/mvme88k/include/asm_macro.h b/sys/arch/mvme88k/include/asm_macro.h index 76ea253fdac..d1843534de8 100644 --- a/sys/arch/mvme88k/include/asm_macro.h +++ b/sys/arch/mvme88k/include/asm_macro.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asm_macro.h,v 1.10 2001/03/08 00:03:22 miod Exp $ */ +/* $OpenBSD: asm_macro.h,v 1.11 2001/03/08 22:24:59 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1991 Carnegie Mellon University @@ -30,9 +30,9 @@ #define __MACHINE_M88K_ASM_MACRO_H__ /* - ** Various compiler macros used for speed and efficiency. - ** Anyone can include. - */ + * Various compiler macros used for speed and efficiency. + * Anyone can include. + */ /* * PSR_TYPE is the type of the Process Status Register. @@ -93,7 +93,7 @@ static __inline__ m88k_psr_type enable_interrupts_return_psr(void) #define db_disable_interrupt disable_interrupt /* - * flushes the data pipeline. + * Flushes the data pipeline. */ static __inline__ void flush_pipeline(void) { @@ -102,7 +102,7 @@ static __inline__ void flush_pipeline(void) #define db_flush_pipeline flush_pipeline /* - * gets the current stack pointer. + * Gets the current stack pointer. */ static __inline__ unsigned long stack_pointer(void) { @@ -111,5 +111,13 @@ static __inline__ unsigned long stack_pointer(void) return(sp); } +/* + * Provide access from C code to the assembly instruction ff1 + */ +static __inline__ unsigned ff1(register unsigned val) +{ + __asm__ ("ff1 %0, %0" : "=r" (val) : "0" (val)); + return val; +} #endif __MACHINE_M88K_ASM_MACRO_H__ diff --git a/sys/arch/mvme88k/mvme88k/locore_asm_routines.S b/sys/arch/mvme88k/mvme88k/locore_asm_routines.S index 8f8458e4c87..e2f07c27718 100644 --- a/sys/arch/mvme88k/mvme88k/locore_asm_routines.S +++ b/sys/arch/mvme88k/mvme88k/locore_asm_routines.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore_asm_routines.S,v 1.11 2001/03/07 23:40:35 miod Exp $ */ +/* $OpenBSD: locore_asm_routines.S,v 1.12 2001/03/08 22:25:06 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1992 Carnegie Mellon University @@ -175,11 +175,6 @@ ENTRY(do_xmem_byte) /* do_xmem_byte(address, data, supervisor) */ 1: xmem.bu r3,r2,r0 2: jmp r1 -ENTRY(ff1) - jmp.n r1 - ff1 r2, r2 - - .data /* |