Forum Discussion
Altera_Forum
Honored Contributor
13 years agoChange compiler option flags for double precision floating point custom instruction
Hi, I am trying to impliment a double precision floating point in hardware (custom instruction) but I don't know how to change the compiler option flags to tell NIOS II to use the custom instruc...
Altera_Forum
Honored Contributor
13 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.