diff gcc/config/m32c/m32c-lib1.S @ 67:f6334be47118

update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 22 Mar 2011 17:18:12 +0900
parents a06113de4d67
children
line wrap: on
line diff
--- a/gcc/config/m32c/m32c-lib1.S	Tue May 25 18:58:51 2010 +0900
+++ b/gcc/config/m32c/m32c-lib1.S	Tue Mar 22 17:18:12 2011 +0900
@@ -1,5 +1,5 @@
 /* libgcc routines for R8C/M16C/M32C
-   Copyright (C) 2005, 2009
+   Copyright (C) 2005, 2009, 2010
    Free Software Foundation, Inc.
    Contributed by Red Hat.
 
@@ -204,20 +204,28 @@
 #endif
 
 #ifdef L__m32c_jsri16
-	.data
-m32c_jsri_addr:
-	.byte	0, 0, 0
-m32c_jsri_ret:
-	.byte	0, 0, 0
-
 	.text
+#ifdef A16
 	.global	m32c_jsri16
 m32c_jsri16:
-	pop.w	m32c_jsri_ret
-	pop.b	m32c_jsri_ret+2
-	pop.w	m32c_jsri_addr
-	push.b	m32c_jsri_ret+2
-	push.w	m32c_jsri_ret
-	jmpi.a	m32c_jsri_addr
+	add.w	#-1, sp
+
+	/* Read the address (16 bits) and return address (24 bits) off
+	the stack.  */
+	mov.w	4[sp], r0
+	mov.w	1[sp], r3
+	mov.b	3[sp], a0 /* This zero-extends, so the high byte has
+			     zero in it.  */
+
+	/* Write the return address, then new address, to the stack.  */
+	mov.w	a0, 1[sp] /* Just to get the zero in 2[sp].  */
+	mov.w	r0, 0[sp]
+	mov.w	r3, 3[sp]
+	mov.b	a0, 5[sp]
+
+	/* This "returns" to the target address, leaving the pending
+	return address on the stack.  */
+	rts
+#endif
 
 #endif