## DP: Description: Fix to cross-build for h8300 on 64bit arches
## DP: Author: Uros Bizjak <ubizjak at gmail dot com>
## DP: Upstream status: applied to 4.2 branch
## DP: Date: Sun, 21 Jan 2007 16:33:37 +0100

Index: gcc-h8300-hms-3.4.6/gcc/config/h8300/h8300.c
===================================================================
--- gcc-h8300-hms-3.4.6.orig/gcc/config/h8300/h8300.c	2011-06-08 23:51:58.000000000 +0200
+++ gcc-h8300-hms-3.4.6/gcc/config/h8300/h8300.c	2011-06-08 23:53:10.000000000 +0200
@@ -52,8 +52,8 @@
 static int h8300_saveall_function_p (tree);
 static int h8300_monitor_function_p (tree);
 static int h8300_os_task_function_p (tree);
-static void h8300_emit_stack_adjustment (int, unsigned int);
-static int round_frame_size (int);
+static void h8300_emit_stack_adjustment (int, HOST_WIDE_INT);
+static HOST_WIDE_INT round_frame_size (HOST_WIDE_INT);
 static unsigned int compute_saved_regs (void);
 static void push (int);
 static void pop (int);
@@ -368,7 +368,7 @@
    SIZE to adjust the stack pointer.  */
 
 static void
-h8300_emit_stack_adjustment (int sign, unsigned int size)
+h8300_emit_stack_adjustment (int sign, HOST_WIDE_INT size)
 {
   /* H8/300 cannot add/subtract a large constant with a single
      instruction.  If a temporary register is available, load the
@@ -397,8 +397,8 @@
 
 /* Round up frame size SIZE.  */
 
-static int
-round_frame_size (int size)
+static HOST_WIDE_INT
+round_frame_size (HOST_WIDE_INT size)
 {
   return ((size + STACK_BOUNDARY / BITS_PER_UNIT - 1)
 	  & -STACK_BOUNDARY / BITS_PER_UNIT);
