Forum Discussion
Altera_Forum
Honored Contributor
10 years agohi mikedsouze, thanks for your help.
i check the objdump file, i find it is a little like a assembly language file. when i add the floating point hardware in nios II, i use both c=a*b and c=ALT_CI_NIOS_CUSTOM_INSTR_FLOATING_POINT_0(0,a,b); then i check the objdump file: c=a*b; 1082c4: e13ffc17 ldw r4,-16(fp) 1082c8: e17ffd17 ldw r5,-12(fp) 1082cc: 01084140 call 108414 <__mulsf3> 1082d0: 1007883a mov r3,r2 1082d4: e0fffe15 stw r3,-8(fp) c=ALT_CI_NIOS_CUSTOM_INSTR_FLOATING_POINT_0(0,b,a); 1083d8: e13ffd17 ldw r4,-12(fp) 1083dc: 0108d340 call 108d34 <__fixsfsi> 1083e0: 1021883a mov r16,r2 1083e4: e13ffc17 ldw r4,-16(fp) 1083e8: 0108d340 call 108d34 <__fixsfsi> 1083ec: 8085ff32 custom 252,r2,r16,r2 1083f0: 1009883a mov r4,r2 1083f4: 0108dac0 call 108dac <__floatsisf> 1083f8: 1007883a mov r3,r2 1083fc: e0fffe15 stw r3,-8(fp) it looks like the floating point hardware will only be used when i use c=ALT_CI_NIOS_CUSTOM_INSTR_FLOATING_POINT_0(0,b,a); but when run debug, the result of the c=ALT_CI_NIOS_CUSTOM_INSTR_FLOATING_POINT_0(0,b,a); is 0.0