summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/mcf5235/startup/copyvectors.c
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2014-12-01 14:55:23 +1100
committerChris Johns <chrisj@rtems.org>2014-12-01 14:55:23 +1100
commitdd309b10544bfceda968ac847ad34c3d90ca8281 (patch)
tree87460bf9b0a723359ede9eede8fcaa74aa355ab0 /c/src/lib/libbsp/m68k/mcf5235/startup/copyvectors.c
parentlibmisc/shell: Edit history hack is corrupting memory. Remove it. (diff)
downloadrtems-dd309b10544bfceda968ac847ad34c3d90ca8281.tar.bz2
m68k/mcf5235: GCC 4.9.2 generates invalid code for Init5235.
Move the vector table copy out of the Init5235 source to avoid stipping the GCC bug. Fixes #2204.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/m68k/mcf5235/startup/copyvectors.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/m68k/mcf5235/startup/copyvectors.c b/c/src/lib/libbsp/m68k/mcf5235/startup/copyvectors.c
new file mode 100644
index 0000000000..2c54c31a44
--- /dev/null
+++ b/c/src/lib/libbsp/m68k/mcf5235/startup/copyvectors.c
@@ -0,0 +1,19 @@
+/*
+ * Move the copy out of the Init5235 file because gcc is broken.
+ */
+
+#include <stdint.h>
+
+void CopyVectors(const uint32_t* old, uint32_t* new);
+
+void CopyVectors(const uint32_t* old, uint32_t* new)
+{
+ int v = 0;
+ while (v < 256)
+ {
+ *new = *old;
+ ++v;
+ ++new;
+ ++old;
+ }
+}