summaryrefslogtreecommitdiff
path: root/arm9/lib/src
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2020-07-09 14:34:23 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2020-07-09 14:34:23 -0400
commit3b6a10b8b12f0a58663e8625a121562d8f1ff046 (patch)
tree10ca05267b7f6285e08fb1edf835ac1073528215 /arm9/lib/src
parent32acefa0bc9d38d055c5662694fc9ce966d50844 (diff)
MI_swap.c
Diffstat (limited to 'arm9/lib/src')
-rw-r--r--arm9/lib/src/MI_swap.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arm9/lib/src/MI_swap.c b/arm9/lib/src/MI_swap.c
new file mode 100644
index 00000000..b72e1386
--- /dev/null
+++ b/arm9/lib/src/MI_swap.c
@@ -0,0 +1,16 @@
+#include "global.h"
+#include "MI_swap.h"
+
+/*
+ * Exchange 32 bits of data between register and memory.
+ *
+ * The SDK also defines an 8-bit version of this routine,
+ * but it is not linked in pokediamond.
+ */
+
+asm
+u32 MI_SwapWord(register u32 setData, register vu32 * destp)
+{
+ swp setData, setData, [destp]
+ bx lr
+}