aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1997-03-25 15:24:20 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1997-03-25 15:24:20 -0500
commit9fb9ea4a4e1b24afb9b5c8530ccbb7bfab10e46f (patch)
treed32e8b6602cfa48d0fad4186661966a6489fde70
parent641241db80de133687af86a5432e4f72358ccd37 (diff)
downloadgcc-9fb9ea4a4e1b24afb9b5c8530ccbb7bfab10e46f.zip
gcc-9fb9ea4a4e1b24afb9b5c8530ccbb7bfab10e46f.tar.gz
gcc-9fb9ea4a4e1b24afb9b5c8530ccbb7bfab10e46f.tar.bz2
(ASM_RETURN_CASE_JUMP): Use extl to explicitly sign extend index
register on TARGET_5200. From-SVN: r13800
-rw-r--r--gcc/config/m68k/apollo68.h11
-rw-r--r--gcc/config/m68k/coff.h10
-rw-r--r--gcc/config/m68k/linux.h10
-rw-r--r--gcc/config/m68k/mot3300.h10
-rw-r--r--gcc/config/m68k/pbb.h10
5 files changed, 39 insertions, 12 deletions
diff --git a/gcc/config/m68k/apollo68.h b/gcc/config/m68k/apollo68.h
index 2e43dbd..8eed141 100644
--- a/gcc/config/m68k/apollo68.h
+++ b/gcc/config/m68k/apollo68.h
@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. Apollo 680X0 version.
- Copyright (C) 1989,1992, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1989, 1992, 1996, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -180,8 +180,13 @@ Boston, MA 02111-1307, USA. */
/* config/m68k.md has an explicit reference to the program counter,
prefix this by the register prefix. */
-#define ASM_RETURN_CASE_JUMP return "jmp %%pc@(2,%0:w)"
-
+#define ASM_RETURN_CASE_JUMP \
+ do { \
+ if (TARGET_5200) \
+ return "ext%.l %0\n\tjmp %%pc@(2,%0:l)"; \
+ else \
+ return "jmp %%pc@(2,%0:w)" \
+ } while (0)
/* Here are the new register names. */
diff --git a/gcc/config/m68k/coff.h b/gcc/config/m68k/coff.h
index 2565cce..85b1061 100644
--- a/gcc/config/m68k/coff.h
+++ b/gcc/config/m68k/coff.h
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler.
m68k series COFF object files and debugging, version.
- Copyright (C) 1994, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -55,7 +55,13 @@ Boston, MA 02111-1307, USA. */
/* config/m68k.md has an explicit reference to the program counter,
prefix this by the register prefix. */
-#define ASM_RETURN_CASE_JUMP return "jmp %%pc@(2,%0:w)"
+#define ASM_RETURN_CASE_JUMP \
+ do { \
+ if (TARGET_5200) \
+ return "ext%.l %0\n\tjmp %%pc@(2,%0:l)"; \
+ else \
+ return "jmp %%pc@(2,%0:w)"; \
+ } while (0)
/* Here are the new register names. */
diff --git a/gcc/config/m68k/linux.h b/gcc/config/m68k/linux.h
index 5807597..10ef0e8 100644
--- a/gcc/config/m68k/linux.h
+++ b/gcc/config/m68k/linux.h
@@ -156,9 +156,13 @@ Boston, MA 02111-1307, USA. */
/* Use the default action for outputting the case label. */
#undef ASM_OUTPUT_CASE_LABEL
-
-#define ASM_RETURN_CASE_JUMP \
- return "jmp (2,%%pc,%0.w)"
+#define ASM_RETURN_CASE_JUMP \
+ do { \
+ if (TARGET_5200) \
+ return "ext%.l %0\n\tjmp %%pc@(2,%0:l)"; \
+ else \
+ return "jmp %%pc@(2,%0:w)"; \
+ } while (0)
/* This is how to output an assembler line that says to advance the
location counter to a multiple of 2**LOG bytes. */
diff --git a/gcc/config/m68k/mot3300.h b/gcc/config/m68k/mot3300.h
index b4db771..d86874c 100644
--- a/gcc/config/m68k/mot3300.h
+++ b/gcc/config/m68k/mot3300.h
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler,
SysV68 Motorola 3300 Delta Series.
- Copyright (C) 1987, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1987, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
Contributed by Abramo and Roberto Bagnara (bagnara@dipisa.di.unipi.it)
based on Alex Crain's 3B1 definitions.
Maintained by Philippe De Muyter (phdm@info.ucl.ac.be).
@@ -566,7 +566,13 @@ do { long l; \
#define ASM_OUTPUT_CASE_FETCH(file, labelno, regname)\
asm_fprintf (file, "12(%Rpc,%s.", regname)
-#define ASM_RETURN_CASE_JUMP return "jmp 8(%%pc,%0.w)"
+#define ASM_RETURN_CASE_JUMP \
+ do { \
+ if (TARGET_5200) \
+ return "ext%.l %0\n\tjmp 8(%%pc,%0.l)"; \
+ else \
+ return "jmp 8(%%pc,%0.w)"; \
+ } while (0)
#else /* USE_GAS */
diff --git a/gcc/config/m68k/pbb.h b/gcc/config/m68k/pbb.h
index d73cda9..41319c2 100644
--- a/gcc/config/m68k/pbb.h
+++ b/gcc/config/m68k/pbb.h
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler.
Citicorp/TTI Unicom PBB version (using GAS with a %-register prefix)
- Copyright (C) 1987, 1988, 1990, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1987, 1988, 1990, 1996, 1997 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -114,7 +114,13 @@ Boston, MA 02111-1307, USA. */
! find_equiv_reg (0, get_last_insn (), 0, 0, 0, 8, Pmode)) \
asm_fprintf (FILE, "\tmovl %Rd0,%Ra0\n"); }
-#define ASM_RETURN_CASE_JUMP return "jmp %%pc@(2,%0:w)"
+#define ASM_RETURN_CASE_JUMP \
+ do { \
+ if (TARGET_5200) \
+ return "ext%.l %0\n\tjmp %%pc@(2,%0:l)"; \
+ else \
+ return "jmp %%pc@(2,%0:w)"; \
+ } while (0)
/* Although the gas we use can create .ctor and .dtor sections from N_SETT
stabs, it does not support section directives, so we need to have the loader