PPC601 MQ patch

Stef Simoens stef.simoens at pi.be
Tue Jun 1 22:26:07 EST 2004


I wanted to use gcc's -mcpu=601 to optimize code for my processor; I noticed the code had problems with certain instructions (the ones which use the POWER MQ register).

With some help of benh I'd like to share this patch. Unlike benh asked, it is still for 2.4 (I will provide the 2.6 patch as soon I'm sure it works as expected).

I used the assembler 'hiding' techniques as used for VRSAVE, to know where to save/restore MQ I looked where the XER register was saved/restored...

ppc-stub.c is used for debugging. I added MQ, but I didn't test this. Especially, I don't know if my changes interfere with other machines (include/asm-ppc/ptrace.h states mq is used to hold IPL on APUS)
Also note, I didn't enable CONFIG_PPC601_SYNC_FIX while testing (my machine doesn't appear to need it...)

Files changed:
	- rearrange PPC601 options
	- CONFIG_PPC601_MQ configure option
	- add CPU_FTR_MQ to 601 features
	- saving and restoring of MQ register
	- saving of MQ register
	- we use mq now :)
	- show the MQ register
	- document CONFIG_PPC601_MQ
	- define CPU_FTR_MQ
	- define SPRN_MQ
	- delete the '(not used at present)' comment

With Scarlet ADSL your upload speed could reach 384 Kbits
More info at http://www.scarlet.be/nl/consumer/adsl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: linux-2.4.26-mq.diff.gz
Type: application/x-gzip-compressed
Size: 2556 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20040601/2f3b26d8/attachment.bin>

More information about the Linuxppc-dev mailing list