diff mbox

pdp11: correct trampoline

Message ID 39B50822-F65D-4B46-A739-8EADF55783E2@dell.com
State New
Headers show

Commit Message

Paul Koning Oct. 29, 2010, 3:31 p.m. UTC
The pdp11 backend had wrong instruction values for trampolines, which also causes an ICE.  This patch cures both issues.

Tested with build and make check.  Committed.

	paul

ChangeLog:

2010-10-29  Paul Koning  <ni1d@arrl.net>

	* config/pdp11/pdp11.c (pdp11_trampoline_init): Correct
	instruction encoding.
diff mbox

Patch

Index: config/pdp11/pdp11.c
===================================================================
--- config/pdp11/pdp11.c	(revision 166060)
+++ config/pdp11/pdp11.c	(working copy)
@@ -1908,8 +1908,8 @@ 
 
    the following should work for shared I/D:
 
-   MV	#STATIC, $4	0x940Y	0x0000 <- STATIC; Y = STATIC_CHAIN_REGNUM
-   JMP	FUNCTION	0x0058  0x0000 <- FUNCTION
+   MOV	#STATIC, $4	01270Y	0x0000 <- STATIC; Y = STATIC_CHAIN_REGNUM
+   JMP	@#FUNCTION	000137  0x0000 <- FUNCTION
 */
 
 static void
@@ -1921,11 +1921,11 @@ 
   gcc_assert (!TARGET_SPLIT);
 
   mem = adjust_address (m_tramp, HImode, 0);
-  emit_move_insn (mem, GEN_INT (0x9400+STATIC_CHAIN_REGNUM));
+  emit_move_insn (mem, GEN_INT (012700+STATIC_CHAIN_REGNUM));
   mem = adjust_address (m_tramp, HImode, 2);
   emit_move_insn (mem, chain_value);
   mem = adjust_address (m_tramp, HImode, 4);
-  emit_move_insn (mem, GEN_INT (0x0058));
+  emit_move_insn (mem, GEN_INT (000137));
   emit_move_insn (mem, fnaddr);
 }