Failed to port Binutils 2.27 to PSP


I was bored with playing Tetris and had a planty of time. Then, I saw a news which says GCC 4.9.x ends. It should have been a good chance to port the latest Binutils and GCC, but it was not easy at all.

The problem I’m facing is incompatibility with VFPU instructions.

The latest GAS expects an argument will be used only for an operand and the operand shouldn’t be divided. For example, vpfxs instruction has the following operands: ?0,?1,?2,?3.

{"vpfxs",   "?0,?1,?2,?3", 0xdc000000, 0xff000000, RD_C2,      0,      AL  },

Each operands will be divided into four parts.

         operand = (pfx_neg << (VF_SH_PFX_NEG + shift))
             | (pfx_cst << (VF_SH_PFX_CST + shift))
             | (pfx_abs << (VF_SH_PFX_ABS + shift))
             | (pfx_swz << (VF_SH_PFX_SWZ + shift * 2));

That’s fatal. Fixing this will be troublesome and make it diverge from the upstream unless you have some “dirty hack”.

I’m not sure which is uncommon: architecures which have divided operands or ones which don’t. But the architecture of PSP is actually exotic.

[top]