This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
64-bit mn10300 prologue bug
- To: gcc-patches at gcc dot gnu dot org
- Subject: 64-bit mn10300 prologue bug
- From: Alexandre Oliva <aoliva at cygnus dot com>
- Date: 18 May 2000 16:21:40 -0300
- Organization: Cygnus Solutions, a Red Hat Company
This patch arranges for an alpha-x-mn10300 cross compiler to generate:
add -4,sp
instead of the 3 bytes longer yet equivalent instruction:
add 4194300,sp
While I was at it, I modified some types so that we'll get correct
code on 16-bit hosts, as well as 32-bit and 64-bit ones.
Ok to install?
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@cygnus.com>
* config/mn10300/mn10300.c (expand_prologue, expand_epilogue):
16-bit and 64-bit clean-up.
Index: gcc/config/mn10300/mn10300.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mn10300/mn10300.c,v
retrieving revision 1.27
diff -u -r1.27 mn10300.c
--- gcc/config/mn10300/mn10300.c 2000/05/11 21:08:18 1.27
+++ gcc/config/mn10300/mn10300.c 2000/05/18 19:12:39
@@ -380,7 +380,7 @@
void
expand_prologue ()
{
- unsigned int size;
+ unsigned long size;
/* SIZE includes the fixed stack space needed for function calls. */
size = get_frame_size () + current_function_outgoing_args_size;
@@ -415,13 +415,13 @@
if (size)
emit_insn (gen_addsi3 (stack_pointer_rtx,
stack_pointer_rtx,
- GEN_INT (-size)));
+ GEN_INT (-(long)size)));
}
void
expand_epilogue ()
{
- unsigned int size;
+ unsigned long size;
/* SIZE includes the fixed stack space needed for function calls. */
size = get_frame_size () + current_function_outgoing_args_size;
--
Alexandre Oliva Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me