patches/gcc/3.3.3/sh-lib1funcs_sizeAndType.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
     1 Fixes the problem
     2 	[ libdemo.so and main.o both use assignment on structures ]
     3 	$ sh4-unknown-linux-gnu-gcc libdemo.so main.o
     4 	sh4-unknown-linux-gnu/bin/ld: warning: type and size of dynamic symbol `__movstr_i4_even' are not defined
     5 	[ resulting app links, but crashes at runtime ]
     6 See testcase at http://tsukuba.m17n.org/linux-sh/ml/linux-sh/2003-11/msg00016.html
     7 
     8 Patch was posted as http://gcc.gnu.org/ml/gcc-patches/2002-11/msg01641.html
     9 and is in cvs as http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sh/lib1funcs.asm.diff?r1=1.29.4.1&r2=1.29.4.2
    10 
    11 but see also sh-libgcc-hidden.patch (part of gcc-3.3.3 as of 20040119 or so)
    12 
    13 ===================================================================
    14 
    15 --- gcc/gcc/config/sh/lib1funcs.asm	2002/09/20 01:29:21	1.29.4.1
    16 +++ gcc/gcc/config/sh/lib1funcs.asm	2003/11/18 12:27:31
    17 @@ -38,9 +38,14 @@
    18     amylaar@cygnus.com  */
    19  
    20  #ifdef __ELF__
    21 -#define LOCAL(X) .L_##X
    22 -#else
    23 -#define LOCAL(X) L_##X
    24 +#define LOCAL(X)	.L_##X
    25 +#define FUNC(X)		.type X,@function
    26 +#define ENDFUNC0(X)	.Lfe_##X: .size X,.Lfe_##X-X
    27 +#define ENDFUNC(X)	ENDFUNC0(X)
    28 +#else
    29 +#define LOCAL(X)	L_##X
    30 +#define FUNC(X)
    31 +#define ENDFUNC(X)
    32  #endif
    33  
    34  #define	CONCAT(A,B)	A##B
    35 @@ -87,6 +92,40 @@
    36  	.global	GLOBAL(ashiftrt_r4_31)
    37  	.global	GLOBAL(ashiftrt_r4_32)
    38  
    39 +	FUNC(GLOBAL(ashiftrt_r4_0))
    40 +	FUNC(GLOBAL(ashiftrt_r4_1))
    41 +	FUNC(GLOBAL(ashiftrt_r4_2))
    42 +	FUNC(GLOBAL(ashiftrt_r4_3))
    43 +	FUNC(GLOBAL(ashiftrt_r4_4))
    44 +	FUNC(GLOBAL(ashiftrt_r4_5))
    45 +	FUNC(GLOBAL(ashiftrt_r4_6))
    46 +	FUNC(GLOBAL(ashiftrt_r4_7))
    47 +	FUNC(GLOBAL(ashiftrt_r4_8))
    48 +	FUNC(GLOBAL(ashiftrt_r4_9))
    49 +	FUNC(GLOBAL(ashiftrt_r4_10))
    50 +	FUNC(GLOBAL(ashiftrt_r4_11))
    51 +	FUNC(GLOBAL(ashiftrt_r4_12))
    52 +	FUNC(GLOBAL(ashiftrt_r4_13))
    53 +	FUNC(GLOBAL(ashiftrt_r4_14))
    54 +	FUNC(GLOBAL(ashiftrt_r4_15))
    55 +	FUNC(GLOBAL(ashiftrt_r4_16))
    56 +	FUNC(GLOBAL(ashiftrt_r4_17))
    57 +	FUNC(GLOBAL(ashiftrt_r4_18))
    58 +	FUNC(GLOBAL(ashiftrt_r4_19))
    59 +	FUNC(GLOBAL(ashiftrt_r4_20))
    60 +	FUNC(GLOBAL(ashiftrt_r4_21))
    61 +	FUNC(GLOBAL(ashiftrt_r4_22))
    62 +	FUNC(GLOBAL(ashiftrt_r4_23))
    63 +	FUNC(GLOBAL(ashiftrt_r4_24))
    64 +	FUNC(GLOBAL(ashiftrt_r4_25))
    65 +	FUNC(GLOBAL(ashiftrt_r4_26))
    66 +	FUNC(GLOBAL(ashiftrt_r4_27))
    67 +	FUNC(GLOBAL(ashiftrt_r4_28))
    68 +	FUNC(GLOBAL(ashiftrt_r4_29))
    69 +	FUNC(GLOBAL(ashiftrt_r4_30))
    70 +	FUNC(GLOBAL(ashiftrt_r4_31))
    71 +	FUNC(GLOBAL(ashiftrt_r4_32))
    72 +
    73  	.align	1
    74  GLOBAL(ashiftrt_r4_32):
    75  GLOBAL(ashiftrt_r4_31):
    76 @@ -166,6 +205,40 @@
    77  GLOBAL(ashiftrt_r4_0):
    78  	rts
    79  	nop
    80 +
    81 +	ENDFUNC(GLOBAL(ashiftrt_r4_0))
    82 +	ENDFUNC(GLOBAL(ashiftrt_r4_1))
    83 +	ENDFUNC(GLOBAL(ashiftrt_r4_2))
    84 +	ENDFUNC(GLOBAL(ashiftrt_r4_3))
    85 +	ENDFUNC(GLOBAL(ashiftrt_r4_4))
    86 +	ENDFUNC(GLOBAL(ashiftrt_r4_5))
    87 +	ENDFUNC(GLOBAL(ashiftrt_r4_6))
    88 +	ENDFUNC(GLOBAL(ashiftrt_r4_7))
    89 +	ENDFUNC(GLOBAL(ashiftrt_r4_8))
    90 +	ENDFUNC(GLOBAL(ashiftrt_r4_9))
    91 +	ENDFUNC(GLOBAL(ashiftrt_r4_10))
    92 +	ENDFUNC(GLOBAL(ashiftrt_r4_11))
    93 +	ENDFUNC(GLOBAL(ashiftrt_r4_12))
    94 +	ENDFUNC(GLOBAL(ashiftrt_r4_13))
    95 +	ENDFUNC(GLOBAL(ashiftrt_r4_14))
    96 +	ENDFUNC(GLOBAL(ashiftrt_r4_15))
    97 +	ENDFUNC(GLOBAL(ashiftrt_r4_16))
    98 +	ENDFUNC(GLOBAL(ashiftrt_r4_17))
    99 +	ENDFUNC(GLOBAL(ashiftrt_r4_18))
   100 +	ENDFUNC(GLOBAL(ashiftrt_r4_19))
   101 +	ENDFUNC(GLOBAL(ashiftrt_r4_20))
   102 +	ENDFUNC(GLOBAL(ashiftrt_r4_21))
   103 +	ENDFUNC(GLOBAL(ashiftrt_r4_22))
   104 +	ENDFUNC(GLOBAL(ashiftrt_r4_23))
   105 +	ENDFUNC(GLOBAL(ashiftrt_r4_24))
   106 +	ENDFUNC(GLOBAL(ashiftrt_r4_25))
   107 +	ENDFUNC(GLOBAL(ashiftrt_r4_26))
   108 +	ENDFUNC(GLOBAL(ashiftrt_r4_27))
   109 +	ENDFUNC(GLOBAL(ashiftrt_r4_28))
   110 +	ENDFUNC(GLOBAL(ashiftrt_r4_29))
   111 +	ENDFUNC(GLOBAL(ashiftrt_r4_30))
   112 +	ENDFUNC(GLOBAL(ashiftrt_r4_31))
   113 +	ENDFUNC(GLOBAL(ashiftrt_r4_32))
   114  #endif
   115  
   116  #ifdef L_ashiftrt_n
   117 @@ -188,6 +261,7 @@
   118  !
   119  
   120  	.global	GLOBAL(ashrsi3)
   121 +	FUNC(GLOBAL(ashrsi3))
   122  	.align	2
   123  GLOBAL(ashrsi3):
   124  	mov	#31,r0
   125 @@ -315,6 +389,7 @@
   126  	rts
   127  	nop
   128  
   129 +	ENDFUNC(GLOBAL(ashrsi3))
   130  #endif
   131  
   132  #ifdef L_ashiftlt
   133 @@ -336,6 +411,7 @@
   134  ! (none)
   135  !
   136  	.global	GLOBAL(ashlsi3)
   137 +	FUNC(GLOBAL(ashlsi3))
   138  	.align	2
   139  GLOBAL(ashlsi3):
   140  	mov	#31,r0
   141 @@ -472,6 +548,7 @@
   142  	rts
   143  	nop
   144  
   145 +	ENDFUNC(GLOBAL(ashlsi3))
   146  #endif
   147  
   148  #ifdef L_lshiftrt
   149 @@ -493,6 +570,7 @@
   150  ! (none)
   151  !
   152  	.global	GLOBAL(lshrsi3)
   153 +	FUNC(GLOBAL(lshrsi3))
   154  	.align	2
   155  GLOBAL(lshrsi3):
   156  	mov	#31,r0
   157 @@ -629,6 +707,7 @@
   158  	rts
   159  	nop
   160  
   161 +	ENDFUNC(GLOBAL(lshrsi3))
   162  #endif
   163  
   164  #ifdef L_movstr
   165 @@ -645,76 +724,113 @@
   166  	add	#64,r4
   167  	.align	4
   168  	.global	GLOBAL(movstrSI64)
   169 +	FUNC(GLOBAL(movstrSI64))
   170  GLOBAL(movstrSI64):
   171  	mov.l	@(60,r5),r0
   172  	mov.l	r0,@(60,r4)
   173  	.global	GLOBAL(movstrSI60)
   174 +	FUNC(GLOBAL(movstrSI60))
   175  GLOBAL(movstrSI60):
   176  	mov.l	@(56,r5),r0
   177  	mov.l	r0,@(56,r4)
   178  	.global	GLOBAL(movstrSI56)
   179 +	FUNC(GLOBAL(movstrSI56))
   180  GLOBAL(movstrSI56):
   181  	mov.l	@(52,r5),r0
   182  	mov.l	r0,@(52,r4)
   183  	.global	GLOBAL(movstrSI52)
   184 +	FUNC(GLOBAL(movstrSI52))
   185  GLOBAL(movstrSI52):
   186  	mov.l	@(48,r5),r0
   187  	mov.l	r0,@(48,r4)
   188  	.global	GLOBAL(movstrSI48)
   189 +	FUNC(GLOBAL(movstrSI48))
   190  GLOBAL(movstrSI48):
   191  	mov.l	@(44,r5),r0
   192  	mov.l	r0,@(44,r4)
   193  	.global	GLOBAL(movstrSI44)
   194 +	FUNC(GLOBAL(movstrSI44))
   195  GLOBAL(movstrSI44):
   196  	mov.l	@(40,r5),r0
   197  	mov.l	r0,@(40,r4)
   198  	.global	GLOBAL(movstrSI40)
   199 +	FUNC(GLOBAL(movstrSI40))
   200  GLOBAL(movstrSI40):
   201  	mov.l	@(36,r5),r0
   202  	mov.l	r0,@(36,r4)
   203  	.global	GLOBAL(movstrSI36)
   204 +	FUNC(GLOBAL(movstrSI36))
   205  GLOBAL(movstrSI36):
   206  	mov.l	@(32,r5),r0
   207  	mov.l	r0,@(32,r4)
   208  	.global	GLOBAL(movstrSI32)
   209 +	FUNC(GLOBAL(movstrSI32))
   210  GLOBAL(movstrSI32):
   211  	mov.l	@(28,r5),r0
   212  	mov.l	r0,@(28,r4)
   213  	.global	GLOBAL(movstrSI28)
   214 +	FUNC(GLOBAL(movstrSI28))
   215  GLOBAL(movstrSI28):
   216  	mov.l	@(24,r5),r0
   217  	mov.l	r0,@(24,r4)
   218  	.global	GLOBAL(movstrSI24)
   219 +	FUNC(GLOBAL(movstrSI24))
   220  GLOBAL(movstrSI24):
   221  	mov.l	@(20,r5),r0
   222  	mov.l	r0,@(20,r4)
   223  	.global	GLOBAL(movstrSI20)
   224 +	FUNC(GLOBAL(movstrSI20))
   225  GLOBAL(movstrSI20):
   226  	mov.l	@(16,r5),r0
   227  	mov.l	r0,@(16,r4)
   228  	.global	GLOBAL(movstrSI16)
   229 +	FUNC(GLOBAL(movstrSI16))
   230  GLOBAL(movstrSI16):
   231  	mov.l	@(12,r5),r0
   232  	mov.l	r0,@(12,r4)
   233  	.global	GLOBAL(movstrSI12)
   234 +	FUNC(GLOBAL(movstrSI12))
   235  GLOBAL(movstrSI12):
   236  	mov.l	@(8,r5),r0
   237  	mov.l	r0,@(8,r4)
   238  	.global	GLOBAL(movstrSI8)
   239 +	FUNC(GLOBAL(movstrSI8))
   240  GLOBAL(movstrSI8):
   241  	mov.l	@(4,r5),r0
   242  	mov.l	r0,@(4,r4)
   243  	.global	GLOBAL(movstrSI4)
   244 +	FUNC(GLOBAL(movstrSI4))
   245  GLOBAL(movstrSI4):
   246  	mov.l	@(0,r5),r0
   247  	mov.l	r0,@(0,r4)
   248 +	.global	GLOBAL(movstrSI0)
   249 +	FUNC(GLOBAL(movstrSI0))
   250  GLOBAL(movstrSI0):
   251  	rts
   252  	nop
   253  
   254 +	ENDFUNC(GLOBAL(movstrSI64))
   255 +	ENDFUNC(GLOBAL(movstrSI60))
   256 +	ENDFUNC(GLOBAL(movstrSI56))
   257 +	ENDFUNC(GLOBAL(movstrSI52))
   258 +	ENDFUNC(GLOBAL(movstrSI48))
   259 +	ENDFUNC(GLOBAL(movstrSI44))
   260 +	ENDFUNC(GLOBAL(movstrSI40))
   261 +	ENDFUNC(GLOBAL(movstrSI36))
   262 +	ENDFUNC(GLOBAL(movstrSI32))
   263 +	ENDFUNC(GLOBAL(movstrSI28))
   264 +	ENDFUNC(GLOBAL(movstrSI24))
   265 +	ENDFUNC(GLOBAL(movstrSI20))
   266 +	ENDFUNC(GLOBAL(movstrSI16))
   267 +	ENDFUNC(GLOBAL(movstrSI12))
   268 +	ENDFUNC(GLOBAL(movstrSI8))
   269 +	ENDFUNC(GLOBAL(movstrSI4))
   270 +	ENDFUNC(GLOBAL(movstrSI0))
   271 +
   272  	.align	4
   273  
   274  	.global	GLOBAL(movstr)
   275 +	FUNC(GLOBAL(movstr))
   276  GLOBAL(movstr):
   277  	mov.l	@(60,r5),r0
   278  	mov.l	r0,@(60,r4)
   279 @@ -771,6 +887,8 @@
   280  	add	#64,r5
   281  	bra	GLOBAL(movstr)
   282  	add	#64,r4
   283 +
   284 +	FUNC(GLOBAL(movstr))
   285  #endif
   286  
   287  #ifdef L_movstr_i4
   288 @@ -779,6 +897,10 @@
   289  	.global	GLOBAL(movstr_i4_odd)
   290  	.global	GLOBAL(movstrSI12_i4)
   291  
   292 +	FUNC(GLOBAL(movstr_i4_even))
   293 +	FUNC(GLOBAL(movstr_i4_odd))
   294 +	FUNC(GLOBAL(movstrSI12_i4))
   295 +
   296  	.p2align	5
   297  L_movstr_2mod4_end:
   298  	mov.l	r0,@(16,r4)
   299 @@ -787,6 +909,11 @@
   300  
   301  	.p2align	2
   302  
   303 +GLOBAL(movstr_i4_even):
   304 +	mov.l	@r5+,r0
   305 +	bra	L_movstr_start_even
   306 +	mov.l	@r5+,r1
   307 +
   308  GLOBAL(movstr_i4_odd):
   309  	mov.l	@r5+,r1
   310  	add	#-4,r4
   311 @@ -813,10 +940,8 @@
   312  	rts
   313  	mov.l	r3,@(12,r4)
   314  
   315 -GLOBAL(movstr_i4_even):
   316 -	mov.l	@r5+,r0
   317 -	bra	L_movstr_start_even
   318 -	mov.l	@r5+,r1
   319 +	ENDFUNC(GLOBAL(movstr_i4_even))
   320 +	ENDFUNC(GLOBAL(movstr_i4_odd))
   321  
   322  	.p2align	4
   323  GLOBAL(movstrSI12_i4):
   324 @@ -827,12 +952,15 @@
   325  	mov.l	r1,@(4,r4)
   326  	rts
   327  	mov.l	r2,@(8,r4)
   328 +
   329 +	ENDFUNC(GLOBAL(movstrSI12_i4))
   330  #endif
   331  
   332  #ifdef L_mulsi3
   333  
   334  
   335  	.global	GLOBAL(mulsi3)
   336 +	FUNC(GLOBAL(mulsi3))
   337  
   338  ! r4 =       aabb
   339  ! r5 =       ccdd
   340 @@ -865,7 +993,7 @@
   341  	rts
   342  	add	r2,r0
   343  
   344 -
   345 +	FUNC(GLOBAL(mulsi3))
   346  #endif
   347  #endif /* ! __SH5__ */
   348  #ifdef L_sdivsi3_i4
   349 @@ -875,6 +1003,7 @@
   350  !! args in r4 and r5, result in fpul, clobber dr0, dr2
   351  
   352  	.global	GLOBAL(sdivsi3_i4)
   353 +	FUNC(GLOBAL(sdivsi3_i4))
   354  GLOBAL(sdivsi3_i4):
   355  	lds r4,fpul
   356  	float fpul,dr0
   357 @@ -884,6 +1013,7 @@
   358  	rts
   359  	ftrc dr0,fpul
   360  
   361 +	ENDFUNC(GLOBAL(sdivsi3_i4))
   362  #elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) || (defined (__SH5__) && ! defined __SH4_NOFPU__)
   363  !! args in r4 and r5, result in fpul, clobber r2, dr0, dr2
   364  
   365 @@ -892,6 +1022,7 @@
   366  	.mode	SHcompact
   367  #endif
   368  	.global	GLOBAL(sdivsi3_i4)
   369 +	FUNC(GLOBAL(sdivsi3_i4))
   370  GLOBAL(sdivsi3_i4):
   371  	sts.l fpscr,@-r15
   372  	mov #8,r2
   373 @@ -906,6 +1037,7 @@
   374  	rts
   375  	lds.l @r15+,fpscr
   376  
   377 +	ENDFUNC(GLOBAL(sdivsi3_i4))
   378  #endif /* ! __SH5__ || __SH5__ == 32 */
   379  #endif /* ! __SH4__ */
   380  #endif
   381 @@ -920,9 +1052,10 @@
   382  !!
   383  !!
   384  
   385 -!! args in r4 and r5, result in r0 clobber r1,r2,r3
   386 +!! args in r4 and r5, result in r0 clobber r1, r2, r3, and t bit
   387  
   388  	.global	GLOBAL(sdivsi3)
   389 +	FUNC(GLOBAL(sdivsi3))
   390  #if __SHMEDIA__
   391  #if __SH5__ == 32
   392  	.section	.text..SHmedia32,"ax"
   393 @@ -1166,6 +1299,7 @@
   394  div0:	rts
   395  	mov	#0,r0
   396  
   397 +	ENDFUNC(GLOBAL(sdivsi3))
   398  #endif /* ! __SHMEDIA__ */
   399  #endif /* ! __SH4__ */
   400  #endif
   401 @@ -1174,9 +1308,11 @@
   402  	.title "SH DIVIDE"
   403  !! 4 byte integer Divide code for the Hitachi SH
   404  #ifdef __SH4__
   405 -!! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4
   406 +!! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4,
   407 +!! and t bit
   408  
   409  	.global	GLOBAL(udivsi3_i4)
   410 +	FUNC(GLOBAL(udivsi3_i4))
   411  GLOBAL(udivsi3_i4):
   412  	mov #1,r1
   413  	cmp/hi r1,r5
   414 @@ -1217,11 +1353,13 @@
   415  L1:
   416  	.double 2147483648
   417  
   418 +	ENDFUNC(GLOBAL(udivsi3_i4))
   419  #elif defined (__SH5__) && ! defined (__SH4_NOFPU__)
   420  #if ! __SH5__ || __SH5__ == 32
   421  !! args in r4 and r5, result in fpul, clobber r20, r21, dr0, fr33
   422  	.mode	SHmedia
   423  	.global	GLOBAL(udivsi3_i4)
   424 +	FUNC(GLOBAL(udivsi3_i4))
   425  GLOBAL(udivsi3_i4):
   426  	addz.l	r4,r63,r20
   427  	addz.l	r5,r63,r21
   428 @@ -1234,6 +1372,8 @@
   429  	ftrc.dq dr0,dr32
   430  	fmov.s fr33,fr32
   431  	blink tr0,r63
   432 +
   433 +	ENDFUNC(GLOBAL(udivsi3_i4))
   434  #endif /* ! __SH5__ || __SH5__ == 32 */
   435  #elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__)
   436  !! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4
   437 @@ -1287,6 +1427,7 @@
   438  #endif
   439  	.double 2147483648
   440  
   441 +	ENDFUNC(GLOBAL(udivsi3_i4))
   442  #endif /* ! __SH4__ */
   443  #endif
   444  
   445 @@ -1297,6 +1438,7 @@
   446  
   447  !! args in r4 and r5, result in r0, clobbers r4, pr, and t bit
   448  	.global	GLOBAL(udivsi3)
   449 +	FUNC(GLOBAL(udivsi3))
   450  
   451  #if __SHMEDIA__
   452  #if __SH5__ == 32
   453 @@ -1485,6 +1627,7 @@
   454   rts
   455   rotcl r0
   456  
   457 +	ENDFUNC(GLOBAL(udivsi3))
   458  #endif /* ! __SHMEDIA__ */
   459  #endif /* __SH4__ */
   460  #endif /* L_udivsi3 */
   461 @@ -1790,6 +1933,7 @@
   462  	.mode	SHcompact
   463  #endif
   464  	.global GLOBAL(set_fpscr)
   465 +	FUNC(GLOBAL(set_fpscr))
   466  GLOBAL(set_fpscr):
   467  	lds r4,fpscr
   468  	mov.l LOCAL(set_fpscr_L1),r1
   469 @@ -1822,6 +1966,8 @@
   470  	.align 2
   471  LOCAL(set_fpscr_L1):
   472  	.long GLOBAL(fpscr_values)
   473 +
   474 +	ENDFUNC(GLOBAL(set_fpscr))
   475  #ifdef __ELF__
   476          .comm   GLOBAL(fpscr_values),8,4
   477  #else
   478 @@ -1860,6 +2006,7 @@
   479  	blink	tr0, r63
   480  #elif defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
   481  	.global GLOBAL(ic_invalidate)
   482 +	FUNC(GLOBAL(ic_invalidate))
   483  GLOBAL(ic_invalidate):
   484  	ocbwb	@r4
   485  	mova	0f,r0
   486 @@ -1882,6 +2029,8 @@
   487  	nop
   488  	.endr
   489  	.endr
   490 +
   491 +	ENDFUNC(GLOBAL(ic_invalidate))
   492  #endif /* SH4 */
   493  #endif /* L_ic_invalidate */
   494  
   495 @@ -1940,6 +2089,7 @@
   496  	will be expanded into r2/r3 upon return.  */
   497  	
   498  	.global	GLOBAL(GCC_shcompact_call_trampoline)
   499 +	FUNC(GLOBAL(GCC_shcompact_call_trampoline))
   500  GLOBAL(GCC_shcompact_call_trampoline):
   501  	ptabs/l	r0, tr0	/* Prepare to call the actual function.  */
   502  	movi	((datalabel LOCAL(ct_main_table) - 31 * 2) >> 16) & 65535, r0
   503 @@ -2290,6 +2440,8 @@
   504  	shari	r2, 32, r2
   505  #endif
   506  	blink	tr0, r63
   507 +
   508 +	ENDFUNC(GLOBAL(GCC_shcompact_call_trampoline))
   509  #endif /* L_shcompact_call_trampoline */
   510  
   511  #ifdef L_shcompact_return_trampoline
   512 @@ -2302,6 +2454,7 @@
   513  	.section	.text..SHmedia32, "ax"
   514  	.align	2
   515  	.global	GLOBAL(GCC_shcompact_return_trampoline)
   516 +	FUNC(GLOBAL(GCC_shcompact_return_trampoline))
   517  GLOBAL(GCC_shcompact_return_trampoline):
   518  	ptabs/l	r18, tr0
   519  #if __LITTLE_ENDIAN__
   520 @@ -2313,6 +2466,8 @@
   521  #endif
   522  	or	r3, r2, r2
   523  	blink	tr0, r63
   524 +
   525 +	ENDFUNC(GLOBAL(GCC_shcompact_return_trampoline))
   526  #endif /* L_shcompact_return_trampoline */
   527  
   528  #ifdef L_shcompact_incoming_args
   529 @@ -2367,6 +2522,7 @@
   530  	actual bit pattern.  */
   531  	
   532  	.global	GLOBAL(GCC_shcompact_incoming_args)
   533 +	FUNC(GLOBAL(GCC_shcompact_incoming_args))
   534  GLOBAL(GCC_shcompact_incoming_args):
   535  	ptabs/l	r18, tr0	/* Prepare to return.  */
   536  	shlri	r17, 32, r0	/* Load the cookie.  */
   537 @@ -2519,6 +2675,7 @@
   538  LOCAL(ia_return):	/* Return.  */
   539  	blink	tr0, r63
   540  LOCAL(ia_end_of_push_seq): /* Label used to compute the first push instruction.  */
   541 +	ENDFUNC(GLOBAL(GCC_shcompact_incoming_args))
   542  #endif /* L_shcompact_incoming_args */
   543  #endif
   544  #if __SH5__
   545 @@ -2530,6 +2687,7 @@
   546  #endif
   547  	.align	3 /* It is copied in units of 8 bytes in SHmedia mode.  */
   548  	.global	GLOBAL(GCC_nested_trampoline)
   549 +	FUNC(GLOBAL(GCC_nested_trampoline))
   550  GLOBAL(GCC_nested_trampoline):
   551  	.mode	SHmedia
   552  	ptrel/u	r63, tr0
   553 @@ -2546,6 +2704,8 @@
   554  	ld.l	r0, 28, r1
   555  #endif
   556  	blink	tr1, r63
   557 +
   558 +	ENDFUNC(GLOBAL(GCC_nested_trampoline))
   559  #endif /* L_nested_trampoline */
   560  #endif /* __SH5__ */
   561  #if __SH5__ == 32
   562 @@ -2555,6 +2715,7 @@
   563  	.align	2
   564  #ifndef __SH4_NOFPU__	
   565  	.global	GLOBAL(GCC_push_shmedia_regs)
   566 +	FUNC(GLOBAL(GCC_push_shmedia_regs))
   567  GLOBAL(GCC_push_shmedia_regs):
   568  	addi.l	r15, -14*8, r15
   569  	fst.d	r15, 13*8, dr62
   570 @@ -2573,6 +2734,7 @@
   571  	fst.d	r15,  0*8, dr36
   572  #endif
   573  	.global	GLOBAL(GCC_push_shmedia_regs_nofpu)
   574 +	FUNC(GLOBAL(GCC_push_shmedia_regs_nofpu))
   575  GLOBAL(GCC_push_shmedia_regs_nofpu):
   576  	ptabs/l	r18, tr0
   577  	addi.l	r15, -27*8, r15
   578 @@ -2608,8 +2770,13 @@
   579  	st.q	r15,  0*8, r28
   580  	blink	tr0, r63
   581  
   582 +#ifndef __SH4_NOFPU__	
   583 +	ENDFUNC(GLOBAL(GCC_push_shmedia_regs))
   584 +#endif
   585 +	ENDFUNC(GLOBAL(GCC_push_shmedia_regs_nofpu))
   586  #ifndef __SH4_NOFPU__
   587  	.global	GLOBAL(GCC_pop_shmedia_regs)
   588 +	FUNC(GLOBAL(GCC_pop_shmedia_regs))
   589  GLOBAL(GCC_pop_shmedia_regs):
   590  	pt	.L0, tr1
   591  	movi	41*8, r0
   592 @@ -2630,6 +2797,7 @@
   593  	blink	tr1, r63
   594  #endif
   595  	.global	GLOBAL(GCC_pop_shmedia_regs_nofpu)
   596 +	FUNC(GLOBAL(GCC_pop_shmedia_regs_nofpu))
   597  GLOBAL(GCC_pop_shmedia_regs_nofpu):
   598  	movi	27*8, r0
   599  .L0:
   600 @@ -2666,5 +2834,10 @@
   601  	ld.q	r15,  0*8, r28
   602  	add.l	r15, r0, r15
   603  	blink	tr0, r63
   604 +
   605 +#ifndef __SH4_NOFPU__
   606 +	ENDFUNC(GLOBAL(GCC_pop_shmedia_regs))
   607 +#endif
   608 +	ENDFUNC(GLOBAL(GCC_pop_shmedia_regs_nofpu))
   609  #endif /* __SH5__ == 32 */
   610  #endif /* L_push_pop_shmedia_regs */