add compiler macro for patch
Signed-off-by: ZhouPengcheng <zhoupengcheng11@huawei.com>
This commit is contained in:
parent
9cf54e8746
commit
52f0dbd936
@ -11,8 +11,8 @@ crc32 through the interface provided by the neon instruction
|
|||||||
set.
|
set.
|
||||||
Modify by Li Qiang.
|
Modify by Li Qiang.
|
||||||
---
|
---
|
||||||
crc32.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
|
crc32.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
1 file changed, 48 insertions(+)
|
1 file changed, 50 insertions(+)
|
||||||
|
|
||||||
diff --git a/crc32.c b/crc32.c
|
diff --git a/crc32.c b/crc32.c
|
||||||
index f8357b0..5c53068 100644
|
index f8357b0..5c53068 100644
|
||||||
@ -28,10 +28,11 @@ index f8357b0..5c53068 100644
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
A CRC of a message is computed on N braids of words in the message, where
|
A CRC of a message is computed on N braids of words in the message, where
|
||||||
@@ -600,6 +603,47 @@ const z_crc_t FAR * ZEXPORT get_crc_table()
|
@@ -600,6 +603,49 @@ const z_crc_t FAR * ZEXPORT get_crc_table()
|
||||||
return (const z_crc_t FAR *)crc_table;
|
return (const z_crc_t FAR *)crc_table;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+#ifdef __aarch64__
|
||||||
+ulg crc32_neon(crc, buf, len)
|
+ulg crc32_neon(crc, buf, len)
|
||||||
+ unsigned long crc;
|
+ unsigned long crc;
|
||||||
+ const unsigned char FAR *buf;
|
+ const unsigned char FAR *buf;
|
||||||
@ -72,6 +73,7 @@ index f8357b0..5c53068 100644
|
|||||||
+
|
+
|
||||||
+ return (crc_result ^ 0xffffffffL);
|
+ return (crc_result ^ 0xffffffffL);
|
||||||
+}
|
+}
|
||||||
|
+#endif
|
||||||
+
|
+
|
||||||
/* =========================================================================
|
/* =========================================================================
|
||||||
* Use ARM machine instructions if available. This will compute the CRC about
|
* Use ARM machine instructions if available. This will compute the CRC about
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user