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/mips/include/asm.h,v rcsdiff: /ftp/cvs/cvsroot/src/sys/arch/mips/include/asm.h,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.60 retrieving revision 1.61 diff -u -p -r1.60 -r1.61 --- src/sys/arch/mips/include/asm.h 2020/08/10 14:37:38 1.60 +++ src/sys/arch/mips/include/asm.h 2020/08/12 08:56:37 1.61 @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.60 2020/08/10 14:37:38 skrll Exp $ */ +/* $NetBSD: asm.h,v 1.61 2020/08/12 08:56:37 skrll Exp $ */ /* * Copyright (c) 1992, 1993 @@ -57,6 +57,13 @@ #include /* for API selection */ #include +#define __BIT(n) (1 << (n)) +#define __BITS(hi,lo) ((~((~0)<<((hi)+1)))&((~0)<<(lo))) + +#define __LOWEST_SET_BIT(__mask) ((((__mask) - 1) & (__mask)) ^ (__mask)) +#define __SHIFTOUT(__x, __mask) (((__x) & (__mask)) / __LOWEST_SET_BIT(__mask)) +#define __SHIFTIN(__x, __mask) ((__x) * __LOWEST_SET_BIT(__mask)) + /* * Define -pg profile entry code. * Must always be noreorder, must never use a macro instruction