aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--newlib/libc/machine/h8300/h8sx_strcpy.S14
1 files changed, 14 insertions, 0 deletions
diff --git a/newlib/libc/machine/h8300/h8sx_strcpy.S b/newlib/libc/machine/h8300/h8sx_strcpy.S
new file mode 100644
index 0000000..db84771
--- /dev/null
+++ b/newlib/libc/machine/h8300/h8sx_strcpy.S
@@ -0,0 +1,14 @@
+; This file exists to provide a movsd implementation of strcpy().
+; Continue to use the generic version for targets other than h8sx.
+#ifdef __H8300SX__
+#include "setarch.h"
+
+ .global _strcpy
+_strcpy:
+ stm.l er4-er6,@-er7
+ mov.l er0,er6
+ mov.l er1,er5
+1: movsd 2f
+ bra 1b
+2: rts/l er4-er6
+#endif