alpha.c (alpha_initialize_trampoline): Hack around Pmode/ptr_mode lossage on VMS.
authorRichard Henderson <rth@cygnus.com>
Fri, 3 Jul 1998 02:31:43 +0000 (19:31 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 3 Jul 1998 02:31:43 +0000 (19:31 -0700)
        * alpha.c (alpha_initialize_trampoline): Hack around Pmode/ptr_mode
        lossage on VMS.  Reported by kkaempf@rmi.de.
        * alpha/vms.h (TRAMPOLINE_TEMPLATE): Add missing 0.

From-SVN: r20916

gcc/ChangeLog
gcc/config/alpha/alpha.c
gcc/config/alpha/vms.h

index 5d7f90efdc22b15ab69aae2c110cbb3c9d6f2954..0f21f6309ed115d3615abc6a15f5ef3c01c66a17 100644 (file)
@@ -1,3 +1,9 @@
+Fri Jul  3 02:28:05 1998  Richard Henderson  <rth@cygnus.com>
+
+       * alpha.c (alpha_initialize_trampoline): Hack around Pmode/ptr_mode
+       lossage on VMS.  Reported by kkaempf@rmi.de.
+       * alpha/vms.h (TRAMPOLINE_TEMPLATE): Add missing 0.
+
 Thu Jul  2 17:41:14 1998  Nick Clifton  <nickc@cygnus.com>
 
        * config/m32r/m32r.h (MUST_PASS_IN_STACK): Override default
index d4cff504533de00b7fbe7a2d7e223202388e9409..68702a299fd4833e6c3cff982a484a0de28d1ec7 100644 (file)
@@ -2841,12 +2841,15 @@ alpha_initialize_trampoline (tramp, fnaddr, cxt, fnofs, cxtofs, jmpofs)
      int fnofs, cxtofs, jmpofs;
 {
   rtx temp, temp1, addr;
+  /* ??? Something is wrong with VMS codegen in that we get aborts when
+     using ptr_mode.  Hack around it for now.  */
+  enum machine_mode mode = TARGET_OPEN_VMS ? Pmode : ptr_mode;
 
   /* Store function address and CXT.  */
-  addr = memory_address (ptr_mode, plus_constant (tramp, fnofs));
-  emit_move_insn (gen_rtx (MEM, ptr_mode, addr), fnaddr);
-  addr = memory_address (ptr_mode, plus_constant (tramp, cxtofs));
-  emit_move_insn (gen_rtx (MEM, ptr_mode, addr), cxt);
+  addr = memory_address (mode, plus_constant (tramp, fnofs));
+  emit_move_insn (gen_rtx (MEM, mode, addr), fnaddr);
+  addr = memory_address (mode, plus_constant (tramp, cxtofs));
+  emit_move_insn (gen_rtx (MEM, mode, addr), cxt);
 
   /* This has been disabled since the hint only has a 32k range, and in
      no existing OS is the stack within 32k of the text segment. */
index e318f0bfde475fe67f671cf1effebf48e9653055..d91c47cfc237a969e66e295dc43d490b846893df 100644 (file)
@@ -392,7 +392,7 @@ do {                                                                        \
 {                                              \
   fprintf (FILE, "\t.quad 0\n");               \
   fprintf (FILE, "\t.linkage __tramp\n");      \
-  fprintf (FILE, "\t.quad 0\n");               \
+  fprintf (FILE, "\t.quad 0,0\n");             \
 }
 
 /* Length in units of the trampoline for entering a nested function.  */