|
@@ -1,6 +1,6 @@
|
|
/*
|
|
/*
|
|
* Copyright (C) 2000, 2004 Maciej W. Rozycki
|
|
* Copyright (C) 2000, 2004 Maciej W. Rozycki
|
|
- * Copyright (C) 2003 Ralf Baechle
|
|
|
|
|
|
+ * Copyright (C) 2003, 07 Ralf Baechle (ralf@linux-mips.org)
|
|
*
|
|
*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
@@ -9,6 +9,8 @@
|
|
#ifndef _ASM_DIV64_H
|
|
#ifndef _ASM_DIV64_H
|
|
#define _ASM_DIV64_H
|
|
#define _ASM_DIV64_H
|
|
|
|
|
|
|
|
+#include <linux/types.h>
|
|
|
|
+
|
|
#if (_MIPS_SZLONG == 32)
|
|
#if (_MIPS_SZLONG == 32)
|
|
|
|
|
|
#include <asm/compiler.h>
|
|
#include <asm/compiler.h>
|
|
@@ -78,6 +80,8 @@
|
|
__quot = __quot << 32 | __low; \
|
|
__quot = __quot << 32 | __low; \
|
|
(n) = __quot; \
|
|
(n) = __quot; \
|
|
__mod; })
|
|
__mod; })
|
|
|
|
+
|
|
|
|
+extern uint64_t div64_64(uint64_t dividend, uint64_t divisor);
|
|
#endif /* (_MIPS_SZLONG == 32) */
|
|
#endif /* (_MIPS_SZLONG == 32) */
|
|
|
|
|
|
#if (_MIPS_SZLONG == 64)
|
|
#if (_MIPS_SZLONG == 64)
|
|
@@ -101,6 +105,11 @@
|
|
(n) = __quot; \
|
|
(n) = __quot; \
|
|
__mod; })
|
|
__mod; })
|
|
|
|
|
|
|
|
+static inline uint64_t div64_64(uint64_t dividend, uint64_t divisor)
|
|
|
|
+{
|
|
|
|
+ return dividend / divisor;
|
|
|
|
+}
|
|
|
|
+
|
|
#endif /* (_MIPS_SZLONG == 64) */
|
|
#endif /* (_MIPS_SZLONG == 64) */
|
|
|
|
|
|
#endif /* _ASM_DIV64_H */
|
|
#endif /* _ASM_DIV64_H */
|