From: Guan Xuetao <guanxuetao@mprc.pku.edu.cn>
Patch 8 implements the rest low-level libraries.
Signed-off-by: Guan Xuetao <guanxuetao@mprc.pku.edu.cn>
---
arch/unicore32/include/asm/assembler.h | 131 +++++++++++++++++++++
arch/unicore32/include/asm/bitops.h | 47 ++++++++
arch/unicore32/include/asm/delay.h | 52 ++++++++
arch/unicore32/include/asm/futex.h | 143 +++++++++++++++++++++++
arch/unicore32/include/asm/mutex.h | 20 +++
arch/unicore32/include/asm/swab.h | 28 +++++
arch/unicore32/lib/Makefile | 16 +++
arch/unicore32/lib/delay.S | 51 ++++++++
arch/unicore32/lib/findbit.S | 98 ++++++++++++++++
arch/unicore32/lib/sha1.S | 200 ++++++++++++++++++++++++++++++++
10 files changed, 786 insertions(+), 0 deletions(-)
diff --git a/arch/unicore32/include/asm/assembler.h b/arch/unicore32/include/asm/assembler.h
new file mode 100644
index 0000000..8e87ed7
--- /dev/null
+++ b/arch/unicore32/include/asm/assembler.h
@@ -0,0 +1,131 @@
+/*
+ * linux/arch/unicore32/include/asm/assembler.h
+ *
+ * Code specific to PKUnity SoC and UniCore ISA
+ *
+ * Copyright (C) 2001-2010 GUAN Xue-tao
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Do not include any C declarations in this file - it is included by
+ * assembler source.
+ */
+#ifndef __ASSEMBLY__
+#error "Only include this from assembly code"
+#endif
+
+#include <asm/ptrace.h>
+
+/*
+ * Little Endian independent macros for shifting bytes within registers.
+ */
+#define pull >>
+#define push <<
+#define get_byte_0 << #0
+#define get_byte_1 >> #8
+#define get_byte_2 >> #16
+#define get_byte_3 >> #24
+#define put_byte_0 << #0
+#define put_byte_1 << #8
+#define put_byte_2 << #16
+#define put_byte_3 << #24
+
+#define cadd cmpadd
+#define ...