Compiling For Powerpc using gcc

2.7k views Asked by At

While compiling for PowerPC (MPC5643L) using GCC, it does not recognize powerISA 2.03 instructions. How can I overcome this? More specifically, these are of e_ format assembly instructions mostly. ghs and windriver, however, do not show such problems.

I know the mpc56xx family is not support by GCC, but in other supported targets powerISA 2.03 is supported.

2

There are 2 answers

1
amigadev On

What are these instructions? Examples would have been welcome. I suppose they are SPE (Signal Processing Engine) instructions. I've never worked with that but GCC has an option -mspe to enable the generation of these instructions. You can read more information at: http://gcc.gnu.org/onlinedocs/gcc/RS_002f6000-and-PowerPC-Options.html

There is also -mabi=spe to "Extend the current ABI with a particular extension". I don't know the default value and if it is required in your case.

0
Etienne On

e_ ans se_ instructions are VLE (Variable-Length Encoding) instructions. The e_ ones are 32 bits and se_ are 16 bits. These should only be used when VLE mode is on. Note that most (if not all) e_ instructions have an equivalent classic PowerPC instructions.

So the real question is: is your intent to use VLE? If not, switch back to classic instructions. If yes, then I think you have a problem since as far as I know, gcc/gas does NOT support VLE. I know CodeSourcery is in the process of implementing it, but they had problems commiting their changes to the community. I don't know the current status of VLE support in gcc though.