summaryrefslogtreecommitdiffstats
path: root/tools.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/tools.c b/tools.c
index 608a4ec..7766c6a 100644
--- a/tools.c
+++ b/tools.c
@@ -29,6 +29,25 @@ void *memcpy32(void * dst, void const * src, size_t len) {
return (dst);
}
+void *memcpy64(void * dst, void const * src, size_t len) {
+ uint64_t * plDst = (uint64_t *) dst;
+ uint64_t const * plSrc = (uint64_t const *) src;
+
+ while (len >= 8) {
+ *plDst++ = *plSrc++;
+ len -= 4;
+ }
+
+ char * pcDst = (char *) plDst;
+ char const * pcSrc = (char const *) plSrc;
+
+ while (len--) {
+ *pcDst++ = *pcSrc++;
+ }
+
+ return (dst);
+}
+
int get_page_mask() {
int pagesize,pagemask,temp;