summaryrefslogtreecommitdiff
path: root/cgcode.c
diff options
context:
space:
mode:
authorJohn van Groningen2004-04-23 14:20:33 +0000
committerJohn van Groningen2004-04-23 14:20:33 +0000
commit07f581b742ee623014947b9c9ced8eb26c59603d (patch)
tree6f064e8fc905fbeb231c115cf1ceef24f0fd43bf /cgcode.c
parentport to gcc on Mac OS X (diff)
implement umulIIL instruction on the PowerPC
Diffstat (limited to 'cgcode.c')
-rw-r--r--cgcode.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/cgcode.c b/cgcode.c
index f770450..d2dcd98 100644
--- a/cgcode.c
+++ b/cgcode.c
@@ -185,6 +185,10 @@ int no_time_profiling;
#define g_fkeep(g1,g2) g_instruction_2(GFKEEP,(g1),(g2))
#define g_sub(g1,g2) g_instruction_2(GSUB,(g1),(g2))
+#ifdef G_POWER
+# define g_umulh(g1,g2) g_instruction_2(GUMULH,(g1),(g2))
+#endif
+
#define MAX_YET_ARGS_NEEDED_ARITY 4
LABEL *INT_label,*BOOL_label,*CHAR_label,*REAL_label;
@@ -4142,6 +4146,22 @@ void code_mulI (VOID)
#endif
}
+#ifdef G_POWER
+void code_umulIIL (VOID)
+{
+ INSTRUCTION_GRAPH graph_1,graph_2,graph_3,graph_4;
+
+ graph_1=s_get_b (1);
+ graph_2=s_get_b (0);
+
+ graph_3=g_mul (graph_1,graph_2);
+ graph_4=g_umulh (graph_1,graph_2);
+
+ s_put_b (1,graph_3);
+ s_put_b (0,graph_4);
+}
+#endif
+
#ifndef M68000
void code_mulIo (VOID)
{