From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,75ac07b9469f604c X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 14 Mar 2009 08:16:57 -0500 From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: PowerPC ISA Date: Sat, 14 Mar 2009 13:17:57 +0000 Reply-To: brian@shapes.demon.co.uk Message-ID: References: <1iwjgj2.1gcbtto1mbvuicN%csampson@inetworld.net> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-1cVe8xTyb4CDQK5mb/3jZbx8c4XO5l3H0q5A7doXw8x8m5N1pkLzTTys7UhBUilTFeB/QPfUb7BLYFA!vaJK8NicGUdm8D2VJC+qDvN/TMq+pC5Vd/3BpLJdOszhQb1XqE2LOtyE6ZpCLpUsQB1pu8AVkZpF!QBXh X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 Xref: g2news2.google.com comp.lang.ada:5098 Date: 2009-03-14T13:17:57+00:00 List-Id: On Fri, 13 Mar 2009 22:58:44 -0700, csampson@inetworld.net (Charles H. Sampson) wrote: > Has anyone developed an Ada type that describes the PowerPC >instruction set architecture? Failing that, does anyone know of an >available description of how a PowerPC CPU might decode instructions? > > I'm fighting a horrendous bug in a high-rate real-time system; a >procedure's return address on the stack is being overwritten. I'm going >to write another procedure that can look at the stack on each execution >of the crippled procedure. Initially it will just look at stack sizes. >As I learn more, it will be modified. > > I've got the IBM book that describes the PowerPC but it's not laid >out to answer my questions. If I get no joy here, I'll figure it out >myself but I have no interest at all in reinventing the wheel. I need >to get this done as quickly and cheaply as possible. > > Charlie Sometimes all you need is a different view to help the official book make sense. It's not clear which PowerPC is under discussion but if it is any relation to the PPC405 (as incorporated onto various Xilinx FPGAs) the following may be useful. "PowerPC Processor Reference Guide" http://www.xilinx.com/support/documentation/user_guides/ug011.pdf Possibly also worth scanning XAPP1117 for (Xilinx-specific?) debugging techniques, and associated source for a program _designed_ to crash! (to exercise the debugging tools). Stack errors are mentioned on p.12. http://www.xilinx.com/support/documentation/application_notes/xapp1117.pdf It seems "the stack" is a much more flexible concept than I am used to: a mere convention (hopefully) agreed to by all users of registers. I tried searching support.xilinx.com for "PPC stack" and nothing more jumps out except for http://www.xilinx.com/support/answers/24291.htm which says "The PowerPC stack and heap information is available on the IBM Web site at http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/852569B20050FF77852569970071B0D6/$file/eabi_app.pdf" That link unfortunately doesn't seem to work any more. Perhaps it serves as a proof-of-existence for a useful document; searching ibm.com for eabi_app.pdf might be fruitful. - Brian