From: hubicka Date: Tue, 14 Aug 2007 18:24:48 +0000 (+0000) Subject: * i386.c: (legitimize_address): Move dllimported variable check X-Git-Tag: upstream/4.9.2~46908 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fc7fd1438e8e45f79d0af78616c50ed2a49ef8a3;p=platform%2Fupstream%2Flinaro-gcc.git * i386.c: (legitimize_address): Move dllimported variable check infront of legitimizing pic address of CONST symbols. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127488 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9fac24b..bda9ad8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-08-14 Kai Tietz + + * i386.c: (legitimize_address): Move dllimported variable check + infront of legitimizing pic address of CONST symbols. + 2007-08-14 Steve Ellcey PR tree-optimization/32941 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 20044fd..79f4c38 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -7718,9 +7718,6 @@ legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, enum machine_mode mode) return gen_rtx_PLUS (Pmode, t, XEXP (XEXP (x, 0), 1)); } - if (flag_pic && SYMBOLIC_CONST (x)) - return legitimize_pic_address (x, 0); - if (TARGET_DLLIMPORT_DECL_ATTRIBUTES) { if (GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_DLLIMPORT_P (x)) @@ -7735,6 +7732,9 @@ legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, enum machine_mode mode) } } + if (flag_pic && SYMBOLIC_CONST (x)) + return legitimize_pic_address (x, 0); + /* Canonicalize shifts by 0, 1, 2, 3 into multiply */ if (GET_CODE (x) == ASHIFT && CONST_INT_P (XEXP (x, 1))