This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix alphaev56 bootstrap
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 13 Sep 2002 11:02:23 -0700
- Subject: fix alphaev56 bootstrap
Liberalness with categorization of instructions lead to
an unspec_volatile being passed to if_test_bypass_p,
which then aborted.
Fixed thus.
r~
* config/alpha/alpha.md (attr type): Add callpal.
(imb, trap, load_tp, set_tp): Use it.
* config/alpha/ev4.md (ev4_callpal): New.
* config/alpha/ev5.md (ev5_callpal): New.
* config/alpha/ev6.md (ev6_ibr): Handle callpal.
* config/alpha/alpha.c (alphaev4_insn_pipe): Handle TYPE_CALLPAL.
(alphaev5_insn_pipe): Likewise.
Index: alpha.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.c,v
retrieving revision 1.272
diff -c -p -d -r1.272 alpha.c
*** alpha.c 21 Aug 2002 23:24:11 -0000 1.272
--- alpha.c 13 Sep 2002 17:56:01 -0000
*************** alphaev4_insn_pipe (insn)
*** 8376,8381 ****
--- 8376,8382 ----
case TYPE_MISC:
case TYPE_IBR:
case TYPE_JSR:
+ case TYPE_CALLPAL:
case TYPE_FCPYS:
case TYPE_FCMOV:
case TYPE_FADD:
*************** alphaev5_insn_pipe (insn)
*** 8418,8423 ****
--- 8419,8425 ----
case TYPE_IBR:
case TYPE_JSR:
+ case TYPE_CALLPAL:
return EV5_E1;
case TYPE_FCPYS:
Index: alpha.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.md,v
retrieving revision 1.196
diff -c -p -d -r1.196 alpha.md
*** alpha.md 8 Sep 2002 05:22:53 -0000 1.196
--- alpha.md 13 Sep 2002 17:56:01 -0000
***************
*** 97,103 ****
;; separately.
(define_attr "type"
! "ild,fld,ldsym,ist,fst,ibr,fbr,jsr,iadd,ilog,shift,icmov,fcmov,icmp,imul,\
fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
(const_string "iadd"))
--- 97,103 ----
;; separately.
(define_attr "type"
! "ild,fld,ldsym,ist,fst,ibr,callpal,fbr,jsr,iadd,ilog,shift,icmov,fcmov,icmp,imul,\
fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi,none"
(const_string "iadd"))
*************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi
*** 4866,4872 ****
[(unspec_volatile [(const_int 0)] UNSPECV_IMB)]
""
"call_pal 0x86"
! [(set_attr "type" "ibr")])
;; BUGCHK is documented common to OSF/1 and VMS PALcode.
;; NT does not document anything at 0x81 -- presumably it would generate
--- 4866,4872 ----
[(unspec_volatile [(const_int 0)] UNSPECV_IMB)]
""
"call_pal 0x86"
! [(set_attr "type" "callpal")])
;; BUGCHK is documented common to OSF/1 and VMS PALcode.
;; NT does not document anything at 0x81 -- presumably it would generate
*************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi
*** 4876,4882 ****
[(trap_if (const_int 1) (const_int 0))]
"!TARGET_ABI_WINDOWS_NT"
"call_pal 0x81"
! [(set_attr "type" "ibr")])
;; For userland, we load the thread pointer from the TCB.
;; For the kernel, we load the per-cpu private value.
--- 4876,4882 ----
[(trap_if (const_int 1) (const_int 0))]
"!TARGET_ABI_WINDOWS_NT"
"call_pal 0x81"
! [(set_attr "type" "callpal")])
;; For userland, we load the thread pointer from the TCB.
;; For the kernel, we load the per-cpu private value.
*************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi
*** 4891,4897 ****
else
return "call_pal 0x9e";
}
! [(set_attr "type" "ibr")])
;; For completeness, and possibly a __builtin function, here's how to
;; set the thread pointer. Since we don't describe enough of this
--- 4891,4897 ----
else
return "call_pal 0x9e";
}
! [(set_attr "type" "callpal")])
;; For completeness, and possibly a __builtin function, here's how to
;; set the thread pointer. Since we don't describe enough of this
*************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi
*** 4913,4919 ****
else
return "call_pal 0x9f";
}
! [(set_attr "type" "ibr")])
;; Finally, we have the basic data motion insns. The byte and word insns
;; are done via define_expand. Start with the floating-point insns, since
--- 4913,4919 ----
else
return "call_pal 0x9f";
}
! [(set_attr "type" "callpal")])
;; Finally, we have the basic data motion insns. The byte and word insns
;; are done via define_expand. Start with the floating-point insns, since
Index: ev4.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/ev4.md,v
retrieving revision 1.1
diff -c -p -d -r1.1 ev4.md
*** ev4.md 5 May 2002 21:54:39 -0000 1.1
--- ev4.md 13 Sep 2002 17:56:01 -0000
***************
*** 59,64 ****
--- 59,69 ----
(eq_attr "type" "ibr,jsr"))
"ev4_ib1+ev4_bbox,ev4_bbox")
+ (define_insn_reservation "ev4_callpal" 2
+ (and (eq_attr "cpu" "ev4")
+ (eq_attr "type" "callpal"))
+ "ev4_ib1+ev4_bbox,ev4_bbox")
+
(define_insn_reservation "ev4_fbr" 2
(and (eq_attr "cpu" "ev4")
(eq_attr "type" "fbr"))
Index: ev5.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/ev5.md,v
retrieving revision 1.2
diff -c -p -d -r1.2 ev5.md
*** ev5.md 10 Jun 2002 21:03:33 -0000 1.2
--- ev5.md 13 Sep 2002 17:56:01 -0000
***************
*** 59,64 ****
--- 59,69 ----
(eq_attr "type" "ibr"))
"ev5_e1")
+ (define_insn_reservation "ev5_callpal" 1
+ (and (eq_attr "cpu" "ev5")
+ (eq_attr "type" "callpal"))
+ "ev5_e1")
+
(define_insn_reservation "ev5_jsr" 1
(and (eq_attr "cpu" "ev5")
(eq_attr "type" "jsr"))
Index: ev6.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/ev6.md,v
retrieving revision 1.1
diff -c -p -d -r1.1 ev6.md
*** ev6.md 5 May 2002 21:54:39 -0000 1.1
--- ev6.md 13 Sep 2002 17:56:01 -0000
***************
*** 113,119 ****
; Integer branches issue to upper units
(define_insn_reservation "ev6_ibr" 1
(and (eq_attr "cpu" "ev6")
! (eq_attr "type" "ibr"))
"ev6_u")
; Calls only issue to L0.
--- 113,119 ----
; Integer branches issue to upper units
(define_insn_reservation "ev6_ibr" 1
(and (eq_attr "cpu" "ev6")
! (eq_attr "type" "ibr,callpal"))
"ev6_u")
; Calls only issue to L0.