Unimplemented instructions on a G5?
Hello
I've recently came across a very strange problem.
I have some PPC code with some inline assembly for implementing saturated arithmetic.
The code runs fine on a 8xx target and on the G4 development host.
When I upgraded to a G5 running Gentoo the same code terminates with an illegal instruction trap.
The offending instruction is the seemingly harmless:
mcrxr crX
(Move to condition register from XER).
Does anyone have any idea if IBM left this instruction unimplemented. Searching the docs I've found nothing.
It's not a deal-breaker but it is inconvinient to not be able to run the target binaries on the host.
If it is unimplemented any idea of how hard it will be to trap and emulate it?
Regards
Pantelis
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 9 lines
The offending instruction is the seemingly harmless:
mcrxr crX
(Move to condition register from XER).
Does anyone have any idea if IBM left this instruction unimplemented. Searching the docs I've found nothing.
Well, the newest PowerPC architecture docs say that it is an optional insn, i.e., not all cpus might implement it.
I can't say whether the 970 implements it or not.
http://www-106.ibm.com/developerworks/eserver/pdfs/archpub1.pdf
Chapter 6.
Quoted 2 lines
If it is unimplemented any idea of how hard it will be to trap and emulate it?
In Linux?
Last time I did this, it was easy. Can't seem to find the patch right now, though.
Emulating will be slow, of course (but I think you know that).
Segher
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 11 lines
Quoted 11 lines
The offending instruction is the seemingly harmless:
mcrxr crX
(Move to condition register from XER).
Does anyone have any idea if IBM left this instruction unimplemented. Searching the docs I've found nothing.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Segher Boessenkool writes:
Segher> Well, the newest PowerPC architecture docs say that it is Segher> an optional insn, i.e., not all cpus might implement it.
Segher> I can't say whether the 970 implements it or not.
mcrxr is obsolete and not implemented in PPC970. Executing the
instruction will result in an illegal instruction trap.
David
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 19 lines · David Edelsohn
Quoted 13 lines
Quoted 10 lines
The offending instruction is the seemingly harmless:
mcrxr crX
(Move to condition register from XER).
Does anyone have any idea if IBM left this instruction unimplemented. Searching the docs I've found nothing.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Segher Boessenkool writes:
Segher> Well, the newest PowerPC architecture docs say that it is Segher> an optional insn, i.e., not all cpus might implement it.
Quoted 9 lines
Segher> I can't say whether the 970 implements it or not.
mcrxr is obsolete and not implemented in PPC970. Executing the
instruction will result in an illegal instruction trap.David
Well this much is obvious. Where can I find a list of these obsolete instructions so that I can implement them in the illegal instruction handler?
The IBM documentation for the 970 declares these instructions as the previous architecture papers, i.e. as nothing special.
Regards
Pantelis
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 11 lines · Segher Boessenkool
Quoted 9 lines
The offending instruction is the seemingly harmless:
mcrxr crX
(Move to condition register from XER).
Does anyone have any idea if IBM left this instruction unimplemented. Searching the docs I've found nothing.
Quoted 8 lines
Well, the newest PowerPC architecture docs say that it is an optional insn, i.e., not all cpus might implement it.
I can't say whether the 970 implements it or not.
http://www-106.ibm.com/developerworks/eserver/pdfs/archpub1.pdf
Chapter 6.
Thanks this was the information I needed. Actually it's only the mcrxr instruction that's unimplemented. Just my luck :-)
Quoted 6 lines
Quoted 2 lines
If it is unimplemented any idea of how hard it will be to trap and emulate it?
In Linux?
Quoted 12 lines
Last time I did this, it was easy. Can't seem to find the patch right now, though.
Emulating will be slow, of course (but I think you know that).
Segher
Regards
Pantelis
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/