f77 on sco5 fails on GOTOFF references
Richard Henderson
rth@cygnus.com
Fri Jan 9 00:57:00 GMT 1998
On Wed, Dec 31, 1997 at 03:04:45PM -0800, Richard Henderson wrote:
> I believe the problem to be between LEGITIMATE_PIC_OPERAND_P and the
> pushl "i" constraint, and the fact that the i386 backend lies to gcc
> about how pic really works. If the later were fixed (big overhaul),
> I'm sure many things would work much better.
I still believe that hiding the use of %ebx from the compiler for
constant pool addresses is wrong, but I did not have the patience
to walk through all of the lossage when turning that on.
However, here's a hacky patch that works for the test case
subroutine foo(a)
double precision a
a = dlog10(2.0d0)
return
end
I've no idea if a similar change is required elsewhere as well.
r~
Fri Jan 9 00:48:09 1998 Richard Henderson <rth@cygnus.com>
* i386.md (push): Delete identical !TARGET_MOVE pattern. Add
patterns to prohibit symbolic constants if flag_pic.
Index: i386.md
===================================================================
RCS file: /cvs/cvsfiles/egcs/gcc/config/i386/i386.md,v
retrieving revision 1.4
diff -u -p -d -r1.4 i386.md
--- i386.md 1997/11/05 19:29:37 1.4
+++ i386.md 1998/01/09 08:45:36
@@ -835,7 +835,13 @@
(define_insn ""
[(set (match_operand:SI 0 "push_operand" "=<")
(match_operand:SI 1 "general_operand" "g"))]
- "TARGET_PUSH_MEMORY"
+ "TARGET_PUSH_MEMORY && !flag_pic"
+ "push%L0 %1")
+
+(define_insn ""
+ [(set (match_operand:SI 0 "push_operand" "=<")
+ (match_operand:SI 1 "general_operand" "rmn"))]
+ "TARGET_PUSH_MEMORY && flag_pic"
"push%L0 %1")
;; If not a 386, it is faster to move MEM to a REG and then push, rather than
@@ -844,13 +850,13 @@
(define_insn ""
[(set (match_operand:SI 0 "push_operand" "=<")
(match_operand:SI 1 "nonmemory_operand" "ri"))]
- "!TARGET_PUSH_MEMORY && TARGET_MOVE"
+ "!TARGET_PUSH_MEMORY && !flag_pic"
"push%L0 %1")
(define_insn ""
[(set (match_operand:SI 0 "push_operand" "=<")
- (match_operand:SI 1 "nonmemory_operand" "ri"))]
- "!TARGET_PUSH_MEMORY && !TARGET_MOVE"
+ (match_operand:SI 1 "nonmemory_operand" "rn"))]
+ "!TARGET_PUSH_MEMORY && flag_pic"
"push%L0 %1")
;; General case of fullword move.
More information about the Gcc
mailing list