File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5147,18 +5147,23 @@ M3CG_HANDLER (MAX) { m3_minmax (type, 0); }
51475147M3CG_HANDLER (ROUND )
51485148{
51495149 //Use the builtins for rounding.
5150+ tree dt ;
51505151 m3_start_call ();
51515152 m3_pop_param (src_t );
51525153
5154+ if (dst_T == T_int_32 )
5155+ dt = t_int_32 ;
5156+ else
5157+ dt = t_int_64 ;
51535158 if (src_T == T_reel ) {
5154- m3_call_direct (lroundf_proc , t_int_64 );
5159+ m3_call_direct (lroundf_proc , dt );
51555160 } else if (src_T == T_lreel ) {
5156- m3_call_direct (lround_proc , t_int_64 );
5161+ m3_call_direct (lround_proc , dt );
51575162 } else if (src_T == T_xreel ) {
51585163 if (LONG_DOUBLE_TYPE_SIZE == 64 ) {
5159- m3_call_direct (lround_proc , t_int_64 );
5164+ m3_call_direct (lround_proc , dt );
51605165 } else {
5161- m3_call_direct (lroundq_proc , t_int_64 );
5166+ m3_call_direct (lroundq_proc , dt );
51625167 }
51635168 }
51645169 EXPR_REF (-1 ) = m3_build1 (FIX_TRUNC_EXPR , dst_t , EXPR_REF (-1 ));
You can’t perform that action at this time.
0 commit comments