Commit 360ca054 by Eric Botcazou Committed by Eric Botcazou

re PR middle-end/20263 (Incorrect asm for global register vars)

	PR middle-end/20263
	* varasm.c (make_decl_rtl) [ASM_DECLARE_REGISTER_GLOBAL]: Use
	the DECL_NAME, not the DECL_ASSEMBLER_NAME.

From-SVN: r97157
parent 1f1e8527
2005-03-29 Eric Botcazou <ebotcazou@libertysurf.fr>
PR middle-end/20263
* varasm.c (make_decl_rtl) [ASM_DECLARE_REGISTER_GLOBAL]: Use
the DECL_NAME, not the DECL_ASSEMBLER_NAME.
2005-03-29 Dale Johannesen <dalej@apple.com>
* Makefile.in (value-prof.o): New dependencies on $(DIAGNOSTIC_H)
......
2005-03-29 Eric Botcazou <ebotcazou@libertysurf.fr>
* gcc.dg/sparc-reg-1.c: New test.
2005-03-28 Steve Ellcey <sje@cup.hp.com>
PR target/19890
......
/* PR middle-end/20263 */
/* { dg-do assemble { target sparc64-*-* } } */
/* { dg-options "" } */
register void *tp __asm__("%g7");
void set_tp(void)
{
tp = 0;
}
......@@ -897,7 +897,6 @@ make_decl_rtl (tree decl)
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
if (TREE_CODE (decl) != FUNCTION_DECL && DECL_REGISTER (decl))
{
reg_number = decode_reg_name (name);
......@@ -940,6 +939,7 @@ make_decl_rtl (tree decl)
/* Make this register global, so not usable for anything
else. */
#ifdef ASM_DECLARE_REGISTER_GLOBAL
name = IDENTIFIER_POINTER (DECL_NAME (decl));
ASM_DECLARE_REGISTER_GLOBAL (asm_out_file, decl, reg_number, name);
#endif
nregs = hard_regno_nregs[reg_number][DECL_MODE (decl)];
......
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