Commit bef3c57b by Uros Bizjak

re PR target/38988 (Cannot build crtstuff.c with -mcmodel=large -fPIC -O2)

	PR target/38988
	* config/i386/i386.md (set_rip_rex64): Wrap operand 1 in label_ref.
	(set_got_offset_rex64): Ditto.

From-SVN: r143720
parent 0c6390fa
2009-01-28 Uros Bizjak <ubizjak@gmail.com>
PR target/38988
* config/i386/i386.md (set_rip_rex64): Wrap operand 1 in label_ref.
(set_got_offset_rex64): Ditto.
2009-01-27 H.J. Lu <hongjiu.lu@intel.com>
PR target/38941
......@@ -511,7 +517,8 @@
used to index the memory access. Do not pass loop_p.
Fix comment. Stop recursion on tcc_constant or tcc_declaration.
(expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
the gimple_stmt_iterator where it inserts new code. Do not pass loop_p.
the gimple_stmt_iterator where it inserts new code.
Do not pass loop_p.
(copy_bb_and_scalar_dependences): Do not pass loop_p.
(translate_clast): Update call to copy_bb_and_scalar_dependences.
......
......@@ -15299,7 +15299,7 @@
(define_insn "set_rip_rex64"
[(set (match_operand:DI 0 "register_operand" "=r")
(unspec:DI [(match_operand:DI 1 "" "")] UNSPEC_SET_RIP))]
(unspec:DI [(label_ref (match_operand 1 "" ""))] UNSPEC_SET_RIP))]
"TARGET_64BIT"
"lea{q}\t{%l1(%%rip), %0|%0, %l1[rip]}"
[(set_attr "type" "lea")
......@@ -15307,7 +15307,9 @@
(define_insn "set_got_offset_rex64"
[(set (match_operand:DI 0 "register_operand" "=r")
(unspec:DI [(match_operand:DI 1 "" "")] UNSPEC_SET_GOT_OFFSET))]
(unspec:DI
[(label_ref (match_operand 1 "" ""))]
UNSPEC_SET_GOT_OFFSET))]
"TARGET_64BIT"
"movabs{q}\t{$_GLOBAL_OFFSET_TABLE_-%l1, %0|%0, OFFSET FLAT:_GLOBAL_OFFSET_TABLE_-%l1}"
[(set_attr "type" "imov")
......
/* { dg-do compile } */
/* { dg-require-effective-target lp64 } */
/* { dg-require-effective-target fpic } */
/* { dg-options "-O2 -fpic -mcmodel=large" } */
typedef long unsigned int size_t;
typedef void (*func_ptr) (void);
static func_ptr __DTOR_LIST__[1] = { (func_ptr) (-1) };
void
__do_global_dtors_aux (void)
{
extern func_ptr __DTOR_END__[];
size_t dtor_idx = 0;
const size_t max_idx = __DTOR_END__ - __DTOR_LIST__ - 1;
func_ptr f;
while (dtor_idx < max_idx)
{
f = __DTOR_LIST__[++dtor_idx];
f ();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment