diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 6 |
2 files changed, 8 insertions, 3 deletions
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 <kai.tietz@onevision.com> + + * i386.c: (legitimize_address): Move dllimported variable check + infront of legitimizing pic address of CONST symbols. + 2007-08-14 Steve Ellcey <sje@cup.hp.com> 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)) |