4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-03-04 05:55:38 +08:00

arc: Use __ARC_UNALIGNED__ compiler macro

Replace __ARC_ALIGNED_ACCESS__ macro with the compiler defined
macro __ARC_UNALIGNED__ and improve file comments.

Signed-off-by: Claudiu Zissulescu <claziss@gmail.com>
This commit is contained in:
Claudiu Zissulescu 2024-08-20 15:10:39 +03:00 committed by Jeff Johnston
parent 2c46bffba0
commit 3e9f6a005c

View File

@ -70,7 +70,21 @@
# define ZOLAND 0xF # define ZOLAND 0xF
#endif #endif
#ifdef __ARC_ALIGNED_ACCESS__
;;; MEMCPY copy memory regions
;;; Input arguments:
;;; r0 - output memory region
;;; r1 - input memory region
;;; r2 - size in bytes
;;; Returns:
;;; r0 - pointer to the first byte of the output region
;;; Clobber:
;;; r1, r2, r3, r4, r5, r6, r8r9, r10r11, lp_count
#if !defined (__ARC_UNALIGNED__)
;;; MEMCPY routine for the case when the CPU only accepts ALIGNED
;;; accesses to memory.
ENTRY (memcpy) ENTRY (memcpy)
prefetch [r1] ; Prefetch the read location prefetch [r1] ; Prefetch the read location
prefetchw [r0] ; Prefetch the write location prefetchw [r0] ; Prefetch the write location
@ -268,6 +282,8 @@ ENDFUNC (memcpy)
#else #else
;;; MEMCPY routine which is used by systems with unaligned memory
;;; accesses. This is the case for most of ARCHS CPU family.
ENTRY(memcpy) ENTRY(memcpy)
prefetch [r1] ; Prefetch the read location prefetch [r1] ; Prefetch the read location
prefetchw [r0] ; Prefetch the write location prefetchw [r0] ; Prefetch the write location