Commit ce7f2acd by Per Bothner Committed by Per Bothner

winnt.c (i386_pe_encode_section_info): Smash rtlname's XSTR in place, so we…

winnt.c (i386_pe_encode_section_info): Smash rtlname's XSTR in place, so we don't lose SYMBOL_REF_DECL info.


	* config/i386/winnt.c (i386_pe_encode_section_info):  Smash rtlname's
	XSTR in place, so we don't lose SYMBOL_REF_DECL info.

From-SVN: r83893
parent 8319dc87
2004-06-29 Per Bothner <per@bothner.com>
* config/i386/winnt.c (i386_pe_encode_section_info): Smash rtlname's
XSTR in place, so we don't lose SYMBOL_REF_DECL info.
2004-06-29 Zack Weinberg <zack@codesourcery.com> 2004-06-29 Zack Weinberg <zack@codesourcery.com>
* config/ia64/hpux.h: Target does too support thread-local storage. * config/ia64/hpux.h: Target does too support thread-local storage.
......
...@@ -488,16 +488,16 @@ i386_pe_encode_section_info (tree decl, rtx rtl, int first) ...@@ -488,16 +488,16 @@ i386_pe_encode_section_info (tree decl, rtx rtl, int first)
{ {
default_encode_section_info (decl, rtl, first); default_encode_section_info (decl, rtl, first);
if (TREE_CODE (decl) == FUNCTION_DECL) if (first && TREE_CODE (decl) == FUNCTION_DECL)
{ {
if (lookup_attribute ("stdcall", tree type_attributes = TYPE_ATTRIBUTES (TREE_TYPE (decl));
TYPE_ATTRIBUTES (TREE_TYPE (decl)))) rtx rtlname = XEXP (rtl, 0);
XEXP (DECL_RTL (decl), 0) = if (GET_CODE (rtlname) == MEM)
gen_rtx_SYMBOL_REF (Pmode, gen_stdcall_suffix (decl)); rtlname = XEXP (rtlname, 0);
else if (lookup_attribute ("fastcall", if (lookup_attribute ("stdcall", type_attributes))
TYPE_ATTRIBUTES (TREE_TYPE (decl)))) XSTR (rtlname, 0) = gen_stdcall_suffix (decl);
XEXP (DECL_RTL (decl), 0) = else if (lookup_attribute ("fastcall", type_attributes))
gen_rtx_SYMBOL_REF (Pmode, gen_fastcall_suffix (decl)); XSTR (rtlname, 0) = gen_fastcall_suffix (decl);
} }
/* Mark the decl so we can tell from the rtl whether the object is /* Mark the decl so we can tell from the rtl whether the object is
......
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