--- gcc/config/m68k/crds.h 2018/04/24 18:14:30 1.1.1.2 +++ gcc/config/m68k/crds.h 2018/04/24 18:21:00 1.1.1.3 @@ -1,10 +1,7 @@ -/* Definitions of target machine for GNU compiler. - Charles River Data Systems UNiverse/32 - - Written by Gary E. Miller - bug reports to Gary_Edmunds_Miller@cup.portal.com - - Copyright (C) 1987, 1993 Free Software Foundation, Inc. +/* Definitions of target machine for GNU compiler; + Charles River Data Systems UNiverse/32. + Copyright (C) 1987, 1993, 1994 Free Software Foundation, Inc. + Contributed by Gary E. Miller (Gary_Edmunds_Miller@cup.portal.com) This file is part of GNU CC. @@ -75,10 +72,6 @@ the Free Software Foundation, 675 Mass A /* #define SDB_DEBUGGING_INFO UNOS casm has no debugging :-( */ -/* UNOS has vprintf() */ - -#define HAVE_VPRINTF - /* UNOS need stack probe :-( */ #define HAVE_probe 1 @@ -209,7 +202,7 @@ do { long l[2]; \ #undef ASM_OUTPUT_ASCII #define ASM_OUTPUT_ASCII(FILE, P , SIZE) \ -{ int i; \ +do { int i; \ fprintf ((FILE), "\t.ascii \""); \ for (i = 0; i < (SIZE); i++) \ { \ @@ -222,11 +215,11 @@ do { long l[2]; \ continue; \ } \ } \ - /* brain dead asm doesn't understand char escapes */ \ + /* brain dead asm doesn't understand char escapes */ \ fprintf ((FILE), "\"\n\t.byte\t%d\n\t.ascii \"", c); \ } \ fprintf ((FILE), "\"\n"); \ - } + } while (0) /* Change all JBxx to Bxx. Also change all DBRA to DBF. @@ -313,14 +306,14 @@ do { long l[2]; \ else \ { REAL_VALUE_TO_TARGET_SINGLE (r, l); \ fprintf (FILE, "$0x%x", l); } } \ - else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == XFmode) \ + else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == DFmode) \ { REAL_VALUE_TYPE r; \ REAL_VALUE_FROM_CONST_DOUBLE (r, X); \ - ASM_OUTPUT_LONG_DOUBLE_OPERAND (FILE, r); } \ - else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != DImode) \ + ASM_OUTPUT_DOUBLE_OPERAND (FILE, r); } \ + else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == XFmode) \ { REAL_VALUE_TYPE r; \ REAL_VALUE_FROM_CONST_DOUBLE (r, X); \ - ASM_OUTPUT_DOUBLE_OPERAND (FILE, r); } \ + ASM_OUTPUT_LONG_DOUBLE_OPERAND (FILE, r); } \ else { putc ('$', FILE); output_addr_const (FILE, X); }} /* Note that this contains a kludge that knows that the only reason @@ -500,6 +493,18 @@ do { long l[2]; \ fprintf (FILE, "\tlink a6,$%d\n", -fsize); \ else \ fprintf (FILE, "\tlink a6,$0\n\tsubl $%d,sp\n", fsize); } \ + else if (fsize) \ + { \ + /* Adding negative number is faster on the 68040. */ \ + if (fsize + 4 < 0x8000) \ + { \ + fprintf (FILE, "\tadd.w #%d,sp\n", - (fsize + 4)); \ + } \ + else \ + { \ + fprintf (FILE, "\tadd.l #%d,sp\n", - (fsize + 4)); \ + } \ + } \ for (regno = 24; regno < 56; regno++) \ if (regs_ever_live[regno] && ! call_used_regs[regno]) \ fprintf(FILE, "\tfpmoved %s, sp@-\n", \ @@ -609,6 +614,17 @@ do { long l[2]; \ } \ if (frame_pointer_needed) \ fprintf (FILE, "\tunlk a6\n"); \ + else if (fsize) \ + { \ + if (fsize + 4 < 0x8000) \ + { \ + fprintf (FILE, "\tadd.w #%d,sp\n", fsize + 4); \ + } \ + else \ + { \ + fprintf (FILE, "\tadd.l #%d,sp\n", fsize + 4); \ + } \ + } \ if (current_function_pops_args) \ fprintf (FILE, "\trtd $%d\n", current_function_pops_args); \ else fprintf (FILE, "\trts\n"); }