diff options
author | John van Groningen | 2007-05-10 10:11:32 +0000 |
---|---|---|
committer | John van Groningen | 2007-05-10 10:11:32 +0000 |
commit | 74ff3fabc28497d3e48c88ed6e7468f2838a3a0c (patch) | |
tree | e1b3d2008b1f5419d8d0b60c26824d9ad5a46fc4 /cgiwas.c | |
parent | pass {#Int} and {#Real} using centry, (diff) |
rename IMOVEW as IMOVEDB,
add sincosR instruction for IA32,
add 32 bit integer and real arrays for AI64
Diffstat (limited to 'cgiwas.c')
-rw-r--r-- | cgiwas.c | 56 |
1 files changed, 50 insertions, 6 deletions
@@ -2843,6 +2843,47 @@ static void w_as_monadic_float_instruction (struct instruction *instruction,char #endif } +static void w_as_fsincos_instruction (struct instruction *instruction) +{ + int f_reg1,f_reg2; + + f_reg1=instruction->instruction_parameters[0].parameter_data.reg.r; + f_reg2=instruction->instruction_parameters[1].parameter_data.reg.r; + + if (f_reg1!=0){ + w_as_opcode ("fxch"); + w_as_fp_register_newline (f_reg1); + } + + w_as_opcode ("fsincos"); + w_as_newline(); + + if (f_reg1==0){ +#ifdef FP_STACK_OPTIMIZATIONS + fstpl_instruction (f_reg2,instruction); +#else + w_as_opcode ("fstp"); + w_as_fp_register_newline (f_reg2+1); +#endif + } else if (f_reg2==0){ + w_as_opcode ("fxch"); + w_as_fp_register_newline (1); + +#ifdef FP_STACK_OPTIMIZATIONS + fstpl_instruction (f_reg1,instruction); +#else + w_as_opcode ("fstp"); + w_as_fp_register_newline (f_reg1+1); +#endif + } else { + w_as_opcode ("fstp"); + w_as_fp_register_newline (f_reg2+1); + + w_as_opcode ("fxch"); + w_as_fp_register_newline (f_reg1); + } +} + static struct instruction *w_as_fmove_instruction (struct instruction *instruction) { switch (instruction->instruction_parameters[1].parameter_type){ @@ -3376,7 +3417,7 @@ static void w_as_instructions (register struct instruction *instruction) case IBTST: w_as_btst_instruction (instruction); break; - case IMOVEW: + case IMOVEDB: w_as_move_instruction (instruction,SIZE_WORD); break; case IMOVEB: @@ -3505,17 +3546,20 @@ static void w_as_instructions (register struct instruction *instruction) case IFCNE: w_as_convert_float_condition_instruction (instruction,3); break; -#ifdef FP_STACK_OPTIMIZATIONS - case IFEXG: - w_as_fexg (instruction); - break; -#endif case IWORD: w_as_word_instruction (instruction); break; case IRTSI: w_as_rtsi_instruction (instruction); break; +#ifdef FP_STACK_OPTIMIZATIONS + case IFEXG: + w_as_fexg (instruction); + break; +#endif + case IFSINCOS: + w_as_fsincos_instruction (instruction); + break; case IFTST: default: internal_error_in_function ("w_as_instructions"); |