summaryrefslogtreecommitdiff
path: root/sux.h
diff options
context:
space:
mode:
Diffstat (limited to 'sux.h')
-rw-r--r--sux.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/sux.h b/sux.h
index 2432322..1f87be3 100644
--- a/sux.h
+++ b/sux.h
@@ -54,13 +54,15 @@ extern void io(uint64_t address, uint8_t rw);
extern void init_scr();
-static void *memcopy(void *dst, void *src, unsigned int n) {
+static void *memcopy(void *restrict dst, const void *restrict src, unsigned int n) {
#if copy64
- uint64_t *d = dst, *s = src;
+ uint64_t *d = dst;
+ const uint64_t *s = src;
unsigned int r = n % 8;
n /= 8;
#else
- uint8_t *d = dst, *s = src;
+ uint8_t *d = dst;
+ const uint8_t *s = src;
#endif
for (; n; *d++ = *s++, n--);
#if copy64
@@ -72,6 +74,7 @@ static void *memcopy(void *dst, void *src, unsigned int n) {
return dst;
}
+
static inline uint64_t read_value(struct sux *cpu, uint64_t reg, uint64_t address, uint8_t size, uint8_t inc_clk, uint8_t check_io) {
#if (IO || debug) && !branch
#if keypoll