summaryrefslogtreecommitdiff
path: root/cgpwas.c
diff options
context:
space:
mode:
authorJohn van Groningen2005-01-13 15:17:20 +0000
committerJohn van Groningen2005-01-13 15:17:20 +0000
commit8146556080c7d290814918cffc67e896edefea79 (patch)
tree9c7f05e8d6e2ff514daf5f92247ee7e30a11b0e9 /cgpwas.c
parentuse r_to_i_buffer only for PowerPC and not for IA32 (diff)
add divU for the PowerPC
Diffstat (limited to 'cgpwas.c')
-rw-r--r--cgpwas.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/cgpwas.c b/cgpwas.c
index ba20c7a..918fd77 100644
--- a/cgpwas.c
+++ b/cgpwas.c
@@ -2252,6 +2252,19 @@ static void w_as_div_instruction (struct instruction *instruction)
w_as_register_newline (reg);
}
+static void w_as_divu_instruction (struct instruction *instruction)
+{
+ int reg;
+
+ reg=w_as_register_parameter (instruction->instruction_parameters[0],SIZE_LONG);
+
+ w_as_opcode ("divwu");
+
+ w_as_register_comma (instruction->instruction_parameters[1].parameter_data.reg.r);
+ w_as_register_comma (instruction->instruction_parameters[1].parameter_data.reg.r);
+ w_as_register_newline (reg);
+}
+
static void w_as_mul_instruction (struct instruction *instruction)
{
int r,reg;
@@ -3092,6 +3105,9 @@ static void w_as_instructions (register struct instruction *instruction)
case IDIV:
w_as_div_instruction (instruction);
break;
+ case IDIVU:
+ w_as_divu_instruction (instruction);
+ break;
case IMOD:
w_as_rem_instruction (instruction);
break;