Forum Discussion
Altera_Forum
Honored Contributor
10 years agookey, i think the problem is the "hardware_fp_cust_inst_no_divider_present" option
if i uncheck it, the objdump file is c=a*b; 1082c4: e0fffc17 ldw r3,-16(fp) 1082c8: e0bffd17 ldw r2,-12(fp) 1082cc: 1885ff32 custom 252,r2,r3,r2 1082d0: e0bffe15 stw r2,-8(fp) c=ALT_CI_NIOS_CUSTOM_INSTR_FLOATING_POINT_0(0,b,a); //* 108324: e13ffd17 ldw r4,-12(fp) 108328: 01084000 call 108400 <__fixsfsi> 10832c: 1021883a mov r16,r2 108330: e13ffc17 ldw r4,-16(fp) 108334: 01084000 call 108400 <__fixsfsi> 108338: 8085ff32 custom 252,r2,r16,r2 10833c: 1009883a mov r4,r2 108340: 01084780 call 108478 <__floatsisf> 108344: 1007883a mov r3,r2 108348: e0fffe15 stw r3,-8(fp) at this time, the system.h file is still "__builtin_custom_inii", it leads to c=ALT_CI_NIOS_CUSTOM_INSTR_FLOATING_POINT_0(0,b,a); returns wrong value, like mikedsouze said . but that is not important, because the c=a*b works.