(define_automaton "niagara4_0")
-(define_cpu_unit "n4_slot0,n4_slot1" "niagara4_0")
-(define_reservation "n4_single_issue" "n4_slot0 + n4_slot1")
+(define_cpu_unit "n4_slot0,n4_slot1,n4_slot2" "niagara4_0")
+(define_reservation "n4_single_issue" "n4_slot0 + n4_slot1 + n4_slot2")
+
+(define_cpu_unit "n4_load_store" "niagara4_0")
(define_insn_reservation "n4_single" 1
(and (eq_attr "cpu" "niagara4")
- (eq_attr "type" "multi,savew,flushw,iflush,trap,gsr"))
+ (eq_attr "type" "multi,savew,flushw,iflush,trap"))
"n4_single_issue")
(define_insn_reservation "n4_integer" 1
(define_insn_reservation "n4_imul" 12
(and (eq_attr "cpu" "niagara4")
(eq_attr "type" "imul"))
- "(n4_slot0 | n4_slot1), nothing*11")
+ "n4_slot1, nothing*11")
(define_insn_reservation "n4_idiv" 35
(and (eq_attr "cpu" "niagara4")
(eq_attr "type" "idiv"))
- "(n4_slot0 | n4_slot1), nothing*34")
+ "n4_slot1, nothing*34")
(define_insn_reservation "n4_load" 5
(and (eq_attr "cpu" "niagara4")
(eq_attr "type" "load,fpload,sload"))
- "n4_slot0, nothing*4")
+ "(n4_slot0 + n4_load_store), nothing*4")
(define_insn_reservation "n4_store" 1
(and (eq_attr "cpu" "niagara4")
(eq_attr "type" "store,fpstore"))
- "n4_slot0")
+ "(n4_slot0 | n4_slot2) + n4_load_store")
(define_insn_reservation "n4_cti" 2
(and (eq_attr "cpu" "niagara4")
(eq_attr "type" "array,edge,edgen"))
"n4_slot1, nothing*11")
-(define_insn_reservation "n4_vis" 11
+(define_insn_reservation "n4_vis_move_1cycle" 1
+ (and (eq_attr "cpu" "niagara4")
+ (and (eq_attr "type" "vismv")
+ (eq_attr "fptype" "double")))
+ "n4_slot1")
+
+(define_insn_reservation "n4_vis_move_11cycle" 11
+ (and (eq_attr "cpu" "niagara4")
+ (and (eq_attr "type" "vismv")
+ (eq_attr "fptype" "single")))
+ "n4_slot1, nothing*10")
+
+(define_insn_reservation "n4_vis_logical" 3
+ (and (eq_attr "cpu" "niagara4")
+ (and (eq_attr "type" "visl,pdistn")
+ (eq_attr "fptype" "double")))
+ "n4_slot1, nothing*2")
+
+(define_insn_reservation "n4_vis_logical_11cycle" 11
+ (and (eq_attr "cpu" "niagara4")
+ (and (eq_attr "type" "visl")
+ (eq_attr "fptype" "single")))
+ "n4_slot1, nothing*10")
+
+(define_insn_reservation "n4_vis_fga" 11
+ (and (eq_attr "cpu" "niagara4")
+ (eq_attr "type" "fga,gsr"))
+ "n4_slot1, nothing*10")
+
+(define_insn_reservation "n4_vis_fgm" 11
(and (eq_attr "cpu" "niagara4")
- (eq_attr "type" "fga,fgm_pack,fgm_mul,fgm_pdist"))
+ (eq_attr "type" "fgm_pack,fgm_mul,pdist"))
"n4_slot1, nothing*10")
(define_insn_reservation "n4_fpdivs" 24
fpcmp,
fpmul,fpdivs,fpdivd,
fpsqrts,fpsqrtd,
- fga,fgm_pack,fgm_mul,fgm_pdist,edge,edgen,gsr,array,
+ fga,visl,vismv,fgm_pack,fgm_mul,pdist,pdistn,edge,edgen,gsr,array,
cmove,
ialuX,
multi,savew,flushw,iflush,trap"
st\t%1, %0
fzeros\t%0
fones\t%0"
- [(set_attr "type" "*,*,load,store,*,*,fpmove,fpload,fpstore,fga,fga")
+ [(set_attr "type" "*,*,load,store,vismv,vismv,fpmove,fpload,fpstore,visl,visl")
(set_attr "cpu_feature" "*,*,*,*,vis3,vis3,*,*,*,vis,vis")])
(define_insn "*movsi_lo_sum"
std\t%1, %0
fzero\t%0
fone\t%0"
- [(set_attr "type" "store,store,store,load,*,*,*,*,fpstore,fpload,*,*,fpmove,*,*,*,fpload,fpstore,fga,fga")
+ [(set_attr "type" "store,store,store,load,*,*,*,*,fpstore,fpload,*,*,fpmove,*,*,*,fpload,fpstore,visl,visl")
(set_attr "length" "*,2,*,*,2,2,2,2,*,*,2,2,*,2,2,2,*,*,*,*")
(set_attr "fptype" "*,*,*,*,*,*,*,*,*,*,*,*,double,*,*,*,*,*,double,double")
(set_attr "cpu_feature" "v9,*,*,*,*,*,*,*,fpu,fpu,fpu,fpu,v9,fpunotv9,vis3,vis3,fpu,fpu,vis,vis")])
std\t%1, %0
fzero\t%0
fone\t%0"
- [(set_attr "type" "*,*,load,store,*,*,fpmove,fpload,fpstore,fga,fga")
+ [(set_attr "type" "*,*,load,store,vismv,vismv,fpmove,fpload,fpstore,visl,visl")
(set_attr "fptype" "*,*,*,*,*,*,double,*,*,double,double")
(set_attr "cpu_feature" "*,*,*,*,vis3,vis3,*,*,*,vis,vis")])
gcc_unreachable ();
}
}
- [(set_attr "type" "fga,fga,fpmove,*,*,*,*,*,fpload,load,fpstore,store")
+ [(set_attr "type" "visl,visl,fpmove,*,*,*,vismv,vismv,fpload,load,fpstore,store")
(set_attr "cpu_feature" "vis,vis,fpu,*,*,*,vis3,vis3,fpu,*,fpu,*")])
;; The following 3 patterns build SFmode constants in integer registers.
#
#
#"
- [(set_attr "type" "fga,fga,fpmove,*,*,*,fpload,store,fpstore,load,store,*,*,*,*")
+ [(set_attr "type" "visl,visl,fpmove,*,*,*,fpload,store,fpstore,load,store,*,*,*,*")
(set_attr "length" "*,*,*,2,2,2,*,*,*,*,*,2,2,2,2")
(set_attr "fptype" "double,double,double,*,*,*,*,*,*,*,*,*,*,*,*")
(set_attr "cpu_feature" "vis,vis,v9,fpunotv9,vis3,vis3,fpu,v9,fpu,*,*,fpu,*,*,fpu")])
ldx\t%1, %0
stx\t%r1, %0
#"
- [(set_attr "type" "fga,fga,fpmove,*,*,load,store,*,load,store,*")
+ [(set_attr "type" "visl,visl,fpmove,vismv,vismv,load,store,*,load,store,*")
(set_attr "length" "*,*,*,*,*,*,*,*,*,*,2")
(set_attr "fptype" "double,double,double,double,double,*,*,*,*,*,*")
(set_attr "cpu_feature" "vis,vis,fpu,vis3,vis3,fpu,fpu,*,*,*,*")])
"@
fzeros\t%0
fones\t%0
- fsrc1s\t%1, %0
+ fsrc2s\t%1, %0
ld\t%1, %0
st\t%1, %0
st\t%r1, %0
mov\t%1, %0
movstouw\t%1, %0
movwtos\t%1, %0"
- [(set_attr "type" "fga,fga,fga,fpload,fpstore,store,load,store,*,*,*")
+ [(set_attr "type" "visl,visl,vismv,fpload,fpstore,store,load,store,*,vismv,vismv")
(set_attr "cpu_feature" "vis,vis,vis,*,*,*,*,*,*,vis3,vis3")])
(define_insn "*mov<VM64:mode>_insn_sp64"
"@
fzero\t%0
fone\t%0
- fsrc1\t%1, %0
+ fsrc2\t%1, %0
ldd\t%1, %0
std\t%1, %0
stx\t%r1, %0
movdtox\t%1, %0
movxtod\t%1, %0
mov\t%1, %0"
- [(set_attr "type" "fga,fga,fga,fpload,fpstore,store,load,store,*,*,*")
+ [(set_attr "type" "visl,visl,vismv,fpload,fpstore,store,load,store,vismv,vismv,*")
(set_attr "cpu_feature" "vis,vis,vis,*,*,*,*,*,vis3,vis3,*")])
(define_insn "*mov<VM64:mode>_insn_sp32"
"@
fzero\t%0
fone\t%0
- fsrc1\t%1, %0
+ fsrc2\t%1, %0
#
#
ldd\t%1, %0
std\t%1, %0
#
#"
- [(set_attr "type" "fga,fga,fga,*,*,fpload,fpstore,store,load,store,*,*")
+ [(set_attr "type" "visl,visl,vismv,*,*,fpload,fpstore,store,load,store,*,*")
(set_attr "length" "*,*,*,2,2,*,*,*,*,*,2,2")
(set_attr "cpu_feature" "vis,vis,vis,vis3,vis3,*,*,*,*,*,*,*")])
(match_operand:VL 2 "register_operand" "<vconstr>")))]
"TARGET_VIS"
"f<vlinsn><vlsuf>\t%1, %2, %0"
- [(set_attr "type" "fga")
+ [(set_attr "type" "visl")
(set_attr "fptype" "<vfptype>")])
(define_insn "*not_<code><mode>3"
(match_operand:VL 2 "register_operand" "<vconstr>"))))]
"TARGET_VIS"
"f<vlninsn><vlsuf>\t%1, %2, %0"
- [(set_attr "type" "fga")
+ [(set_attr "type" "visl")
(set_attr "fptype" "<vfptype>")])
;; (ior (not (op1)) (not (op2))) is the canonical form of NAND.
(not:VL (match_operand:VL 2 "register_operand" "<vconstr>"))))]
"TARGET_VIS"
"fnand<vlsuf>\t%1, %2, %0"
- [(set_attr "type" "fga")
+ [(set_attr "type" "visl")
(set_attr "fptype" "<vfptype>")])
(define_code_iterator vlnotop [ior and])
(match_operand:VL 2 "register_operand" "<vconstr>")))]
"TARGET_VIS"
"f<vlinsn>not1<vlsuf>\t%1, %2, %0"
- [(set_attr "type" "fga")
+ [(set_attr "type" "visl")
(set_attr "fptype" "<vfptype>")])
(define_insn "*<code>_not2<mode>_vis"
(not:VL (match_operand:VL 2 "register_operand" "<vconstr>"))))]
"TARGET_VIS"
"f<vlinsn>not2<vlsuf>\t%1, %2, %0"
- [(set_attr "type" "fga")
+ [(set_attr "type" "visl")
(set_attr "fptype" "<vfptype>")])
(define_insn "one_cmpl<mode>2"
(not:VL (match_operand:VL 1 "register_operand" "<vconstr>")))]
"TARGET_VIS"
"fnot1<vlsuf>\t%1, %0"
- [(set_attr "type" "fga")
+ [(set_attr "type" "visl")
(set_attr "fptype" "<vfptype>")])
;; Hard to generate VIS instructions. We have builtins for these.
UNSPEC_PDIST))]
"TARGET_VIS"
"pdist\t%1, %2, %0"
- [(set_attr "type" "fgm_pdist")
+ [(set_attr "type" "pdist")
(set_attr "fptype" "double")])
;; Edge instructions produce condition codes equivalent to a 'subcc'
UNSPEC_FCMP))]
"TARGET_VIS"
"fcmp<code><GCM:gcm_name>\t%1, %2, %0"
- [(set_attr "type" "fga")
+ [(set_attr "type" "visl")
(set_attr "fptype" "double")])
(define_expand "vcond<mode><mode>"
UNSPEC_PDISTN))]
"TARGET_VIS3"
"pdistn\t%1, %2, %0"
- [(set_attr "type" "fgm_pdist")
+ [(set_attr "type" "pdistn")
(set_attr "fptype" "double")])
(define_insn "fmean16_vis"
UNSPEC_FUCMP))]
"TARGET_VIS3"
"fucmp<code>8\t%1, %2, %0"
- [(set_attr "type" "fga")])
+ [(set_attr "type" "visl")])
(define_insn "*naddsf3"
[(set (match_operand:SF 0 "register_operand" "=f")