Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/gcc/4.7.2/gentoo: 90_all_gcc-4.7-x32.patch README.history
Date: Tue, 02 Oct 2012 04:53:45
Message-Id: 20121002045335.AA4EF21600@flycatcher.gentoo.org
1 vapier 12/10/02 04:53:35
2
3 Modified: 90_all_gcc-4.7-x32.patch README.history
4 Log:
5 update x32 patch to 4.7.2 with help from Alphat-PC #436756
6
7 Revision Changes Path
8 1.2 src/patchsets/gcc/4.7.2/gentoo/90_all_gcc-4.7-x32.patch
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.2/gentoo/90_all_gcc-4.7-x32.patch?rev=1.2&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.2/gentoo/90_all_gcc-4.7-x32.patch?rev=1.2&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.2/gentoo/90_all_gcc-4.7-x32.patch?r1=1.1&r2=1.2
13
14 Index: 90_all_gcc-4.7-x32.patch
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/src/patchsets/gcc/4.7.2/gentoo/90_all_gcc-4.7-x32.patch,v
17 retrieving revision 1.1
18 retrieving revision 1.2
19 diff -u -r1.1 -r1.2
20 --- 90_all_gcc-4.7-x32.patch 29 Sep 2012 05:01:09 -0000 1.1
21 +++ 90_all_gcc-4.7-x32.patch 2 Oct 2012 04:53:35 -0000 1.2
22 @@ -1,4 +1,7 @@
23 -git diff -p 475e5d65b13bfb798ff1f2c45ab46619ab050283^..remotes/origin/hjl/x32/gcc-4_7-branch
24 +git diff 6bd686c1cc586e318a520b1b3b09732bf7c915f0^...74e1f4df1f44b2249061b7770e4020b2abdb3877
25 + (remotes/origin/gcc-4_7-branch) (remotes/origin/hjl/x32/gcc-4_7-branch)
26 +
27 +then filtered out useless configure & ChangeLog files
28
29 --- a/boehm-gc/configure
30 +++ b/boehm-gc/configure
31 @@ -38,7 +41,7 @@
32 # endif
33 --- a/gcc/ada/gcc-interface/Makefile.in
34 +++ b/gcc/ada/gcc-interface/Makefile.in
35 -@@ -349,6 +349,10 @@ GNATMAKE_OBJS = a-except.o ali.o ali-util.o aspects.o s-casuti.o alloc.o \
36 +@@ -350,6 +350,10 @@ GNATMAKE_OBJS = a-except.o ali.o ali-util.o aspects.o s-casuti.o alloc.o \
37 ifeq ($(strip $(filter-out %x86_64, $(arch))),)
38 ifeq ($(strip $(MULTISUBDIR)),/32)
39 arch:=i686
40 @@ -49,7 +52,7 @@
41 endif
42 endif
43
44 -@@ -2131,6 +2135,43 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
45 +@@ -2132,6 +2136,43 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
46 LIBRARY_VERSION := $(LIB_VERSION)
47 endif
48
49 @@ -114,7 +117,7 @@
50 /* ??? The IA-64 unwinder doesn't compensate for signals. */
51 --- a/gcc/ada/link.c
52 +++ b/gcc/ada/link.c
53 -@@ -187,7 +187,11 @@ unsigned char __gnat_using_gnu_linker = 1;
54 +@@ -165,7 +165,11 @@ unsigned char __gnat_objlist_file_supported = 1;
55 const char *__gnat_object_library_extension = ".a";
56 unsigned char __gnat_separate_run_path_options = 0;
57 #if defined (__x86_64)
58 @@ -128,7 +131,7 @@
59 #endif
60 --- a/gcc/config.gcc
61 +++ b/gcc/config.gcc
62 -@@ -486,6 +486,10 @@ fi
63 +@@ -494,6 +494,10 @@ fi
64
65 case ${target} in
66 i[34567]86-*-*)
67 @@ -139,7 +142,7 @@
68 if test "x$enable_cld" = xyes; then
69 tm_defines="${tm_defines} USE_IX86_CLD=1"
70 fi
71 -@@ -495,7 +499,24 @@ i[34567]86-*-*)
72 +@@ -503,7 +507,24 @@ i[34567]86-*-*)
73 tm_file="vxworks-dummy.h ${tm_file}"
74 ;;
75 x86_64-*-*)
76 @@ -165,7 +168,23 @@
77 if test "x$enable_cld" = xyes; then
78 tm_defines="${tm_defines} USE_IX86_CLD=1"
79 fi
80 -@@ -3201,7 +3222,7 @@ case "${target}" in
81 +@@ -1318,7 +1339,14 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
82 + tmake_file="${tmake_file} i386/t-linux64"
83 + x86_multilibs="${with_multilib_list}"
84 + if test "$x86_multilibs" = "default"; then
85 +- x86_multilibs="m64,m32"
86 ++ case ${with_abi} in
87 ++ x32 | mx32)
88 ++ x86_multilibs="mx32"
89 ++ ;;
90 ++ *)
91 ++ x86_multilibs="m64,m32"
92 ++ ;;
93 ++ esac
94 + fi
95 + x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
96 + for x86_multilib in ${x86_multilibs}; do
97 +@@ -3227,7 +3255,7 @@ case "${target}" in
98 ;;
99
100 i[34567]86-*-* | x86_64-*-*)
101 @@ -258,10 +277,10 @@
102 ;;; Unused letters:
103 -;;; B H T W
104 +;;; B H T
105 - ;;; h k v
106 + ;;; h jk v
107
108 ;; Integer register constraints.
109 -@@ -193,6 +193,16 @@
110 +@@ -188,6 +188,16 @@
111 instructions)."
112 (match_operand 0 "x86_64_immediate_operand"))
113
114 @@ -306,6 +325,13 @@
115 #else
116 #define MULTILIB_DEFAULTS { "m32" }
117 #endif
118 +@@ -126,3 +135,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
119 + #define TARGET_THREAD_SPLIT_STACK_OFFSET \
120 + (TARGET_64BIT ? (TARGET_X32 ? 0x40 : 0x70) : 0x30)
121 + #endif
122 ++
123 ++#undef WCHAR_TYPE
124 ++#define WCHAR_TYPE (TARGET_LP64 ? "int" : "long int")
125 --- a/gcc/config/i386/i386-opts.h
126 +++ b/gcc/config/i386/i386-opts.h
127 @@ -71,6 +71,11 @@ enum cmodel {
128 @@ -322,7 +348,7 @@
129 ASM_INTEL
130 --- a/gcc/config/i386/i386.c
131 +++ b/gcc/config/i386/i386.c
132 -@@ -2445,6 +2445,8 @@ static rtx (*ix86_gen_andsp) (rtx, rtx, rtx);
133 +@@ -2448,6 +2448,8 @@ static rtx (*ix86_gen_andsp) (rtx, rtx, rtx);
134 static rtx (*ix86_gen_allocate_stack_worker) (rtx, rtx);
135 static rtx (*ix86_gen_adjust_stack_and_probe) (rtx, rtx, rtx);
136 static rtx (*ix86_gen_probe_stack_range) (rtx, rtx, rtx);
137 @@ -331,7 +357,7 @@
138
139 /* Preferred alignment for stack boundary in bits. */
140 unsigned int ix86_preferred_stack_boundary;
141 -@@ -2655,7 +2657,6 @@ ix86_target_string (HOST_WIDE_INT isa, int flags, const char *arch,
142 +@@ -2658,7 +2660,6 @@ ix86_target_string (HOST_WIDE_INT isa, int flags, const char *arch,
143 preceding options while match those first. */
144 static struct ix86_target_opts isa_opts[] =
145 {
146 @@ -339,7 +365,7 @@
147 { "-mfma4", OPTION_MASK_ISA_FMA4 },
148 { "-mfma", OPTION_MASK_ISA_FMA },
149 { "-mxop", OPTION_MASK_ISA_XOP },
150 -@@ -2727,6 +2728,7 @@ ix86_target_string (HOST_WIDE_INT isa, int flags, const char *arch,
151 +@@ -2730,6 +2731,7 @@ ix86_target_string (HOST_WIDE_INT isa, int flags, const char *arch,
152 size_t len;
153 size_t line_len;
154 size_t sep_len;
155 @@ -347,7 +373,7 @@
156
157 memset (opts, '\0', sizeof (opts));
158
159 -@@ -2744,6 +2746,21 @@ ix86_target_string (HOST_WIDE_INT isa, int flags, const char *arch,
160 +@@ -2747,6 +2749,21 @@ ix86_target_string (HOST_WIDE_INT isa, int flags, const char *arch,
161 opts[num++][1] = tune;
162 }
163
164 @@ -369,7 +395,7 @@
165 /* Pick out the options in isa options. */
166 for (i = 0; i < ARRAY_SIZE (isa_opts); i++)
167 {
168 -@@ -3090,6 +3107,46 @@ ix86_option_override_internal (bool main_args_p)
169 +@@ -3095,6 +3112,46 @@ ix86_option_override_internal (bool main_args_p)
170 sw = "attribute";
171 }
172
173 @@ -416,7 +442,7 @@
174 #ifdef SUBTARGET_OVERRIDE_OPTIONS
175 SUBTARGET_OVERRIDE_OPTIONS;
176 #endif
177 -@@ -3098,9 +3155,6 @@ ix86_option_override_internal (bool main_args_p)
178 +@@ -3103,9 +3160,6 @@ ix86_option_override_internal (bool main_args_p)
179 SUBSUBTARGET_OVERRIDE_OPTIONS;
180 #endif
181
182 @@ -426,7 +452,7 @@
183 /* -fPIC is the default for x86_64. */
184 if (TARGET_MACHO && TARGET_64BIT)
185 flag_pic = 2;
186 -@@ -3169,6 +3223,17 @@ ix86_option_override_internal (bool main_args_p)
187 +@@ -3174,6 +3228,17 @@ ix86_option_override_internal (bool main_args_p)
188 else
189 ix86_arch_specified = 1;
190
191 @@ -444,7 +470,16 @@
192 if (!global_options_set.x_ix86_abi)
193 ix86_abi = DEFAULT_ABI;
194
195 -@@ -3743,11 +3808,33 @@ ix86_option_override_internal (bool main_args_p)
196 +@@ -3587,7 +3652,7 @@ ix86_option_override_internal (bool main_args_p)
197 + ix86_preferred_stack_boundary = PREFERRED_STACK_BOUNDARY_DEFAULT;
198 + if (global_options_set.x_ix86_preferred_stack_boundary_arg)
199 + {
200 +- int min = (TARGET_64BIT ? 4 : 2);
201 ++ int min = (TARGET_64BIT ? (TARGET_SSE ? 4 : 3) : 2);
202 + int max = (TARGET_SEH ? 4 : 12);
203 +
204 + if (ix86_preferred_stack_boundary_arg < min
205 +@@ -3750,11 +3815,33 @@ ix86_option_override_internal (bool main_args_p)
206 if (TARGET_64BIT)
207 {
208 ix86_gen_leave = gen_leave_rex64;
209 @@ -479,7 +514,7 @@
210 ix86_gen_andsp = gen_anddi3;
211 ix86_gen_allocate_stack_worker = gen_allocate_stack_worker_probe_di;
212 ix86_gen_adjust_stack_and_probe = gen_adjust_stack_and_probedi;
213 -@@ -3755,12 +3842,10 @@ ix86_option_override_internal (bool main_args_p)
214 +@@ -3762,12 +3849,10 @@ ix86_option_override_internal (bool main_args_p)
215 }
216 else
217 {
218 @@ -492,7 +527,7 @@
219 ix86_gen_andsp = gen_andsi3;
220 ix86_gen_allocate_stack_worker = gen_allocate_stack_worker_probe_si;
221 ix86_gen_adjust_stack_and_probe = gen_adjust_stack_and_probesi;
222 -@@ -7220,8 +7305,8 @@ function_value_64 (enum machine_mode orig_mode, enum machine_mode mode,
223 +@@ -7227,8 +7312,8 @@ function_value_64 (enum machine_mode orig_mode, enum machine_mode mode,
224 }
225 else if (POINTER_TYPE_P (valtype))
226 {
227 @@ -503,7 +538,7 @@
228 }
229
230 ret = construct_container (mode, orig_mode, valtype, 1,
231 -@@ -7292,7 +7377,8 @@ ix86_function_value (const_tree valtype, const_tree fntype_or_decl,
232 +@@ -7299,7 +7384,8 @@ ix86_function_value (const_tree valtype, const_tree fntype_or_decl,
233 return ix86_function_value_1 (valtype, fntype_or_decl, orig_mode, mode);
234 }
235
236 @@ -513,7 +548,7 @@
237
238 static enum machine_mode
239 ix86_promote_function_mode (const_tree type, enum machine_mode mode,
240 -@@ -7302,7 +7388,7 @@ ix86_promote_function_mode (const_tree type, enum machine_mode mode,
241 +@@ -7309,7 +7395,7 @@ ix86_promote_function_mode (const_tree type, enum machine_mode mode,
242 if (type != NULL_TREE && POINTER_TYPE_P (type))
243 {
244 *punsignedp = POINTERS_EXTEND_UNSIGNED;
245 @@ -522,7 +557,7 @@
246 }
247 return default_promote_function_mode (type, mode, punsignedp, fntype,
248 for_return);
249 -@@ -7580,12 +7666,13 @@ setup_incoming_varargs_64 (CUMULATIVE_ARGS *cum)
250 +@@ -7587,12 +7673,13 @@ setup_incoming_varargs_64 (CUMULATIVE_ARGS *cum)
251
252 for (i = cum->regno; i < max; i++)
253 {
254 @@ -539,7 +574,7 @@
255 }
256
257 if (ix86_varargs_fpr_size)
258 -@@ -8640,8 +8727,11 @@ gen_push (rtx arg)
259 +@@ -8652,8 +8739,11 @@ gen_push (rtx arg)
260 m->fs.cfa_offset += UNITS_PER_WORD;
261 m->fs.sp_offset += UNITS_PER_WORD;
262
263 @@ -552,7 +587,7 @@
264 gen_rtx_PRE_DEC (Pmode,
265 stack_pointer_rtx)),
266 arg);
267 -@@ -8652,9 +8742,12 @@ gen_push (rtx arg)
268 +@@ -8664,9 +8754,12 @@ gen_push (rtx arg)
269 static rtx
270 gen_pop (rtx arg)
271 {
272 @@ -566,7 +601,7 @@
273 gen_rtx_POST_INC (Pmode,
274 stack_pointer_rtx)));
275 }
276 -@@ -9121,7 +9214,7 @@ ix86_emit_save_regs (void)
277 +@@ -9141,7 +9234,7 @@ ix86_emit_save_regs (void)
278 for (regno = FIRST_PSEUDO_REGISTER - 1; regno-- > 0; )
279 if (!SSE_REGNO_P (regno) && ix86_save_reg (regno, true))
280 {
281 @@ -575,7 +610,7 @@
282 RTX_FRAME_RELATED_P (insn) = 1;
283 }
284 }
285 -@@ -9201,7 +9294,7 @@ ix86_emit_save_regs_using_mov (HOST_WIDE_INT cfa_offset)
286 +@@ -9221,7 +9314,7 @@ ix86_emit_save_regs_using_mov (HOST_WIDE_INT cfa_offset)
287 for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
288 if (!SSE_REGNO_P (regno) && ix86_save_reg (regno, true))
289 {
290 @@ -584,7 +619,7 @@
291 cfa_offset -= UNITS_PER_WORD;
292 }
293 }
294 -@@ -9276,7 +9369,7 @@ pro_epilogue_adjust_stack (rtx dest, rtx src, rtx offset,
295 +@@ -9296,7 +9389,7 @@ pro_epilogue_adjust_stack (rtx dest, rtx src, rtx offset,
296 rtx insn;
297 bool add_frame_related_expr = false;
298
299 @@ -593,7 +628,7 @@
300 insn = gen_pro_epilogue_adjust_stack_si_add (dest, src, offset);
301 else if (x86_64_immediate_operand (offset, DImode))
302 insn = gen_pro_epilogue_adjust_stack_di_add (dest, src, offset);
303 -@@ -10138,7 +10231,7 @@ ix86_expand_prologue (void)
304 +@@ -10159,7 +10252,7 @@ ix86_expand_prologue (void)
305 to implement macro RETURN_ADDR_RTX and intrinsic function
306 expand_builtin_return_addr etc. */
307 t = plus_constant (crtl->drap_reg, -UNITS_PER_WORD);
308 @@ -602,7 +637,7 @@
309 insn = emit_insn (gen_push (t));
310 RTX_FRAME_RELATED_P (insn) = 1;
311
312 -@@ -10310,7 +10403,7 @@ ix86_expand_prologue (void)
313 +@@ -10364,7 +10457,7 @@ ix86_expand_prologue (void)
314 emit_insn (ix86_gen_allocate_stack_worker (eax, eax));
315
316 /* Use the fact that AX still contains ALLOCATE. */
317 @@ -611,7 +646,7 @@
318 ? gen_pro_epilogue_adjust_stack_di_sub
319 : gen_pro_epilogue_adjust_stack_si_sub);
320
321 -@@ -10335,14 +10428,18 @@ ix86_expand_prologue (void)
322 +@@ -10389,14 +10482,18 @@ ix86_expand_prologue (void)
323 if (r10_live && eax_live)
324 {
325 t = choose_baseaddr (m->fs.sp_offset - allocate);
326 @@ -633,7 +668,7 @@
327 }
328 }
329 gcc_assert (m->fs.sp_offset == frame.stack_pointer_offset);
330 -@@ -10512,7 +10609,7 @@ ix86_emit_restore_regs_using_pop (void)
331 +@@ -10566,7 +10663,7 @@ ix86_emit_restore_regs_using_pop (void)
332
333 for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
334 if (!SSE_REGNO_P (regno) && ix86_save_reg (regno, false))
335 @@ -642,7 +677,7 @@
336 }
337
338 /* Emit code and notes for the LEAVE instruction. */
339 -@@ -10555,11 +10652,11 @@ ix86_emit_restore_regs_using_mov (HOST_WIDE_INT cfa_offset,
340 +@@ -10609,11 +10706,11 @@ ix86_emit_restore_regs_using_mov (HOST_WIDE_INT cfa_offset,
341 for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
342 if (!SSE_REGNO_P (regno) && ix86_save_reg (regno, maybe_eh_return))
343 {
344 @@ -656,7 +691,7 @@
345 insn = emit_move_insn (reg, mem);
346
347 if (m->fs.cfa_reg == crtl->drap_reg && regno == REGNO (crtl->drap_reg))
348 -@@ -11164,8 +11261,8 @@ ix86_expand_split_stack_prologue (void)
349 +@@ -11223,8 +11320,8 @@ ix86_expand_split_stack_prologue (void)
350 {
351 rtx rax;
352
353 @@ -667,7 +702,7 @@
354 use_reg (&call_fusage, rax);
355 }
356
357 -@@ -11244,8 +11341,8 @@ ix86_expand_split_stack_prologue (void)
358 +@@ -11303,8 +11400,8 @@ ix86_expand_split_stack_prologue (void)
359 /* If we are in 64-bit mode and this function uses a static chain,
360 we saved %r10 in %rax before calling _morestack. */
361 if (TARGET_64BIT && DECL_STATIC_CHAIN (cfun->decl))
362 @@ -678,23 +713,7 @@
363
364 /* If this function calls va_start, we need to store a pointer to
365 the arguments on the old stack, because they may not have been
366 -@@ -11375,10 +11472,14 @@ ix86_decompose_address (rtx addr, struct ix86_address *out)
367 - {
368 - addr = XEXP (addr, 0);
369 -
370 -- /* Strip subreg. */
371 -+ /* Adjust SUBREGs. */
372 - if (GET_CODE (addr) == SUBREG
373 - && GET_MODE (SUBREG_REG (addr)) == SImode)
374 - addr = SUBREG_REG (addr);
375 -+ else if (GET_MODE (addr) == DImode)
376 -+ addr = gen_rtx_SUBREG (SImode, addr, 0);
377 -+ else if (GET_MODE (addr) != VOIDmode)
378 -+ return 0;
379 - }
380 - }
381 -
382 -@@ -11434,6 +11535,12 @@ ix86_decompose_address (rtx addr, struct ix86_address *out)
383 +@@ -11522,6 +11619,12 @@ ix86_decompose_address (rtx addr, struct ix86_address *out)
384 scale = 1 << scale;
385 break;
386
387 @@ -707,7 +726,7 @@
388 case UNSPEC:
389 if (XINT (op, 1) == UNSPEC_TP
390 && TARGET_TLS_DIRECT_SEG_REFS
391 -@@ -11503,6 +11610,12 @@ ix86_decompose_address (rtx addr, struct ix86_address *out)
392 +@@ -11604,6 +11707,12 @@ ix86_decompose_address (rtx addr, struct ix86_address *out)
393 return 0;
394 }
395
396 @@ -720,7 +739,7 @@
397 /* Extract the integral value of scale. */
398 if (scale_rtx)
399 {
400 -@@ -12455,15 +12568,20 @@ legitimize_pic_address (rtx orig, rtx reg)
401 +@@ -12549,15 +12658,20 @@ legitimize_pic_address (rtx orig, rtx reg)
402 /* Load the thread pointer. If TO_REG is true, force it into a register. */
403
404 static rtx
405 @@ -745,7 +764,7 @@
406
407 return tp;
408 }
409 -@@ -12515,6 +12633,7 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
410 +@@ -12609,6 +12723,7 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
411 {
412 rtx dest, base, off;
413 rtx pic = NULL_RTX, tp = NULL_RTX;
414 @@ -753,7 +772,7 @@
415 int type;
416
417 switch (model)
418 -@@ -12540,7 +12659,7 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
419 +@@ -12634,7 +12749,7 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
420 else
421 emit_insn (gen_tls_dynamic_gnu2_32 (dest, x, pic));
422
423 @@ -762,7 +781,7 @@
424 dest = force_reg (Pmode, gen_rtx_PLUS (Pmode, tp, dest));
425
426 set_unique_reg_note (get_last_insn (), REG_EQUAL, x);
427 -@@ -12554,7 +12673,8 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
428 +@@ -12648,7 +12763,8 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
429 rtx rax = gen_rtx_REG (Pmode, AX_REG), insns;
430
431 start_sequence ();
432 @@ -772,7 +791,7 @@
433 insns = get_insns ();
434 end_sequence ();
435
436 -@@ -12589,7 +12709,7 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
437 +@@ -12683,7 +12799,7 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
438 else
439 emit_insn (gen_tls_dynamic_gnu2_32 (base, tmp, pic));
440
441 @@ -781,7 +800,7 @@
442 set_unique_reg_note (get_last_insn (), REG_EQUAL,
443 gen_rtx_MINUS (Pmode, tmp, tp));
444 }
445 -@@ -12602,7 +12722,8 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
446 +@@ -12696,7 +12812,8 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
447 rtx rax = gen_rtx_REG (Pmode, AX_REG), insns, eqv;
448
449 start_sequence ();
450 @@ -791,7 +810,7 @@
451 insns = get_insns ();
452 end_sequence ();
453
454 -@@ -12645,6 +12766,9 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
455 +@@ -12739,6 +12856,9 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
456 return dest;
457 }
458
459 @@ -801,7 +820,7 @@
460 pic = NULL;
461 type = UNSPEC_GOTNTPOFF;
462 }
463 -@@ -12667,22 +12791,23 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
464 +@@ -12761,22 +12881,23 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
465 type = UNSPEC_INDNTPOFF;
466 }
467
468 @@ -833,7 +852,7 @@
469 dest = gen_reg_rtx (Pmode);
470 emit_insn (gen_subsi3 (dest, base, off));
471 }
472 -@@ -12696,12 +12821,13 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
473 +@@ -12790,12 +12911,13 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
474
475 if (TARGET_64BIT || TARGET_ANY_GNU_TLS)
476 {
477 @@ -849,15 +868,7 @@
478 dest = gen_reg_rtx (Pmode);
479 emit_insn (gen_subsi3 (dest, base, off));
480 }
481 -@@ -13756,6 +13882,7 @@ get_some_local_dynamic_name (void)
482 - Z -- likewise, with special suffixes for x87 instructions.
483 - * -- print a star (in certain assembler syntax)
484 - A -- print an absolute memory reference.
485 -+ E -- print address with DImode register names if TARGET_64BIT.
486 - w -- print the operand as if it's a "word" (HImode) even if it isn't.
487 - s -- print a shift double count, followed by the assemblers argument
488 - delimiter.
489 -@@ -13780,6 +13907,7 @@ get_some_local_dynamic_name (void)
490 +@@ -13875,6 +13997,7 @@ get_some_local_dynamic_name (void)
491 ; -- print a semicolon (after prefixes due to bug in older gas).
492 ~ -- print "i" if TARGET_AVX2, "f" otherwise.
493 @ -- print a segment register of thread base pointer load
494 @@ -865,22 +876,7 @@
495 */
496
497 void
498 -@@ -13831,7 +13959,14 @@ ix86_print_operand (FILE *file, rtx x, int code)
499 - ix86_print_operand (file, x, 0);
500 - return;
501 -
502 -+ case 'E':
503 -+ /* Wrap address in an UNSPEC to declare special handling. */
504 -+ if (TARGET_64BIT)
505 -+ x = gen_rtx_UNSPEC (DImode, gen_rtvec (1, x), UNSPEC_LEA_ADDR);
506 -
507 -+ output_address (x);
508 -+ return;
509 -+
510 - case 'L':
511 - if (ASSEMBLER_DIALECT == ASM_ATT)
512 - putc ('l', file);
513 -@@ -14283,6 +14418,11 @@ ix86_print_operand (FILE *file, rtx x, int code)
514 +@@ -14385,6 +14508,11 @@ ix86_print_operand (FILE *file, rtx x, int code)
515 putc (TARGET_AVX2 ? 'i' : 'f', file);
516 return;
517
518 @@ -892,7 +888,7 @@
519 default:
520 output_operand_lossage ("invalid operand code '%c'", code);
521 }
522 -@@ -14422,8 +14562,8 @@ ix86_print_operand (FILE *file, rtx x, int code)
523 +@@ -14524,8 +14652,8 @@ ix86_print_operand (FILE *file, rtx x, int code)
524 static bool
525 ix86_print_operand_punct_valid_p (unsigned char code)
526 {
527 @@ -903,53 +899,7 @@
528 }
529
530 /* Print a memory operand whose address is ADDR. */
531 -@@ -14436,6 +14576,7 @@ ix86_print_operand_address (FILE *file, rtx addr)
532 - int scale;
533 - int ok;
534 - bool vsib = false;
535 -+ int code = 0;
536 -
537 - if (GET_CODE (addr) == UNSPEC && XINT (addr, 1) == UNSPEC_VSIBADDR)
538 - {
539 -@@ -14446,6 +14587,12 @@ ix86_print_operand_address (FILE *file, rtx addr)
540 - addr = XVECEXP (addr, 0, 0);
541 - vsib = true;
542 - }
543 -+ else if (GET_CODE (addr) == UNSPEC && XINT (addr, 1) == UNSPEC_LEA_ADDR)
544 -+ {
545 -+ gcc_assert (TARGET_64BIT);
546 -+ ok = ix86_decompose_address (XVECEXP (addr, 0, 0), &parts);
547 -+ code = 'q';
548 -+ }
549 - else
550 - ok = ix86_decompose_address (addr, &parts);
551 -
552 -@@ -14516,15 +14663,15 @@ ix86_print_operand_address (FILE *file, rtx addr)
553 - }
554 - else
555 - {
556 -- int code = 0;
557 --
558 -- /* Print SImode registers for zero-extended addresses to force
559 -- addr32 prefix. Otherwise print DImode registers to avoid it. */
560 -- if (TARGET_64BIT)
561 -- code = ((GET_CODE (addr) == ZERO_EXTEND
562 -- || GET_CODE (addr) == AND)
563 -- ? 'l'
564 -- : 'q');
565 -+ /* Print SImode register names for zero-extended
566 -+ addresses to force addr32 prefix. */
567 -+ if (TARGET_64BIT
568 -+ && (GET_CODE (addr) == ZERO_EXTEND
569 -+ || GET_CODE (addr) == AND))
570 -+ {
571 -+ gcc_assert (!code);
572 -+ code = 'l';
573 -+ }
574 -
575 - if (ASSEMBLER_DIALECT == ASM_ATT)
576 - {
577 -@@ -20299,7 +20446,7 @@ ix86_split_to_parts (rtx operand, rtx *parts, enum machine_mode mode)
578 +@@ -20428,7 +20556,7 @@ ix86_split_to_parts (rtx operand, rtx *parts, enum machine_mode mode)
579 gcc_assert (ok);
580
581 operand = copy_rtx (operand);
582 @@ -958,7 +908,7 @@
583 parts[0] = parts[1] = parts[2] = parts[3] = operand;
584 return size;
585 }
586 -@@ -20452,7 +20599,7 @@ ix86_split_long_move (rtx operands[])
587 +@@ -20581,7 +20709,7 @@ ix86_split_long_move (rtx operands[])
588 if (push_operand (operands[0], VOIDmode))
589 {
590 operands[0] = copy_rtx (operands[0]);
591 @@ -967,7 +917,7 @@
592 }
593 else
594 operands[0] = gen_lowpart (DImode, operands[0]);
595 -@@ -21007,14 +21154,9 @@ ix86_adjust_counter (rtx countreg, HOST_WIDE_INT value)
596 +@@ -21136,14 +21264,9 @@ ix86_adjust_counter (rtx countreg, HOST_WIDE_INT value)
597 rtx
598 ix86_zero_extend_to_Pmode (rtx exp)
599 {
600 @@ -985,7 +935,7 @@
601 }
602
603 /* Divide COUNTREG by SCALE. */
604 -@@ -22042,11 +22184,11 @@ ix86_expand_movmem (rtx dst, rtx src, rtx count_exp, rtx align_exp,
605 +@@ -22171,11 +22294,11 @@ ix86_expand_movmem (rtx dst, rtx src, rtx count_exp, rtx align_exp,
606 gcc_unreachable ();
607 case loop:
608 need_zero_guard = true;
609 @@ -999,7 +949,7 @@
610 break;
611 case rep_prefix_8_byte:
612 size_needed = 8;
613 -@@ -22212,13 +22354,13 @@ ix86_expand_movmem (rtx dst, rtx src, rtx count_exp, rtx align_exp,
614 +@@ -22341,13 +22464,13 @@ ix86_expand_movmem (rtx dst, rtx src, rtx count_exp, rtx align_exp,
615 break;
616 case loop:
617 expand_set_or_movmem_via_loop (dst, src, destreg, srcreg, NULL,
618 @@ -1015,7 +965,7 @@
619 expected_size);
620 break;
621 case rep_prefix_8_byte:
622 -@@ -22430,11 +22572,11 @@ ix86_expand_setmem (rtx dst, rtx count_exp, rtx val_exp, rtx align_exp,
623 +@@ -22559,11 +22682,11 @@ ix86_expand_setmem (rtx dst, rtx count_exp, rtx val_exp, rtx align_exp,
624 gcc_unreachable ();
625 case loop:
626 need_zero_guard = true;
627 @@ -1029,7 +979,7 @@
628 break;
629 case rep_prefix_8_byte:
630 size_needed = 8;
631 -@@ -22605,11 +22747,11 @@ ix86_expand_setmem (rtx dst, rtx count_exp, rtx val_exp, rtx align_exp,
632 +@@ -22734,11 +22857,11 @@ ix86_expand_setmem (rtx dst, rtx count_exp, rtx val_exp, rtx align_exp,
633 break;
634 case loop:
635 expand_set_or_movmem_via_loop (dst, NULL, destreg, NULL, promoted_val,
636 @@ -1043,7 +993,7 @@
637 break;
638 case rep_prefix_8_byte:
639 expand_setmem_via_rep_stos (dst, destreg, promoted_val, count_exp,
640 -@@ -22972,13 +23114,13 @@ ix86_expand_call (rtx retval, rtx fnaddr, rtx callarg1,
641 +@@ -23101,13 +23224,13 @@ ix86_expand_call (rtx retval, rtx fnaddr, rtx callarg1,
642 && !local_symbolic_operand (XEXP (fnaddr, 0), VOIDmode))
643 fnaddr = gen_rtx_MEM (QImode, construct_plt_address (XEXP (fnaddr, 0)));
644 else if (sibcall
645 @@ -1062,7 +1012,7 @@
646 }
647
648 vec_len = 0;
649 -@@ -24291,10 +24433,13 @@ ix86_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
650 +@@ -24421,10 +24544,13 @@ ix86_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
651 /* Load the function address to r11. Try to load address using
652 the shorter movl instead of movabs. We may want to support
653 movq for kernel mode, but kernel does not use trampolines at
654 @@ -1079,7 +1029,7 @@
655
656 mem = adjust_address (m_tramp, HImode, offset);
657 emit_move_insn (mem, gen_int_mode (0xbb41, HImode));
658 -@@ -24313,9 +24458,9 @@ ix86_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
659 +@@ -24443,9 +24569,9 @@ ix86_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
660 offset += 10;
661 }
662
663 @@ -1092,7 +1042,7 @@
664 {
665 opcode = 0xba41;
666 size = 6;
667 -@@ -31952,7 +32097,7 @@ x86_this_parameter (tree function)
668 +@@ -32082,7 +32208,7 @@ x86_this_parameter (tree function)
669 parm_regs = x86_64_ms_abi_int_parameter_registers;
670 else
671 parm_regs = x86_64_int_parameter_registers;
672 @@ -1121,7 +1071,16 @@
673
674 /* SSE4.1 defines round instructions */
675 #define OPTION_MASK_ISA_ROUND OPTION_MASK_ISA_SSE4_1
676 -@@ -1760,7 +1760,7 @@ do { \
677 +@@ -705,7 +705,7 @@ enum target_cpu_default
678 + #define MAIN_STACK_BOUNDARY (TARGET_64BIT ? 128 : 32)
679 +
680 + /* Minimum stack boundary. */
681 +-#define MIN_STACK_BOUNDARY (TARGET_64BIT ? 128 : 32)
682 ++#define MIN_STACK_BOUNDARY (TARGET_64BIT ? (TARGET_SSE ? 128 : 64) : 32)
683 +
684 + /* Boundary (in *bits*) on which the stack pointer prefers to be
685 + aligned; the compiler cannot rely on having this alignment. */
686 +@@ -1774,7 +1774,7 @@ do { \
687 /* Specify the machine mode that pointers have.
688 After generation of rtl, the compiler makes no further distinction
689 between pointers and any other objects of this machine mode. */
690 @@ -1132,15 +1091,7 @@
691 from being `POINTER_SIZE' bits wide to `Pmode' are sign-extended and
692 --- a/gcc/config/i386/i386.md
693 +++ b/gcc/config/i386/i386.md
694 -@@ -38,6 +38,7 @@
695 - ;; Z -- likewise, with special suffixes for x87 instructions.
696 - ;; * -- print a star (in certain assembler syntax)
697 - ;; A -- print an absolute memory reference.
698 -+;; E -- print address with DImode register names if TARGET_64BIT.
699 - ;; w -- print the operand as if it's a "word" (HImode) even if it isn't.
700 - ;; s -- print a shift double count, followed by the assemblers argument
701 - ;; delimiter.
702 -@@ -60,7 +61,9 @@
703 +@@ -61,7 +61,9 @@
704 ;; Y -- print condition for XOP pcom* instruction.
705 ;; + -- print a branch hint as 'cs' or 'ds' prefix
706 ;; ; -- print a semicolon (after prefixes due to bug in older gas).
707 @@ -1150,15 +1101,7 @@
708
709 (define_c_enum "unspec" [
710 ;; Relocation specifiers
711 -@@ -109,6 +112,7 @@
712 - UNSPEC_MS_TO_SYSV_CALL
713 - UNSPEC_CALL_NEEDS_VZEROUPPER
714 - UNSPEC_PAUSE
715 -+ UNSPEC_LEA_ADDR
716 -
717 - ;; For SSE/MMX support:
718 - UNSPEC_FIX_NOTRUNC
719 -@@ -892,6 +896,11 @@
720 +@@ -901,6 +903,11 @@
721 ;; pointer-sized quantities. Exactly one of the two alternatives will match.
722 (define_mode_iterator P [(SI "Pmode == SImode") (DI "Pmode == DImode")])
723
724 @@ -1170,7 +1113,7 @@
725 ;; This mode iterator allows :PTR to be used for patterns that operate on
726 ;; ptr_mode sized quantities.
727 (define_mode_iterator PTR
728 -@@ -1700,8 +1709,8 @@
729 +@@ -1709,8 +1716,8 @@
730 (set_attr "mode" "SI")])
731
732 (define_insn "*push<mode>2_prologue"
733 @@ -1181,7 +1124,7 @@
734 (clobber (mem:BLK (scratch)))]
735 ""
736 "push{<imodesuffix>}\t%1"
737 -@@ -1709,16 +1718,16 @@
738 +@@ -1718,16 +1725,16 @@
739 (set_attr "mode" "<MODE>")])
740
741 (define_insn "*pop<mode>1"
742 @@ -1202,40 +1145,7 @@
743 (clobber (mem:BLK (scratch)))]
744 ""
745 "pop{<imodesuffix>}\t%0"
746 -@@ -1958,7 +1967,7 @@
747 - return "#";
748 -
749 - case TYPE_LEA:
750 -- return "lea{q}\t{%a1, %0|%0, %a1}";
751 -+ return "lea{q}\t{%E1, %0|%0, %E1}";
752 -
753 - default:
754 - gcc_assert (!flag_pic || LEGITIMATE_PIC_OPERAND_P (operands[1]));
755 -@@ -1967,7 +1976,7 @@
756 - else if (which_alternative == 2)
757 - return "movabs{q}\t{%1, %0|%0, %1}";
758 - else if (ix86_use_lea_for_mov (insn, operands))
759 -- return "lea{q}\t{%a1, %0|%0, %a1}";
760 -+ return "lea{q}\t{%E1, %0|%0, %E1}";
761 - else
762 - return "mov{q}\t{%1, %0|%0, %1}";
763 - }
764 -@@ -2199,12 +2208,12 @@
765 - return "movd\t{%1, %0|%0, %1}";
766 -
767 - case TYPE_LEA:
768 -- return "lea{l}\t{%a1, %0|%0, %a1}";
769 -+ return "lea{l}\t{%E1, %0|%0, %E1}";
770 -
771 - default:
772 - gcc_assert (!flag_pic || LEGITIMATE_PIC_OPERAND_P (operands[1]));
773 - if (ix86_use_lea_for_mov (insn, operands))
774 -- return "lea{l}\t{%a1, %0|%0, %a1}";
775 -+ return "lea{l}\t{%E1, %0|%0, %E1}";
776 - else
777 - return "mov{l}\t{%1, %0|%0, %1}";
778 - }
779 -@@ -3382,9 +3391,9 @@
780 +@@ -3399,9 +3406,9 @@
781 })
782
783 (define_insn "*zero_extendsidi2_rex64"
784 @@ -1247,61 +1157,7 @@
785 "TARGET_64BIT"
786 "@
787 mov{l}\t{%1, %k0|%k0, %1}
788 -@@ -5437,7 +5446,7 @@
789 - [(set (match_operand:SI 0 "register_operand" "=r")
790 - (subreg:SI (match_operand:DI 1 "lea_address_operand" "p") 0))]
791 - "TARGET_64BIT"
792 -- "lea{l}\t{%a1, %0|%0, %a1}"
793 -+ "lea{l}\t{%E1, %0|%0, %E1}"
794 - "&& reload_completed && ix86_avoid_lea_for_addr (insn, operands)"
795 - [(const_int 0)]
796 - {
797 -@@ -5451,7 +5460,7 @@
798 - [(set (match_operand:SWI48 0 "register_operand" "=r")
799 - (match_operand:SWI48 1 "lea_address_operand" "p"))]
800 - ""
801 -- "lea{<imodesuffix>}\t{%a1, %0|%0, %a1}"
802 -+ "lea{<imodesuffix>}\t{%E1, %0|%0, %E1}"
803 - "reload_completed && ix86_avoid_lea_for_addr (insn, operands)"
804 - [(const_int 0)]
805 - {
806 -@@ -5466,7 +5475,7 @@
807 - (zero_extend:DI
808 - (subreg:SI (match_operand:DI 1 "lea_address_operand" "j") 0)))]
809 - "TARGET_64BIT"
810 -- "lea{l}\t{%a1, %k0|%k0, %a1}"
811 -+ "lea{l}\t{%E1, %k0|%k0, %E1}"
812 - [(set_attr "type" "lea")
813 - (set_attr "mode" "SI")])
814 -
815 -@@ -5475,7 +5484,7 @@
816 - (zero_extend:DI
817 - (match_operand:SI 1 "lea_address_operand" "j")))]
818 - "TARGET_64BIT"
819 -- "lea{l}\t{%a1, %k0|%k0, %a1}"
820 -+ "lea{l}\t{%E1, %k0|%k0, %E1}"
821 - [(set_attr "type" "lea")
822 - (set_attr "mode" "SI")])
823 -
824 -@@ -5485,7 +5494,7 @@
825 - (subreg:DI (match_operand:SI 1 "lea_address_operand" "p") 0)
826 - (match_operand:DI 2 "const_32bit_mask" "n")))]
827 - "TARGET_64BIT"
828 -- "lea{l}\t{%a1, %k0|%k0, %a1}"
829 -+ "lea{l}\t{%E1, %k0|%k0, %E1}"
830 - [(set_attr "type" "lea")
831 - (set_attr "mode" "SI")])
832 -
833 -@@ -5495,7 +5504,7 @@
834 - (match_operand:DI 1 "lea_address_operand" "p")
835 - (match_operand:DI 2 "const_32bit_mask" "n")))]
836 - "TARGET_64BIT"
837 -- "lea{l}\t{%a1, %k0|%k0, %a1}"
838 -+ "lea{l}\t{%E1, %k0|%k0, %E1}"
839 - [(set_attr "type" "lea")
840 - (set_attr "mode" "SI")])
841 -
842 -@@ -11130,10 +11139,15 @@
843 +@@ -11126,10 +11133,15 @@
844 (set_attr "modrm" "0")])
845
846 (define_expand "indirect_jump"
847 @@ -1319,7 +1175,7 @@
848 ""
849 "jmp\t%A0"
850 [(set_attr "type" "ibr")
851 -@@ -11175,12 +11189,13 @@
852 +@@ -11171,12 +11183,13 @@
853 operands[0] = expand_simple_binop (Pmode, code, op0, op1, NULL_RTX, 0,
854 OPTAB_DIRECT);
855 }
856 @@ -1336,7 +1192,7 @@
857 (use (label_ref (match_operand 1 "" "")))]
858 ""
859 "jmp\t%A0"
860 -@@ -11268,7 +11283,7 @@
861 +@@ -11264,7 +11277,7 @@
862 })
863
864 (define_insn_and_split "*call_vzeroupper"
865 @@ -1345,7 +1201,7 @@
866 (match_operand 1 "" ""))
867 (unspec [(match_operand 2 "const_int_operand" "")]
868 UNSPEC_CALL_NEEDS_VZEROUPPER)]
869 -@@ -11280,7 +11295,7 @@
870 +@@ -11276,7 +11289,7 @@
871 [(set_attr "type" "call")])
872
873 (define_insn "*call"
874 @@ -1354,7 +1210,7 @@
875 (match_operand 1 "" ""))]
876 "!SIBLING_CALL_P (insn)"
877 "* return ix86_output_call_insn (insn, operands[0]);"
878 -@@ -11332,7 +11347,7 @@
879 +@@ -11328,7 +11341,7 @@
880 [(set_attr "type" "call")])
881
882 (define_insn_and_split "*sibcall_vzeroupper"
883 @@ -1363,7 +1219,7 @@
884 (match_operand 1 "" ""))
885 (unspec [(match_operand 2 "const_int_operand" "")]
886 UNSPEC_CALL_NEEDS_VZEROUPPER)]
887 -@@ -11344,7 +11359,7 @@
888 +@@ -11340,7 +11353,7 @@
889 [(set_attr "type" "call")])
890
891 (define_insn "*sibcall"
892 @@ -1372,7 +1228,7 @@
893 (match_operand 1 "" ""))]
894 "SIBLING_CALL_P (insn)"
895 "* return ix86_output_call_insn (insn, operands[0]);"
896 -@@ -11441,7 +11456,7 @@
897 +@@ -11437,7 +11450,7 @@
898
899 (define_insn_and_split "*call_value_vzeroupper"
900 [(set (match_operand 0 "" "")
901 @@ -1381,7 +1237,7 @@
902 (match_operand 2 "" "")))
903 (unspec [(match_operand 3 "const_int_operand" "")]
904 UNSPEC_CALL_NEEDS_VZEROUPPER)]
905 -@@ -11454,7 +11469,7 @@
906 +@@ -11450,7 +11463,7 @@
907
908 (define_insn "*call_value"
909 [(set (match_operand 0 "" "")
910 @@ -1390,7 +1246,7 @@
911 (match_operand 2 "" "")))]
912 "!SIBLING_CALL_P (insn)"
913 "* return ix86_output_call_insn (insn, operands[1]);"
914 -@@ -11462,7 +11477,7 @@
915 +@@ -11458,7 +11471,7 @@
916
917 (define_insn_and_split "*sibcall_value_vzeroupper"
918 [(set (match_operand 0 "" "")
919 @@ -1399,7 +1255,7 @@
920 (match_operand 2 "" "")))
921 (unspec [(match_operand 3 "const_int_operand" "")]
922 UNSPEC_CALL_NEEDS_VZEROUPPER)]
923 -@@ -11475,7 +11490,7 @@
924 +@@ -11471,7 +11484,7 @@
925
926 (define_insn "*sibcall_value"
927 [(set (match_operand 0 "" "")
928 @@ -1408,7 +1264,7 @@
929 (match_operand 2 "" "")))]
930 "SIBLING_CALL_P (insn)"
931 "* return ix86_output_call_insn (insn, operands[1]);"
932 -@@ -12580,7 +12595,7 @@
933 +@@ -12576,7 +12589,7 @@
934 [(set (match_operand:SI 0 "register_operand" "=a")
935 (unspec:SI
936 [(match_operand:SI 1 "register_operand" "b")
937 @@ -1417,16 +1273,7 @@
938 (match_operand:SI 3 "constant_call_address_operand" "z")]
939 UNSPEC_TLS_GD))
940 (clobber (match_scratch:SI 4 "=d"))
941 -@@ -12589,7 +12604,7 @@
942 - "!TARGET_64BIT && TARGET_GNU_TLS"
943 - {
944 - output_asm_insn
945 -- ("lea{l}\t{%a2@tlsgd(,%1,1), %0|%0, %a2@tlsgd[%1*1]}", operands);
946 -+ ("lea{l}\t{%E2@tlsgd(,%1,1), %0|%0, %E2@tlsgd[%1*1]}", operands);
947 - if (TARGET_SUN_TLS)
948 - #ifdef HAVE_AS_IX86_TLSGDPLT
949 - return "call\t%a2@tlsgdplt";
950 -@@ -12605,26 +12620,26 @@
951 +@@ -12601,20 +12614,20 @@
952 [(parallel
953 [(set (match_operand:SI 0 "register_operand" "")
954 (unspec:SI [(match_operand:SI 2 "register_operand" "")
955 @@ -1455,14 +1302,7 @@
956 "TARGET_64BIT"
957 {
958 if (!TARGET_X32)
959 - fputs (ASM_BYTE "0x66\n", asm_out_file);
960 - output_asm_insn
961 -- ("lea{q}\t{%a1@tlsgd(%%rip), %%rdi|rdi, %a1@tlsgd[rip]}", operands);
962 -+ ("lea{q}\t{%E1@tlsgd(%%rip), %%rdi|rdi, %E1@tlsgd[rip]}", operands);
963 - fputs (ASM_SHORT "0x6666\n", asm_out_file);
964 - fputs ("\trex64\n", asm_out_file);
965 - if (TARGET_SUN_TLS)
966 -@@ -12635,14 +12650,15 @@
967 +@@ -12631,14 +12644,15 @@
968 (set (attr "length")
969 (symbol_ref "TARGET_X32 ? 15 : 16"))])
970
971 @@ -1484,7 +1324,7 @@
972
973 (define_insn "*tls_local_dynamic_base_32_gnu"
974 [(set (match_operand:SI 0 "register_operand" "=a")
975 -@@ -12679,12 +12695,12 @@
976 +@@ -12675,12 +12689,12 @@
977 (clobber (match_scratch:SI 4 ""))
978 (clobber (reg:CC FLAGS_REG))])])
979
980 @@ -1503,7 +1343,7 @@
981 "TARGET_64BIT"
982 {
983 output_asm_insn
984 -@@ -12696,13 +12712,14 @@
985 +@@ -12692,13 +12706,14 @@
986 [(set_attr "type" "multi")
987 (set_attr "length" "12")])
988
989 @@ -1523,7 +1363,7 @@
990
991 ;; Local dynamic of a single variable is a lose. Show combine how
992 ;; to convert that back to global dynamic.
993 -@@ -12714,7 +12731,7 @@
994 +@@ -12710,7 +12725,7 @@
995 (match_operand:SI 2 "constant_call_address_operand" "z")]
996 UNSPEC_TLS_LD_BASE)
997 (const:SI (unspec:SI
998 @@ -1532,7 +1372,7 @@
999 UNSPEC_DTPOFF))))
1000 (clobber (match_scratch:SI 4 "=d"))
1001 (clobber (match_scratch:SI 5 "=c"))
1002 -@@ -12812,7 +12829,7 @@
1003 +@@ -12808,7 +12823,7 @@
1004 (define_insn "tls_initial_exec_64_sun"
1005 [(set (match_operand:DI 0 "register_operand" "=a")
1006 (unspec:DI
1007 @@ -1541,7 +1381,7 @@
1008 UNSPEC_TLS_IE_SUN))
1009 (clobber (reg:CC FLAGS_REG))]
1010 "TARGET_64BIT && TARGET_SUN_TLS"
1011 -@@ -12829,7 +12846,7 @@
1012 +@@ -12825,7 +12840,7 @@
1013 [(set (match_dup 3)
1014 (plus:SI (match_operand:SI 2 "register_operand" "")
1015 (const:SI
1016 @@ -1550,7 +1390,7 @@
1017 UNSPEC_TLSDESC))))
1018 (parallel
1019 [(set (match_operand:SI 0 "register_operand" "")
1020 -@@ -12847,10 +12864,10 @@
1021 +@@ -12843,7 +12858,7 @@
1022 [(set (match_operand:SI 0 "register_operand" "=r")
1023 (plus:SI (match_operand:SI 1 "register_operand" "b")
1024 (const:SI
1025 @@ -1558,12 +1398,8 @@
1026 + (unspec:SI [(match_operand 2 "tls_symbolic_operand" "")]
1027 UNSPEC_TLSDESC))))]
1028 "!TARGET_64BIT && TARGET_GNU2_TLS"
1029 -- "lea{l}\t{%a2@TLSDESC(%1), %0|%0, %a2@TLSDESC[%1]}"
1030 -+ "lea{l}\t{%E2@TLSDESC(%1), %0|%0, %E2@TLSDESC[%1]}"
1031 - [(set_attr "type" "lea")
1032 - (set_attr "mode" "SI")
1033 - (set_attr "length" "6")
1034 -@@ -12858,7 +12875,7 @@
1035 + "lea{l}\t{%E2@TLSDESC(%1), %0|%0, %E2@TLSDESC[%1]}"
1036 +@@ -12854,7 +12869,7 @@
1037
1038 (define_insn "*tls_dynamic_gnu2_call_32"
1039 [(set (match_operand:SI 0 "register_operand" "=a")
1040 @@ -1572,7 +1408,7 @@
1041 (match_operand:SI 2 "register_operand" "0")
1042 ;; we have to make sure %ebx still points to the GOT
1043 (match_operand:SI 3 "register_operand" "b")
1044 -@@ -12874,13 +12891,13 @@
1045 +@@ -12870,13 +12885,13 @@
1046 (define_insn_and_split "*tls_dynamic_gnu2_combine_32"
1047 [(set (match_operand:SI 0 "register_operand" "=&a")
1048 (plus:SI
1049 @@ -1588,16 +1424,7 @@
1050 UNSPEC_DTPOFF))))
1051 (clobber (reg:CC FLAGS_REG))]
1052 "!TARGET_64BIT && TARGET_GNU2_TLS"
1053 -@@ -12912,7 +12929,7 @@
1054 - (unspec:DI [(match_operand 1 "tls_symbolic_operand" "")]
1055 - UNSPEC_TLSDESC))]
1056 - "TARGET_64BIT && TARGET_GNU2_TLS"
1057 -- "lea{q}\t{%a1@TLSDESC(%%rip), %0|%0, %a1@TLSDESC[rip]}"
1058 -+ "lea{q}\t{%E1@TLSDESC(%%rip), %0|%0, %E1@TLSDESC[rip]}"
1059 - [(set_attr "type" "lea")
1060 - (set_attr "mode" "DI")
1061 - (set_attr "length" "7")
1062 -@@ -12934,7 +12951,7 @@
1063 +@@ -12930,7 +12945,7 @@
1064 (define_insn_and_split "*tls_dynamic_gnu2_combine_64"
1065 [(set (match_operand:DI 0 "register_operand" "=&a")
1066 (plus:DI
1067 @@ -1606,7 +1433,7 @@
1068 (match_operand:DI 3 "" "")
1069 (reg:DI SP_REG)]
1070 UNSPEC_TLSDESC)
1071 -@@ -15733,17 +15750,17 @@
1072 +@@ -15729,17 +15744,17 @@
1073 "ix86_current_function_needs_cld = 1;")
1074
1075 (define_insn "*strmovdi_rex_1"
1076 @@ -1633,7 +1460,7 @@
1077 [(set_attr "type" "str")
1078 (set_attr "memory" "both")
1079 (set_attr "mode" "DI")])
1080 -@@ -15758,7 +15775,7 @@
1081 +@@ -15754,7 +15769,7 @@
1082 (plus:P (match_dup 3)
1083 (const_int 4)))]
1084 "!(fixed_regs[SI_REG] || fixed_regs[DI_REG])"
1085 @@ -1642,7 +1469,7 @@
1086 [(set_attr "type" "str")
1087 (set_attr "memory" "both")
1088 (set_attr "mode" "SI")])
1089 -@@ -15773,7 +15790,7 @@
1090 +@@ -15769,7 +15784,7 @@
1091 (plus:P (match_dup 3)
1092 (const_int 2)))]
1093 "!(fixed_regs[SI_REG] || fixed_regs[DI_REG])"
1094 @@ -1651,7 +1478,7 @@
1095 [(set_attr "type" "str")
1096 (set_attr "memory" "both")
1097 (set_attr "mode" "HI")])
1098 -@@ -15788,7 +15805,7 @@
1099 +@@ -15784,7 +15799,7 @@
1100 (plus:P (match_dup 3)
1101 (const_int 1)))]
1102 "!(fixed_regs[SI_REG] || fixed_regs[DI_REG])"
1103 @@ -1660,7 +1487,7 @@
1104 [(set_attr "type" "str")
1105 (set_attr "memory" "both")
1106 (set (attr "prefix_rex")
1107 -@@ -15811,20 +15828,20 @@
1108 +@@ -15807,20 +15822,20 @@
1109 "ix86_current_function_needs_cld = 1;")
1110
1111 (define_insn "*rep_movdi_rex64"
1112 @@ -1690,7 +1517,7 @@
1113 [(set_attr "type" "str")
1114 (set_attr "prefix_rep" "1")
1115 (set_attr "memory" "both")
1116 -@@ -15843,7 +15860,7 @@
1117 +@@ -15839,7 +15854,7 @@
1118 (mem:BLK (match_dup 4)))
1119 (use (match_dup 5))]
1120 "!(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
1121 @@ -1699,7 +1526,7 @@
1122 [(set_attr "type" "str")
1123 (set_attr "prefix_rep" "1")
1124 (set_attr "memory" "both")
1125 -@@ -15860,7 +15877,7 @@
1126 +@@ -15856,7 +15871,7 @@
1127 (mem:BLK (match_dup 4)))
1128 (use (match_dup 5))]
1129 "!(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
1130 @@ -1708,7 +1535,7 @@
1131 [(set_attr "type" "str")
1132 (set_attr "prefix_rep" "1")
1133 (set_attr "memory" "both")
1134 -@@ -15921,14 +15938,14 @@
1135 +@@ -15917,14 +15932,14 @@
1136 "ix86_current_function_needs_cld = 1;")
1137
1138 (define_insn "*strsetdi_rex_1"
1139 @@ -1728,7 +1555,7 @@
1140 [(set_attr "type" "str")
1141 (set_attr "memory" "store")
1142 (set_attr "mode" "DI")])
1143 -@@ -15940,7 +15957,7 @@
1144 +@@ -15936,7 +15951,7 @@
1145 (plus:P (match_dup 1)
1146 (const_int 4)))]
1147 "!(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
1148 @@ -1737,7 +1564,7 @@
1149 [(set_attr "type" "str")
1150 (set_attr "memory" "store")
1151 (set_attr "mode" "SI")])
1152 -@@ -15952,7 +15969,7 @@
1153 +@@ -15948,7 +15963,7 @@
1154 (plus:P (match_dup 1)
1155 (const_int 2)))]
1156 "!(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
1157 @@ -1746,7 +1573,7 @@
1158 [(set_attr "type" "str")
1159 (set_attr "memory" "store")
1160 (set_attr "mode" "HI")])
1161 -@@ -15964,7 +15981,7 @@
1162 +@@ -15960,7 +15975,7 @@
1163 (plus:P (match_dup 1)
1164 (const_int 1)))]
1165 "!(fixed_regs[AX_REG] || fixed_regs[DI_REG])"
1166 @@ -1755,7 +1582,7 @@
1167 [(set_attr "type" "str")
1168 (set_attr "memory" "store")
1169 (set (attr "prefix_rex")
1170 -@@ -15985,18 +16002,18 @@
1171 +@@ -15981,18 +15996,18 @@
1172 "ix86_current_function_needs_cld = 1;")
1173
1174 (define_insn "*rep_stosdi_rex64"
1175 @@ -1780,7 +1607,7 @@
1176 [(set_attr "type" "str")
1177 (set_attr "prefix_rep" "1")
1178 (set_attr "memory" "store")
1179 -@@ -16013,7 +16030,7 @@
1180 +@@ -16009,7 +16024,7 @@
1181 (use (match_operand:SI 2 "register_operand" "a"))
1182 (use (match_dup 4))]
1183 "!(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])"
1184 @@ -1789,7 +1616,7 @@
1185 [(set_attr "type" "str")
1186 (set_attr "prefix_rep" "1")
1187 (set_attr "memory" "store")
1188 -@@ -16029,7 +16046,7 @@
1189 +@@ -16025,7 +16040,7 @@
1190 (use (match_operand:QI 2 "register_operand" "a"))
1191 (use (match_dup 4))]
1192 "!(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])"
1193 @@ -1798,7 +1625,7 @@
1194 [(set_attr "type" "str")
1195 (set_attr "prefix_rep" "1")
1196 (set_attr "memory" "store")
1197 -@@ -16150,7 +16167,7 @@
1198 +@@ -16146,7 +16161,7 @@
1199 (clobber (match_operand:P 1 "register_operand" "=D"))
1200 (clobber (match_operand:P 2 "register_operand" "=c"))]
1201 "!(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
1202 @@ -1807,7 +1634,7 @@
1203 [(set_attr "type" "str")
1204 (set_attr "mode" "QI")
1205 (set (attr "prefix_rex")
1206 -@@ -16190,7 +16207,7 @@
1207 +@@ -16186,7 +16201,7 @@
1208 (clobber (match_operand:P 1 "register_operand" "=D"))
1209 (clobber (match_operand:P 2 "register_operand" "=c"))]
1210 "!(fixed_regs[CX_REG] || fixed_regs[SI_REG] || fixed_regs[DI_REG])"
1211 @@ -1816,7 +1643,7 @@
1212 [(set_attr "type" "str")
1213 (set_attr "mode" "QI")
1214 (set (attr "prefix_rex")
1215 -@@ -16231,7 +16248,7 @@
1216 +@@ -16227,7 +16242,7 @@
1217 (clobber (match_operand:P 1 "register_operand" "=D"))
1218 (clobber (reg:CC FLAGS_REG))]
1219 "!(fixed_regs[AX_REG] || fixed_regs[CX_REG] || fixed_regs[DI_REG])"
1220 @@ -1825,16 +1652,7 @@
1221 [(set_attr "type" "str")
1222 (set_attr "mode" "QI")
1223 (set (attr "prefix_rex")
1224 -@@ -16663,7 +16680,7 @@
1225 -
1226 - default:
1227 - operands[2] = SET_SRC (XVECEXP (PATTERN (insn), 0, 0));
1228 -- return "lea{<imodesuffix>}\t{%a2, %0|%0, %a2}";
1229 -+ return "lea{<imodesuffix>}\t{%E2, %0|%0, %E2}";
1230 - }
1231 - }
1232 - [(set (attr "type")
1233 -@@ -17391,131 +17408,131 @@
1234 +@@ -17372,131 +17387,131 @@
1235 ;; alternative when no register is available later.
1236
1237 (define_peephole2
1238 @@ -2004,7 +1822,7 @@
1239
1240 ;; Convert compares with 1 to shorter inc/dec operations when CF is not
1241 ;; required and register dies. Similarly for 128 to -128.
1242 -@@ -17626,7 +17643,7 @@
1243 +@@ -17607,7 +17622,7 @@
1244 ;; leal (%edx,%eax,4), %eax
1245
1246 (define_peephole2
1247 @@ -2013,7 +1831,7 @@
1248 (parallel [(set (match_operand 0 "register_operand" "")
1249 (ashift (match_operand 1 "register_operand" "")
1250 (match_operand 2 "const_int_operand" "")))
1251 -@@ -17652,16 +17669,16 @@
1252 +@@ -17633,16 +17648,16 @@
1253 enum machine_mode op1mode = GET_MODE (operands[1]);
1254 enum machine_mode mode = op1mode == DImode ? DImode : SImode;
1255 int scale = 1 << INTVAL (operands[2]);
1256 @@ -2036,7 +1854,7 @@
1257 operands[5] = gen_rtx_SUBREG (op1mode, operands[5], 0);
1258 operands[0] = dest;
1259 })
1260 -@@ -18052,7 +18069,7 @@
1261 +@@ -18033,7 +18048,7 @@
1262 {
1263 rtx (*insn)(rtx);
1264
1265 @@ -2107,13 +1925,6 @@
1266 msse5
1267 --- a/gcc/config/i386/predicates.md
1268 +++ b/gcc/config/i386/predicates.md
1269 -@@ -1,5 +1,5 @@
1270 - ;; Predicate definitions for IA-32 and x86-64.
1271 --;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
1272 -+;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
1273 - ;; Free Software Foundation, Inc.
1274 - ;;
1275 - ;; This file is part of GCC.
1276 @@ -341,6 +341,16 @@
1277 (match_operand 0 "general_operand")))
1278
1279 @@ -2178,7 +1989,7 @@
1280 ;; Match exactly zero.
1281 --- a/gcc/config/i386/sse.md
1282 +++ b/gcc/config/i386/sse.md
1283 -@@ -8126,8 +8126,8 @@
1284 +@@ -8054,8 +8054,8 @@
1285 "monitor\t%0, %1, %2"
1286 [(set_attr "length" "3")])
1287
1288 @@ -2309,7 +2120,7 @@
1289 mgnu
1290 --- a/gcc/configure
1291 +++ b/gcc/configure
1292 -@@ -13756,7 +13756,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1293 +@@ -13796,7 +13796,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1294 LD="${LD-ld} -m elf_i386_fbsd"
1295 ;;
1296 x86_64-*linux*)
1297 @@ -2327,7 +2138,7 @@
1298 LD="${LD-ld} -m elf32ppclinux"
1299 --- a/gcc/doc/invoke.texi
1300 +++ b/gcc/doc/invoke.texi
1301 -@@ -636,7 +636,7 @@ Objective-C and Objective-C++ Dialects}.
1302 +@@ -637,7 +637,7 @@ Objective-C and Objective-C++ Dialects}.
1303 -mveclibabi=@var{type} -mvect8-ret-in-mem @gol
1304 -mpc32 -mpc64 -mpc80 -mstackrealign @gol
1305 -momit-leaf-frame-pointer -mno-red-zone -mno-tls-direct-seg-refs @gol
1306 @@ -2336,7 +2147,20 @@
1307 -m32 -m64 -mx32 -mlarge-data-threshold=@var{num} @gol
1308 -msse2avx -mfentry -m8bit-idiv @gol
1309 -mavx256-split-unaligned-load -mavx256-split-unaligned-store}
1310 -@@ -13763,6 +13763,18 @@ be statically or dynamically linked.
1311 +@@ -13548,6 +13548,12 @@ Attempt to keep the stack boundary aligned to a 2 raised to @var{num}
1312 + byte boundary. If @option{-mpreferred-stack-boundary} is not specified,
1313 + the default is 4 (16 bytes or 128 bits).
1314 +
1315 ++@strong{Warning:} When generating code for the x86-64 architecture with
1316 ++SSE extensions disabled, @option{-mpreferred-stack-boundary=3} can be
1317 ++used to keep the stack boundary aligned to 8 byte boundary. You must
1318 ++build all modules with @option{-mpreferred-stack-boundary=3}, including
1319 ++any libraries. This includes the system libraries and startup modules.
1320 ++
1321 + @item -mincoming-stack-boundary=@var{num}
1322 + @opindex mincoming-stack-boundary
1323 + Assume the incoming stack is aligned to a 2 raised to @var{num} byte
1324 +@@ -13941,6 +13947,18 @@ be statically or dynamically linked.
1325 @opindex mcmodel=large
1326 Generate code for the large model: This model makes no assumptions
1327 about addresses and sizes of sections.
1328 @@ -2384,7 +2208,7 @@
1329 with the corresponding @samp{Enum} record. The string is checked and
1330 --- a/gcc/dwarf2out.c
1331 +++ b/gcc/dwarf2out.c
1332 -@@ -10178,7 +10178,9 @@ dbx_reg_number (const_rtx rtl)
1333 +@@ -10181,7 +10181,9 @@ dbx_reg_number (const_rtx rtl)
1334 }
1335 #endif
1336
1337 @@ -2395,6 +2219,26 @@
1338 }
1339
1340 /* Optionally add a DW_OP_piece term to a location description expression.
1341 +@@ -11669,6 +11671,8 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
1342 + case REG:
1343 + if (GET_MODE_CLASS (mode) != MODE_INT
1344 + || (GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE
1345 ++ && rtl != arg_pointer_rtx
1346 ++ && rtl != frame_pointer_rtx
1347 + #ifdef POINTERS_EXTEND_UNSIGNED
1348 + && (mode != Pmode || mem_mode == VOIDmode)
1349 + #endif
1350 +@@ -11941,7 +11945,9 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
1351 + case PLUS:
1352 + plus:
1353 + if (is_based_loc (rtl)
1354 +- && GET_MODE_SIZE (mode) <= DWARF2_ADDR_SIZE
1355 ++ && (GET_MODE_SIZE (mode) <= DWARF2_ADDR_SIZE
1356 ++ || XEXP (rtl, 0) == arg_pointer_rtx
1357 ++ || XEXP (rtl, 0) == frame_pointer_rtx)
1358 + && GET_MODE_CLASS (mode) == MODE_INT)
1359 + mem_loc_result = based_loc_descr (XEXP (rtl, 0),
1360 + INTVAL (XEXP (rtl, 1)),
1361 --- a/gcc/emit-rtl.c
1362 +++ b/gcc/emit-rtl.c
1363 @@ -964,6 +964,22 @@ void
1364 @@ -2571,6 +2415,30 @@
1365 -/* { dg-final { scan-assembler-not "-18874240" } } */
1366 +/* { dg-final { scan-assembler-not "\[,\\t \]+-18874240" } } */
1367 --- /dev/null
1368 ++++ b/gcc/testsuite/gcc.target/i386/pr52857-1.c
1369 +@@ -0,0 +1,10 @@
1370 ++/* { dg-do compile { target { ! { ia32 } } } } */
1371 ++/* { dg-options "-g -O -mx32 -maddress-mode=long" } */
1372 ++
1373 ++extern void get_BID128 (int *);
1374 ++void
1375 ++__bid128_div (void)
1376 ++{
1377 ++ int res;
1378 ++ get_BID128 (&res);
1379 ++}
1380 +--- /dev/null
1381 ++++ b/gcc/testsuite/gcc.target/i386/pr52857-2.c
1382 +@@ -0,0 +1,8 @@
1383 ++/* { dg-do compile { target { ! { ia32 } } } } */
1384 ++/* { dg-options "-g -O -mx32 -maddress-mode=long" } */
1385 ++
1386 ++void uw_init_context_1 (void *);
1387 ++void _Unwind_ForcedUnwind (void)
1388 ++{
1389 ++ uw_init_context_1 (__builtin_dwarf_cfa ());
1390 ++}
1391 +--- /dev/null
1392 +++ b/gcc/testsuite/gcc.target/i386/pr52876.c
1393 @@ -0,0 +1,25 @@
1394 +/* { dg-do run { target { x32 } } } */
1395 @@ -2648,6 +2516,15 @@
1396 + } else
1397 + i = g[c];
1398 +}
1399 +--- a/gcc/testsuite/gcc.target/i386/pr54157.c
1400 ++++ b/gcc/testsuite/gcc.target/i386/pr54157.c
1401 +@@ -1,5 +1,5 @@
1402 + /* { dg-do compile { target { ! { ia32 } } } } */
1403 +-/* { dg-options "-O2 -mx32 -ftree-vectorize" } */
1404 ++/* { dg-options "-O2 -mx32 -maddress-mode=long -ftree-vectorize" } */
1405 +
1406 + struct s2{
1407 + int n[24 -1][24 -1][24 -1];
1408 --- a/libffi/configure
1409 +++ b/libffi/configure
1410 @@ -6282,7 +6282,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1411 @@ -2702,12 +2579,13 @@
1412 }
1413 --- a/libffi/src/x86/ffitarget.h
1414 +++ b/libffi/src/x86/ffitarget.h
1415 -@@ -53,9 +53,15 @@ typedef unsigned long long ffi_arg;
1416 +@@ -53,9 +53,16 @@ typedef unsigned long long ffi_arg;
1417 typedef long long ffi_sarg;
1418 #endif
1419 #else
1420 -+#if defined __x86_64__ && !defined __LP64__
1421 ++#if defined __x86_64__ && defined __ILP32__
1422 +#define FFI_SIZEOF_ARG 8
1423 ++#define FFI_SIZEOF_JAVA_RAW 4
1424 +typedef unsigned long long ffi_arg;
1425 +typedef long long ffi_sarg;
1426 +#else
1427 @@ -2842,6 +2720,32 @@
1428 ;;
1429 ppc64-*linux*|powerpc64-*linux*)
1430 LD="${LD-ld} -m elf32ppclinux"
1431 +--- a/libjava/include/x86_64-signal.h
1432 ++++ b/libjava/include/x86_64-signal.h
1433 +@@ -47,6 +47,10 @@ do \
1434 + \
1435 + bool _is_64_bit = false; \
1436 + \
1437 ++ /* Skip 67h address size prefix. */ \
1438 ++ if (_rip[0] == 0x67) \
1439 ++ _rip++; \
1440 ++ \
1441 + if ((_rip[0] & 0xf0) == 0x40) /* REX byte present. */ \
1442 + { \
1443 + unsigned char _rex = _rip[0] & 0x0f; \
1444 +@@ -64,10 +68,10 @@ do \
1445 + { \
1446 + if (_is_64_bit) \
1447 + _min_value_dividend = \
1448 +- _gregs[REG_RAX] == (greg_t)0x8000000000000000UL; \
1449 ++ _gregs[REG_RAX] == (greg_t)0x8000000000000000ULL; \
1450 + else \
1451 + _min_value_dividend = \
1452 +- (_gregs[REG_RAX] & 0xffffffff) == (greg_t)0x80000000UL; \
1453 ++ (_gregs[REG_RAX] & 0xffffffff) == (greg_t)0x80000000ULL; \
1454 + } \
1455 + \
1456 + if (_min_value_dividend) \
1457 --- a/libmudflap/configure
1458 +++ b/libmudflap/configure
1459 @@ -6393,7 +6393,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1460 @@ -2916,6 +2820,16 @@
1461 LD="${LD-ld} -m elf32ppclinux"
1462 --- a/libstdc++-v3/configure
1463 +++ b/libstdc++-v3/configure
1464 +@@ -3025,8 +3025,7 @@ test -n "$target_alias" &&
1465 + target_alias=${target_alias-$host_alias}
1466 +
1467 + # Handy for debugging:
1468 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: $build / $host / $target / $host_alias / $target_alias" >&5
1469 +-$as_echo "$as_me: $build / $host / $target / $host_alias / $target_alias" >&6;}; sleep 5
1470 ++#AC_MSG_NOTICE($build / $host / $target / $host_alias / $target_alias); sleep 5
1471 +
1472 + if test "$build" != "$host"; then
1473 + # We are being configured with some form of cross compiler.
1474 @@ -7120,7 +7119,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1475 LD="${LD-ld} -m elf_i386_fbsd"
1476 ;;
1477
1478
1479
1480 1.3 src/patchsets/gcc/4.7.2/gentoo/README.history
1481
1482 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.2/gentoo/README.history?rev=1.3&view=markup
1483 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.2/gentoo/README.history?rev=1.3&content-type=text/plain
1484 diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gcc/4.7.2/gentoo/README.history?r1=1.2&r2=1.3
1485
1486 Index: README.history
1487 ===================================================================
1488 RCS file: /var/cvsroot/gentoo/src/patchsets/gcc/4.7.2/gentoo/README.history,v
1489 retrieving revision 1.2
1490 retrieving revision 1.3
1491 diff -u -r1.2 -r1.3
1492 --- README.history 30 Sep 2012 06:42:12 -0000 1.2
1493 +++ README.history 2 Oct 2012 04:53:35 -0000 1.3
1494 @@ -1,3 +1,6 @@
1495 +1.1 02 Oct 2012
1496 + U 90_all_gcc-4.7-x32.patch
1497 +
1498 1.0 30 Sep 2012
1499 + 03_all_java-nomulti.patch
1500 + 10_all_default-fortify-source.patch