diff options
author | John van Groningen | 2004-04-23 14:20:33 +0000 |
---|---|---|
committer | John van Groningen | 2004-04-23 14:20:33 +0000 |
commit | 07f581b742ee623014947b9c9ced8eb26c59603d (patch) | |
tree | 6f064e8fc905fbeb231c115cf1ceef24f0fd43bf /cgpas.c | |
parent | port to gcc on Mac OS X (diff) |
implement umulIIL instruction on the PowerPC
Diffstat (limited to 'cgpas.c')
-rw-r--r-- | cgpas.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -547,6 +547,7 @@ static unsigned char real_reg_num [32] = #define as_mtctr(rs) as_mtspr (9,rs) #define as_mtspr(spr,rs) store_instruction ((31<<26)|(reg_num(rs)<<21)|(spr<<16)|(467<<1)); #define as_mulhw(rd,ra,rb) as_i_dab (rd,ra,rb,75) +#define as_mulhwu(rd,ra,rb) as_i_dab (rd,ra,rb,11) #define as_mulli(rd,ra,si) as_i_dai (7,rd,ra,si) #define as_mullw(rd,ra,rb) as_i_dab (rd,ra,rb,235) #define as_mullwo_(rd,ra,rb)as_i_dabo_ (rd,ra,rb,235) @@ -1278,6 +1279,17 @@ static void as_mul_instruction (struct instruction *instruction) as_mullw (r,r,reg); } +static void as_umulh_instruction (struct instruction *instruction) +{ + int r,reg; + + r=instruction->instruction_parameters[1].parameter_data.reg.r; + + reg=as_register_parameter (instruction->instruction_parameters[0],SIZE_LONG); + + as_mulhwu (r,r,reg); +} + static void as_mulo_instruction (struct instruction *instruction) { int r,reg; @@ -2836,6 +2848,9 @@ static void write_instructions (struct instruction *instructions) case IMULO: as_mulo_instruction (instruction); break; + case IUMULH: + as_umulh_instruction (instruction); + break; default: internal_error_in_function ("write_instructions"); } |