Commit d46f7484 by Richard Henderson Committed by Richard Henderson

alpha.md (divsi3, [...]): Enable, and work around an OSF/1 library bug wrt…

alpha.md (divsi3, [...]): Enable, and work around an OSF/1 library bug wrt sign-extension of inputs.

        * alpha.md (divsi3, udivsi3, modsi3, umodsi3): Enable, and work
        around an OSF/1 library bug wrt sign-extension of inputs.

From-SVN: r20183
parent e3c81d20
Tue Jun 2 14:02:38 1998 Richard Henderson <rth@cygnus.com>
* alpha.md (divsi3, udivsi3, modsi3, umodsi3): Enable, and work
around an OSF/1 library bug wrt sign-extension of inputs.
Tue Jun 2 13:02:44 1998 Richard Henderson <rth@cygnus.com> Tue Jun 2 13:02:44 1998 Richard Henderson <rth@cygnus.com>
* vax/netbsd.h (DWARF2_UNWIND_INFO): Must be undef, not defined 0. * vax/netbsd.h (DWARF2_UNWIND_INFO): Must be undef, not defined 0.
......
...@@ -804,61 +804,66 @@ ...@@ -804,61 +804,66 @@
;; The divide and remainder operations always take their inputs from ;; The divide and remainder operations always take their inputs from
;; r24 and r25, put their output in r27, and clobber r23 and r28. ;; r24 and r25, put their output in r27, and clobber r23 and r28.
;; ??? comment out the divsi routines since the library functions ;; ??? Force sign-extension here because some versions of OSF/1 don't
;; don't seem to do the right thing with the high 32-bits of a ;; do the right thing if the inputs are not properly sign-extended.
;; register nonzero. ;; But Linux, for instance, does not have this problem. Is it worth
;; the complication here to eliminate the sign extension?
;(define_expand "divsi3"
; [(set (reg:SI 24) (match_operand:SI 1 "input_operand" "")) (define_expand "divsi3"
; (set (reg:SI 25) (match_operand:SI 2 "input_operand" "")) [(set (reg:DI 24)
; (parallel [(set (reg:SI 27) (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" "")))
; (div:SI (reg:SI 24) (set (reg:DI 25)
; (reg:SI 25))) (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" "")))
; (clobber (reg:DI 23)) (parallel [(set (reg:DI 27)
; (clobber (reg:DI 28))]) (sign_extend:DI (div:SI (reg:DI 24) (reg:DI 25))))
; (set (match_operand:SI 0 "general_operand" "") (clobber (reg:DI 23))
; (reg:SI 27))] (clobber (reg:DI 28))])
; "!TARGET_OPEN_VMS" (set (match_operand:SI 0 "general_operand" "")
; "") (subreg:SI (reg:DI 27) 0))]
"!TARGET_OPEN_VMS"
;(define_expand "udivsi3" "")
; [(set (reg:SI 24) (match_operand:SI 1 "input_operand" ""))
; (set (reg:SI 25) (match_operand:SI 2 "input_operand" "")) (define_expand "udivsi3"
; (parallel [(set (reg:SI 27) [(set (reg:DI 24)
; (udiv:SI (reg:SI 24) (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" "")))
; (reg:SI 25))) (set (reg:DI 25)
; (clobber (reg:DI 23)) (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" "")))
; (clobber (reg:DI 28))]) (parallel [(set (reg:DI 27)
; (set (match_operand:SI 0 "general_operand" "") (sign_extend:DI (udiv:SI (reg:DI 24) (reg:DI 25))))
; (reg:SI 27))] (clobber (reg:DI 23))
; "!TARGET_OPEN_VMS" (clobber (reg:DI 28))])
; "") (set (match_operand:SI 0 "general_operand" "")
(subreg:SI (reg:DI 27) 0))]
;(define_expand "modsi3" "!TARGET_OPEN_VMS"
; [(set (reg:SI 24) (match_operand:SI 1 "input_operand" "")) "")
; (set (reg:SI 25) (match_operand:SI 2 "input_operand" ""))
; (parallel [(set (reg:SI 27) (define_expand "modsi3"
; (mod:SI (reg:SI 24) [(set (reg:DI 24)
; (reg:SI 25))) (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" "")))
; (clobber (reg:DI 23)) (set (reg:DI 25)
; (clobber (reg:DI 28))]) (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" "")))
; (set (match_operand:SI 0 "general_operand" "") (parallel [(set (reg:DI 27)
; (reg:SI 27))] (sign_extend:DI (mod:SI (reg:DI 24) (reg:DI 25))))
; "!TARGET_OPEN_VMS" (clobber (reg:DI 23))
; "") (clobber (reg:DI 28))])
(set (match_operand:SI 0 "general_operand" "")
;(define_expand "umodsi3" (subreg:SI (reg:DI 27) 0))]
; [(set (reg:SI 24) (match_operand:SI 1 "input_operand" "")) "!TARGET_OPEN_VMS"
; (set (reg:SI 25) (match_operand:SI 2 "input_operand" "")) "")
; (parallel [(set (reg:SI 27)
; (umod:SI (reg:SI 24) (define_expand "umodsi3"
; (reg:SI 25))) [(set (reg:DI 24)
; (clobber (reg:DI 23)) (sign_extend:DI (match_operand:SI 1 "nonimmediate_operand" "")))
; (clobber (reg:DI 28))]) (set (reg:DI 25)
; (set (match_operand:SI 0 "general_operand" "") (sign_extend:DI (match_operand:SI 2 "nonimmediate_operand" "")))
; (reg:SI 27))] (parallel [(set (reg:DI 27)
; "!TARGET_OPEN_VMS" (sign_extend:DI (umod:SI (reg:DI 24) (reg:DI 25))))
; "") (clobber (reg:DI 23))
(clobber (reg:DI 28))])
(set (match_operand:SI 0 "general_operand" "")
(subreg:SI (reg:DI 27) 0))]
"!TARGET_OPEN_VMS"
"")
(define_expand "divdi3" (define_expand "divdi3"
[(set (reg:DI 24) (match_operand:DI 1 "input_operand" "")) [(set (reg:DI 24) (match_operand:DI 1 "input_operand" ""))
...@@ -912,15 +917,15 @@ ...@@ -912,15 +917,15 @@
"!TARGET_OPEN_VMS" "!TARGET_OPEN_VMS"
"") "")
;(define_insn "" (define_insn ""
; [(set (reg:SI 27) [(set (reg:DI 27)
; (match_operator:SI 1 "divmod_operator" (sign_extend:DI (match_operator:SI 1 "divmod_operator"
; [(reg:SI 24) (reg:SI 25)])) [(reg:DI 24) (reg:DI 25)])))
; (clobber (reg:DI 23)) (clobber (reg:DI 23))
; (clobber (reg:DI 28))] (clobber (reg:DI 28))]
; "!TARGET_OPEN_VMS" "!TARGET_OPEN_VMS"
; "%E1 $24,$25,$27" "%E1 $24,$25,$27"
; [(set_attr "type" "jsr")]) [(set_attr "type" "jsr")])
(define_insn "" (define_insn ""
[(set (reg:DI 27) [(set (reg:DI 27)
......
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