Patchwork [i386] : Treat dllimported symbol as external in predicates

login
register
mail settings
Submitter Kai Tietz
Date March 22, 2013, 8:03 a.m.
Message ID <CAEwic4YWLCs1h5R=sxLEqmLwA9wgATZLyJJgTYxabios1nSrsw@mail.gmail.com>
Download mbox | patch
Permalink /patch/229901/
State New
Headers show

Comments

Kai Tietz - March 22, 2013, 8:03 a.m.
Hi,

A dllimported symbol is always external.  So treat that proper in
local_symbolic_operand.

ChangeLog

2013-03-22  Kai Tietz  <ktietz@redhat.com>

        * config/i386/predicates.md (local_symbolic_operand):
Interprete dll-imported symbols
        as none-local.

Tested for x86_64-w64-mingw32, i686-w64-mingw32, and upcoming
x86_64-pc-cygwin.  Ok for apply?

Regards,
Kai
Richard Henderson - March 22, 2013, 3:54 p.m.
On 03/22/2013 01:03 AM, Kai Tietz wrote:
>         * config/i386/predicates.md (local_symbolic_operand):
> Interprete dll-imported symbols
>         as none-local.

Ok.


r~

Patch

Index: gcc/config/i386/predicates.md
===================================================================
--- gcc/config/i386/predicates.md       (Revision 196898)
+++ gcc/config/i386/predicates.md       (Arbeitskopie)
@@ -436,6 +436,9 @@ 
   if (SYMBOL_REF_TLS_MODEL (op))
     return false;

+  /* Dll-imported symbols are always external.  */
+  if (TARGET_DLLIMPORT_DECL_ATTRIBUTES && SYMBOL_REF_DLLIMPORT_P (op))
+    return false;
   if (SYMBOL_REF_LOCAL_P (op))
     return true;