From 3f2546b2ef55b661fd8dd69682b38992225e86f6 Mon Sep 17 00:00:00 2001 From: fishsoupisgood Date: Mon, 29 Apr 2019 01:17:54 +0100 Subject: Initial import of qemu-2.4.1 --- roms/u-boot/arch/openrisc/include/asm/bitops/ffs.h | 23 ++++++++++++++++++++++ roms/u-boot/arch/openrisc/include/asm/bitops/fls.h | 23 ++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 roms/u-boot/arch/openrisc/include/asm/bitops/ffs.h create mode 100644 roms/u-boot/arch/openrisc/include/asm/bitops/fls.h (limited to 'roms/u-boot/arch/openrisc/include/asm/bitops') diff --git a/roms/u-boot/arch/openrisc/include/asm/bitops/ffs.h b/roms/u-boot/arch/openrisc/include/asm/bitops/ffs.h new file mode 100644 index 00000000..50746cfa --- /dev/null +++ b/roms/u-boot/arch/openrisc/include/asm/bitops/ffs.h @@ -0,0 +1,23 @@ +/* + * OpenRISC Linux + * + * Copyright (C) 2010-2011 Jonas Bonn + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __ASM_OPENRISC_FFS_H +#define __ASM_OPENRISC_FFS_H + +static inline int ffs(int x) +{ + int ret; + + __asm__ ("l.ff1 %0,%1" + : "=r" (ret) + : "r" (x)); + + return ret; +} + +#endif /* __ASM_OPENRISC_FFS_H */ diff --git a/roms/u-boot/arch/openrisc/include/asm/bitops/fls.h b/roms/u-boot/arch/openrisc/include/asm/bitops/fls.h new file mode 100644 index 00000000..74472299 --- /dev/null +++ b/roms/u-boot/arch/openrisc/include/asm/bitops/fls.h @@ -0,0 +1,23 @@ +/* + * OpenRISC Linux + * + * Copyright (C) 2010-2011 Jonas Bonn + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __ASM_OPENRISC_FLS_H +#define __ASM_OPENRISC_FLS_H + +static inline int fls(int x) +{ + int ret; + + __asm__ ("l.fl1 %0,%1" + : "=r" (ret) + : "r" (x)); + + return ret; +} + +#endif /* __ASM_OPENRISC_FLS_H */ -- cgit v1.2.3