diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-08-09 02:13:12 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-08-09 02:13:12 +0000 |
commit | e1348a373fd1d9ef020a2cf014cd570121cef0b8 (patch) | |
tree | 1ca13f6abc39ee045bec85a9b03a8784f4fd3533 /gnu/egcs/gcc/config | |
parent | 93a6d86bbcd72fc81e87f3432d843848ad41749b (diff) |
fix for mcount call to allow .text sizes larger than 512k; epsie@ ok
Diffstat (limited to 'gnu/egcs/gcc/config')
-rw-r--r-- | gnu/egcs/gcc/config/pa/pa.md | 106 |
1 files changed, 101 insertions, 5 deletions
diff --git a/gnu/egcs/gcc/config/pa/pa.md b/gnu/egcs/gcc/config/pa/pa.md index dbff838a4e2..c2d583ab96b 100644 --- a/gnu/egcs/gcc/config/pa/pa.md +++ b/gnu/egcs/gcc/config/pa/pa.md @@ -3600,7 +3600,13 @@ [(set (match_operand:DF 0 "register_operand" "=f") (neg:DF (match_operand:DF 1 "register_operand" "f")))] "! TARGET_SOFT_FLOAT" - "fsub,dbl %%fr0,%1,%0" + "* +{ + if (TARGET_PA_20) + return \"fneg,dbl %1,%0\"; + else + return \"fsub,dbl %%fr0,%1,%0\"; +}" [(set_attr "type" "fpalu") (set_attr "length" "4")]) @@ -3608,7 +3614,13 @@ [(set (match_operand:SF 0 "register_operand" "=f") (neg:SF (match_operand:SF 1 "register_operand" "f")))] "! TARGET_SOFT_FLOAT" - "fsub,sgl %%fr0,%1,%0" + "* +{ + if (TARGET_PA_20) + return \"fneg,sgl %1,%0\"; + else + return \"fsub,sgl %%fr0,%1,%0\"; +}" [(set_attr "type" "fpalu") (set_attr "length" "4")]) @@ -3643,6 +3655,88 @@ "fsqrt,sgl %1,%0" [(set_attr "type" "fpsqrtsgl") (set_attr "length" "4")]) + +;; PA 2.0 floating point instructions + +; fmpyfadd patterns +(define_insn "" + [(set (match_operand:DF 0 "register_operand" "=f") + (plus:DF (mult:DF (match_operand:DF 1 "register_operand" "f") + (match_operand:DF 2 "register_operand" "f")) + (match_operand:DF 3 "register_operand" "f")))] + "TARGET_PA_20 && ! TARGET_SOFT_FLOAT" + "fmpyfadd,dbl %1,%2,%3,%0" + [(set_attr "type" "fpmuldbl") + (set_attr "length" "4")]) + +(define_insn "" + [(set (match_operand:DF 0 "register_operand" "=f") + (plus:DF (match_operand:DF 1 "register_operand" "f") + (mult:DF (match_operand:DF 2 "register_operand" "f") + (match_operand:DF 3 "register_operand" "f"))))] + "TARGET_PA_20 && ! TARGET_SOFT_FLOAT" + "fmpyfadd,dbl %2,%3,%1,%0" + [(set_attr "type" "fpmuldbl") + (set_attr "length" "4")]) + +(define_insn "" + [(set (match_operand:SF 0 "register_operand" "=f") + (plus:SF (mult:SF (match_operand:SF 1 "register_operand" "f") + (match_operand:SF 2 "register_operand" "f")) + (match_operand:SF 3 "register_operand" "f")))] + "TARGET_PA_20 && ! TARGET_SOFT_FLOAT" + "fmpyfadd,sgl %1,%2,%3,%0" + [(set_attr "type" "fpmulsgl") + (set_attr "length" "4")]) + +(define_insn "" + [(set (match_operand:SF 0 "register_operand" "=f") + (plus:SF (match_operand:SF 1 "register_operand" "f") + (mult:SF (match_operand:SF 2 "register_operand" "f") + (match_operand:SF 3 "register_operand" "f"))))] + "TARGET_PA_20 && ! TARGET_SOFT_FLOAT" + "fmpyfadd,sgl %2,%3,%1,%0" + [(set_attr "type" "fpmulsgl") + (set_attr "length" "4")]) + +; fmpynfadd patterns +(define_insn "" + [(set (match_operand:DF 0 "register_operand" "=f") + (minus:DF (match_operand:DF 1 "register_operand" "f") + (mult:DF (match_operand:DF 2 "register_operand" "f") + (match_operand:DF 3 "register_operand" "f"))))] + "TARGET_PA_20 && ! TARGET_SOFT_FLOAT" + "fmpynfadd,dbl %2,%3,%1,%0" + [(set_attr "type" "fpmuldbl") + (set_attr "length" "4")]) + +(define_insn "" + [(set (match_operand:SF 0 "register_operand" "=f") + (minus:SF (match_operand:SF 1 "register_operand" "f") + (mult:SF (match_operand:SF 2 "register_operand" "f") + (match_operand:SF 3 "register_operand" "f"))))] + "TARGET_PA_20 && ! TARGET_SOFT_FLOAT" + "fmpynfadd,sgl %2,%3,%1,%0" + [(set_attr "type" "fpmulsgl") + (set_attr "length" "4")]) + +; fnegabs patterns +(define_insn "" + [(set (match_operand:DF 0 "register_operand" "=f") + (neg:DF (abs:DF (match_operand:DF 1 "register_operand" "f"))))] + "TARGET_PA_20 && ! TARGET_SOFT_FLOAT" + "fnegabs,dbl %1,%0" + [(set_attr "type" "fpalu") + (set_attr "length" "4")]) + +(define_insn "" + [(set (match_operand:SF 0 "register_operand" "=f") + (neg:SF (abs:SF (match_operand:SF 1 "register_operand" "f"))))] + "TARGET_PA_20 && ! TARGET_SOFT_FLOAT" + "fnegabs,sgl %1,%0" + [(set_attr "type" "fpalu") + (set_attr "length" "4")]) + ;;- Shift instructions @@ -4016,9 +4110,11 @@ ;; the call. (define_insn "call_profiler" [(unspec_volatile [(const_int 0)] 0) - (use (match_operand:SI 0 "const_int_operand" ""))] - "" - "bl _mcount,%%r2\;ldo %0(%%r2),%%r25" + (use (match_operand:SI 0 "const_int_operand" "")) + (clobber (reg:SI 31)) + (clobber (reg:SI 24))] + "" + "ldil L%%_mcount,%%r24\;blr %%r0,%%r25\;ldo 8(%%r25),%%r25\;ble R%%_mcount(%%sr4,%%r24)\;copy %%r31,%%r2" [(set_attr "type" "multi") (set_attr "length" "8")]) |