2003-05-29 03:31:43 +00:00
|
|
|
//===- Sparc.td - Target Description for Sparc V9 Target --------*- C++ -*-===//
|
|
|
|
// vim:ft=cpp
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Format #2 classes
|
|
|
|
//
|
|
|
|
class F2 : InstV9 { // Format 2 instructions
|
|
|
|
bits<3> op2;
|
2003-08-04 05:03:18 +00:00
|
|
|
let op = 0; // Op = 0
|
|
|
|
let Inst{24-22} = op2;
|
2003-05-29 03:31:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Format 2.1 instructions
|
|
|
|
class F2_1<string name> : F2 {
|
|
|
|
bits<22> imm;
|
2003-06-05 23:33:15 +00:00
|
|
|
bits<5> rd;
|
2003-05-29 03:31:43 +00:00
|
|
|
|
2003-08-04 05:03:18 +00:00
|
|
|
let Name = name;
|
|
|
|
let Inst{29-25} = rd;
|
|
|
|
let Inst{21-0} = imm;
|
2003-05-29 03:31:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class F2_br : F2 { // Format 2 Branch instruction
|
2003-08-04 05:03:18 +00:00
|
|
|
let isBranch = 1; // All instances are branch instructions
|
2003-05-29 03:31:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class F2_2<bits<4> cond, string name> : F2_br { // Format 2.2 instructions
|
|
|
|
bits<22> disp;
|
2003-06-05 23:33:15 +00:00
|
|
|
bit annul;
|
2003-05-29 03:31:43 +00:00
|
|
|
|
2003-08-04 05:03:18 +00:00
|
|
|
let Name = name;
|
|
|
|
let Inst{29} = annul;
|
|
|
|
let Inst{28-25} = cond;
|
|
|
|
let Inst{21-0} = disp;
|
2003-05-29 03:31:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class F2_3<bits<4> cond, string name> : F2_br { // Format 2.3 instructions
|
2003-06-05 23:33:15 +00:00
|
|
|
bits<2> cc;
|
2003-05-29 03:31:43 +00:00
|
|
|
bits<19> disp;
|
2003-07-15 21:26:49 +00:00
|
|
|
bit predict = 1;
|
2003-06-05 23:33:15 +00:00
|
|
|
bit annul;
|
2003-05-29 03:31:43 +00:00
|
|
|
|
2003-08-04 05:03:18 +00:00
|
|
|
let Name = name;
|
|
|
|
let Inst{29} = annul;
|
|
|
|
let Inst{28-25} = cond;
|
|
|
|
let Inst{21-20} = cc;
|
|
|
|
let Inst{19} = 1; // predict;
|
|
|
|
let Inst{18-0} = disp;
|
2003-05-29 03:31:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class F2_4<bits<3> rcond, string name> : F2_br { // Format 2.4 instructions
|
2003-06-05 23:33:15 +00:00
|
|
|
bits<5> rs1;
|
|
|
|
bits<16> disp;
|
2003-07-15 21:26:49 +00:00
|
|
|
bit predict = 1;
|
2003-06-05 23:33:15 +00:00
|
|
|
bit annul;
|
2003-05-29 03:31:43 +00:00
|
|
|
|
2003-08-04 05:03:18 +00:00
|
|
|
let Name = name;
|
|
|
|
let Inst{29} = annul;
|
|
|
|
let Inst{28} = 0;
|
|
|
|
let Inst{27-25} = rcond;
|
|
|
|
let Inst{21-20} = disp{15-14};
|
|
|
|
let Inst{19} = 1; // predict;
|
|
|
|
let Inst{18-14} = rs1;
|
|
|
|
let Inst{13-0 } = disp{13-0};
|
2003-05-29 03:31:43 +00:00
|
|
|
}
|