]> git.pld-linux.org Git - packages/gcc2.git/blob - gcc2-builtin-apply.patch
- move compressed patch to distfiles
[packages/gcc2.git] / gcc2-builtin-apply.patch
1 # DP: On Sparc, message forwarding in the GNUstep framework
2 # DP: (gstep-base) relies on this patch. I didn't experience any side
3 # DP: effects of this "workaround" on a sparc Solaris platform. However
4 # DP: this workaround affects the all compilers of the egcs package.
5
6 From: Richard Henderson <rth@dot.cygnus.com>
7 To: Matthias.Klose@cs.tu-berlin.de, scottc@net-community.com
8 Subject: Re: patch for expand_builtin_apply for sparc architecture
9 Date: Mon, 16 Feb 1998 05:11:32 -0800
10
11 In article <199802160833.JAA11275.cygnus.egcs.bugs@gargleblaster.cs.tu-berlin.de>,
12 Matthias Klose <Matthias.Klose@cs.tu-berlin.de> wrote:
13 >The following patch fixes the generation of an 'unimp 4095'
14 >instruction for the expansion of __builtin_apply on the sparc
15 >architecture; fix by Scott Christley (<scottc@net-community.com>), but
16 >doesn't seem to be submitted to the the egcs list.
17
18 You'll have to submit a test case and an explanation of why you think
19 this is correct.  The Sparc32 ABI calls for an unimp instruction to
20 be emitted following calls to functions that return structures.  The
21 0-4095 immediate is commentary, but that's all the room in that field
22 so we cannot simply remove the mask.
23
24 My guess is that it is yet another example of why __builtin_apply
25 is inadequate for the needs of all but completely stack-based calling
26 conventions and should not be used.
27
28
29 r~
30
31 diff -c gcc/config/sparc/sparc.md~ gcc/config/sparc/sparc.md
32 *** gcc/config/sparc/sparc.md~  Mon Nov 16 12:31:32 1998
33 --- gcc/config/sparc/sparc.md   Mon Nov 16 12:35:56 1998
34 ***************
35 *** 7294,7299 ****
36 --- 7294,7300 ----
37          Why cannot we have delay slots filled if it were a CALL?  */
38   
39         if (! TARGET_ARCH64 && INTVAL (operands[3]) != 0)
40 + #if 0
41         emit_jump_insn
42           (gen_rtx_PARALLEL (VOIDmode,
43                     gen_rtvec (3,
44 ***************
45 *** 7302,7307 ****
46 --- 7303,7318 ----
47                                GEN_INT (INTVAL (operands[3]) & 0xfff),
48                                gen_rtx_CLOBBER (VOIDmode,
49                                         gen_rtx_REG (Pmode, 15)))));
50 + #else
51 +       emit_jump_insn
52 +         (gen_rtx_PARALLEL (VOIDmode,
53 +                   gen_rtvec (3,
54 +                              gen_rtx_SET (VOIDmode, pc_rtx,
55 +                                       XEXP (operands[0], 0)),
56 +                              operands[3],
57 +                              gen_rtx_CLOBBER (VOIDmode,
58 +                                       gen_rtx_REG (Pmode, 15)))));
59 + #endif
60         else
61         emit_jump_insn
62           (gen_rtx_PARALLEL (VOIDmode,
This page took 0.028216 seconds and 3 git commands to generate.