Altera_Forum
Honored Contributor
14 years agoGCC and FPU
Hello everyone,
I am porting some legacy code which uses double precision floating point. Changing double to single fp or fixed point would require a major rewrite which I want to avoid. I implemented the needed double fp ops as custom instructions and told gcc about it with -mcustom-*. It works, but gcc generates 3 insn per op which is slow. I am thinking of adding fp registers to my fpu - shouldn't be a problem except for the gcc part... at the moment llvm seems much easier to 'hack' with. Does anybody have an idea how much work it would take to extend (describe a custom fpu) the current nios2 gcc (or llvm) port and where to start? Thanks for you help!