Forum Discussion
Altera_Forum
Honored Contributor
12 years agoThe compiler only has support for 'float' custom instrutions for FP (not double).
Using custom instructions for 'double' would be more compilcated because the custom instruction interface only allows two 32bit arguments and one 32bit result from custom instructions. You could modify gcc to add patterns for your 'double' instructions, but it is probably easier to add gcc asm statements for them. You'll probably need to write them - I'm not sure how you get double values into a register pair though (rtfm ...). You might also want to read a recent thread about doing 1024bit integer arithmetic - you have the same problem.