Skip to content

Commit 3e9f6a0

Browse files
clazissjjohnstn
authored andcommitted
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 <[email protected]>
1 parent 2c46bff commit 3e9f6a0

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

newlib/libc/machine/arc/memcpy-archs.S

+17-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,21 @@
7070
# define ZOLAND 0xF
7171
#endif
7272

73-
#ifdef __ARC_ALIGNED_ACCESS__
73+
74+
;;; MEMCPY copy memory regions
75+
;;; Input arguments:
76+
;;; r0 - output memory region
77+
;;; r1 - input memory region
78+
;;; r2 - size in bytes
79+
;;; Returns:
80+
;;; r0 - pointer to the first byte of the output region
81+
;;; Clobber:
82+
;;; r1, r2, r3, r4, r5, r6, r8r9, r10r11, lp_count
83+
84+
#if !defined (__ARC_UNALIGNED__)
85+
86+
;;; MEMCPY routine for the case when the CPU only accepts ALIGNED
87+
;;; accesses to memory.
7488
ENTRY (memcpy)
7589
prefetch [r1] ; Prefetch the read location
7690
prefetchw [r0] ; Prefetch the write location
@@ -268,6 +282,8 @@ ENDFUNC (memcpy)
268282

269283
#else
270284

285+
;;; MEMCPY routine which is used by systems with unaligned memory
286+
;;; accesses. This is the case for most of ARCHS CPU family.
271287
ENTRY(memcpy)
272288
prefetch [r1] ; Prefetch the read location
273289
prefetchw [r0] ; Prefetch the write location

0 commit comments

Comments
 (0)