diff options
Diffstat (limited to 'newlib/libc/machine/h8300/memcpy.S')
-rw-r--r-- | newlib/libc/machine/h8300/memcpy.S | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/newlib/libc/machine/h8300/memcpy.S b/newlib/libc/machine/h8300/memcpy.S index 21738e783..305e865df 100644 --- a/newlib/libc/machine/h8300/memcpy.S +++ b/newlib/libc/machine/h8300/memcpy.S @@ -23,7 +23,11 @@ _memcpy: bne byteloop wordloop: +#ifdef __NORMAL_MODE__ + sub #2,A1P +#else subs #2,A1P ; point to word +#endif mov.w @A1P,A2 ; get word mov.w A2,@-A0P ; save word CMPP A0P,A3P ; at the front again ? @@ -31,7 +35,11 @@ wordloop: rts byteloop: +#ifdef __NORMAL_MODE__ + sub #1,A1P +#else subs #1,A1P ; point to byte +#endif mov.b @A1P,A2L ; get byte mov.b A2L,@-A0P ; save byte CMPP A0P,A3P ; at the front again ? |