Subject: Bug in h8300.c
From: [email-masked] (Scott Mintz)

23 Apr 1997 13:23:57 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Original-To: [email-masked]
Content-Description: cc:Mail note part
Original-Sender: [email-masked]

     I built a cygwin32 cross compiler for the H8300-hms on a WinNT machine 
     using the 17.1 CDK.
     
     The file h8300.c in the gcc/config/h8300 subdirectory has the 
     following defined:
     
     /* Output assembly language code for the function prologue.  */
     static int push_order[FIRST_PSEUDO_REGISTER] =
     {0, 1, 2, 3, 4, 5, 6, -1, -1};
     static int pop_order[FIRST_PSEUDO_REGISTER] =
     {6, 5, 4, 3, 2, 1, 0, -1, -1};
     
     where FIRST_PSEUDO_REGISTER is defined to be 10.
     
     The last item in the above arrays gets defined as 0 because there are 
     only 9 initializers instead of 10.
     
     This causes the generated interrupt prologue/epilogue code to be 
     incorrect.
     
     The arrays should be defined this way:
     
     /* Output assembly language code for the function prologue.  */
     static int push_order[FIRST_PSEUDO_REGISTER] =
     {0, 1, 2, 3, 4, 5, 6, -1, -1, -1};
     static int pop_order[FIRST_PSEUDO_REGISTER] =
     {6, 5, 4, 3, 2, 1, 0, -1, -1, -1};
     
     +------------------------------+------------------------------------+
     | Scott A. Mintz               | voice: (216) 646-4805              |
     | Allen-Bradley Company        | fax:   (216) 646-4961              |
     | 1 Allen-Bradley Drive        | email: [email-masked]   |
     | Mayfield Hts., OH 44124-6118 | CIS:   71461,632                   |
     +------------------------------+------------------------------------+

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".