Thursday, January 18, 2007


In a recent post I said that float point(FP) ability of Loongson cannot be fully exploited by gcc because gcc only take use of two FP elements of total four in Loongson. That is not exactly true. Loongson Instruction Set has special instructions like multiply-add (MADD), multiply-subtract (MSUB), etc. Every FP element can execute an MADD-like instruction but gcc can not generate assembler executables with these Loongson-specific advanced instructions. As a result, one MADD will be cut into a muliplication and an addition by gcc, being executed in two steps. So the complier seems utilize only two of the four FP elements in effect.

No comments: