summaryrefslogtreecommitdiff
path: root/Source/TestSuite/ASM/source/asm_integer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/TestSuite/ASM/source/asm_integer.cpp')
-rw-r--r--Source/TestSuite/ASM/source/asm_integer.cpp55
1 files changed, 55 insertions, 0 deletions
diff --git a/Source/TestSuite/ASM/source/asm_integer.cpp b/Source/TestSuite/ASM/source/asm_integer.cpp
new file mode 100644
index 0000000000..2f7891c40b
--- /dev/null
+++ b/Source/TestSuite/ASM/source/asm_integer.cpp
@@ -0,0 +1,55 @@
+#include "asm_tables.h"
+#include "Defines.h"
+void subfc(u32 *a, u32 *b, u32 *c, u32 *d)
+{
+ asm(
+ "subfc %0,%1,%2"
+ : "=r"(*a)
+ : "r"(*b), "r"(*c)
+ );
+}
+void subfcRC(u32 *a, u32 *b, u32 *c, u32 *d)
+{
+ asm(
+ "subfc. %0,%1,%2"
+ : "=r"(*a)
+ : "r"(*b), "r"(*c)
+ : "cc"
+ );
+}
+
+void divw(u32 *a, u32 *b, u32 *c, u32 *d)
+{
+ asm(
+ "divw %0,%1,%2"
+ : "=r"(*a)
+ : "r"(*b), "r"(*c)
+ );
+}
+void divwRC(u32 *a, u32 *b, u32 *c, u32 *d)
+{
+ asm(
+ "divw. %0,%1,%2"
+ : "=r"(*a)
+ : "r"(*b), "r"(*c)
+ : "cc"
+ );
+}
+
+void divwo(u32 *a, u32 *b, u32 *c, u32 *d)
+{
+ asm(
+ "divwo %0,%1,%2"
+ : "=r"(*a)
+ : "r"(*b), "r"(*c)
+ );
+}
+void divwoRC(u32 *a, u32 *b, u32 *c, u32 *d)
+{
+ asm(
+ "divwo. %0,%1,%2"
+ : "=r"(*a)
+ : "r"(*b), "r"(*c)
+ : "cc"
+ );
+} \ No newline at end of file