2004-02-25 21:02:21 +00:00
|
|
|
//===- SparcV8Instrs.td - Target Description for SparcV8 Target -----------===//
|
2004-02-25 19:28:19 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file was developed by the LLVM research group and is distributed under
|
|
|
|
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2004-02-25 21:02:21 +00:00
|
|
|
// This file describes the SparcV8 instructions in TableGen format.
|
2004-02-25 19:28:19 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2004-02-25 21:02:21 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2004-02-26 00:37:12 +00:00
|
|
|
// Instruction format superclass
|
2004-02-25 21:02:21 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2004-02-25 19:28:19 +00:00
|
|
|
|
2004-02-25 21:02:21 +00:00
|
|
|
class InstV8 : Instruction { // SparcV8 instruction baseline
|
|
|
|
field bits<32> Inst;
|
|
|
|
|
|
|
|
let Namespace = "V8";
|
|
|
|
|
|
|
|
bits<2> op;
|
|
|
|
let Inst{31-30} = op; // Top two bits are the 'op' field
|
|
|
|
|
|
|
|
// Bit attributes specific to SparcV8 instructions
|
|
|
|
bit isPasi = 0; // Does this instruction affect an alternate addr space?
|
|
|
|
bit isPrivileged = 0; // Is this a privileged instruction?
|
|
|
|
}
|
2004-02-25 19:28:19 +00:00
|
|
|
|
2004-09-22 21:38:42 +00:00
|
|
|
include "SparcV8InstrFormats.td"
|
2004-02-25 19:28:19 +00:00
|
|
|
|
2004-02-26 00:37:12 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Instructions
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2004-02-28 19:37:18 +00:00
|
|
|
// Pseudo instructions.
|
2005-12-16 07:13:26 +00:00
|
|
|
class PseudoInstV8<string asmstr, dag ops> : InstV8 {
|
|
|
|
let AsmString = asmstr;
|
2005-12-16 06:02:58 +00:00
|
|
|
dag OperandList = ops;
|
2004-02-28 19:37:18 +00:00
|
|
|
}
|
2005-12-16 06:02:58 +00:00
|
|
|
def PHI : PseudoInstV8<"PHI", (ops variable_ops)>;
|
2005-12-16 07:13:26 +00:00
|
|
|
def ADJCALLSTACKDOWN : PseudoInstV8<"!ADJCALLSTACKDOWN $amt",
|
|
|
|
(ops i32imm:$amt)>;
|
|
|
|
def ADJCALLSTACKUP : PseudoInstV8<"!ADJCALLSTACKUP $amt",
|
|
|
|
(ops i32imm:$amt)>;
|
|
|
|
//def IMPLICIT_USE : PseudoInstV8<"!IMPLICIT_USE",(ops variable_ops)>;
|
|
|
|
def IMPLICIT_DEF : PseudoInstV8<"!IMPLICIT_DEF $dst",
|
|
|
|
(ops IntRegs:$dst)>;
|
|
|
|
def FpMOVD : PseudoInstV8<"!FpMOVD", (ops)>; // pseudo 64-bit double move
|
2004-02-28 19:37:18 +00:00
|
|
|
|
2004-03-06 05:32:13 +00:00
|
|
|
// Section A.3 - Synthetic Instructions, p. 85
|
2004-05-08 04:21:32 +00:00
|
|
|
// special cases of JMPL:
|
2004-10-14 22:32:49 +00:00
|
|
|
let isReturn = 1, isTerminator = 1, hasDelaySlot = 1 in {
|
|
|
|
let rd = I7.Num, rs1 = G0.Num, simm13 = 8 in
|
2005-12-16 06:25:42 +00:00
|
|
|
def RET : F3_2<2, 0b111000,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"ret $b, $c, $dst">;
|
2004-10-14 22:32:49 +00:00
|
|
|
let rd = O7.Num, rs1 = G0.Num, simm13 = 8 in
|
2005-12-16 07:10:02 +00:00
|
|
|
def RETL: F3_2<2, 0b111000, (ops),
|
|
|
|
"retl">;
|
2004-10-14 22:32:49 +00:00
|
|
|
}
|
2004-05-08 04:21:32 +00:00
|
|
|
// CMP is a special case of SUBCC where destination is ignored, by setting it to
|
|
|
|
// %g0 (hardwired zero).
|
|
|
|
// FIXME: should keep track of the fact that it defs the integer condition codes
|
|
|
|
let rd = 0 in
|
2005-12-16 06:25:42 +00:00
|
|
|
def CMPri: F3_2<2, 0b010100,
|
2005-12-17 06:54:41 +00:00
|
|
|
(ops IntRegs:$b, i32imm:$c),
|
|
|
|
"cmp $b, $c">;
|
2004-04-02 20:53:37 +00:00
|
|
|
|
|
|
|
// Section B.1 - Load Integer Instructions, p. 90
|
2005-12-16 06:25:42 +00:00
|
|
|
def LDSB: F3_2<3, 0b001001,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"ldsb [$b+$c], $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def LDSH: F3_2<3, 0b001010,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"ldsh [$b+$c], $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def LDUB: F3_2<3, 0b000001,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"ldub [$b+$c], $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def LDUH: F3_2<3, 0b000010,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"lduh [$b+$c], $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def LD : F3_2<3, 0b000000,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"ld [$b+$c], $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def LDD : F3_2<3, 0b000011,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"ldd [$b+$c], $dst">;
|
2004-04-02 20:53:37 +00:00
|
|
|
|
2004-06-18 05:19:27 +00:00
|
|
|
// Section B.2 - Load Floating-point Instructions, p. 92
|
2005-12-16 06:25:42 +00:00
|
|
|
def LDFrr : F3_1<3, 0b100000,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
2005-12-16 07:10:02 +00:00
|
|
|
"ld [$b+$c], $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def LDFri : F3_2<3, 0b100000,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"ld [$b+$c], $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def LDDFrr : F3_1<3, 0b100011,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
2005-12-16 07:10:02 +00:00
|
|
|
"ldd [$b+$c], $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def LDDFri : F3_2<3, 0b100011,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"ldd [$b+$c], $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def LDFSRrr: F3_1<3, 0b100001,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
2005-12-16 07:10:02 +00:00
|
|
|
"ld [$b+$c], $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def LDFSRri: F3_2<3, 0b100001,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"ld [$b+$c], $dst">;
|
2004-06-18 05:19:27 +00:00
|
|
|
|
2004-04-02 20:53:37 +00:00
|
|
|
// Section B.4 - Store Integer Instructions, p. 95
|
2005-12-16 06:25:42 +00:00
|
|
|
def STB : F3_2<3, 0b000101,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$base, IntRegs:$offset, i32imm:$src),
|
|
|
|
"stb $src, [$base+$offset]">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def STH : F3_2<3, 0b000110,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$base, IntRegs:$offset, i32imm:$src),
|
|
|
|
"sth $src, [$base+$offset]">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ST : F3_2<3, 0b000100,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$base, IntRegs:$offset, i32imm:$src),
|
|
|
|
"st $src, [$base+$offset]">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def STD : F3_2<3, 0b000111,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$base, IntRegs:$offset, i32imm:$src),
|
|
|
|
"std $src, [$base+$offset]">;
|
2004-06-24 07:36:59 +00:00
|
|
|
|
|
|
|
// Section B.5 - Store Floating-point Instructions, p. 97
|
2005-12-16 06:25:42 +00:00
|
|
|
def STFrr : F3_1<3, 0b100100,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$base, IntRegs:$offset, IntRegs:$src),
|
|
|
|
"st $src, [$base+$offset]">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def STFri : F3_2<3, 0b100100,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$base, IntRegs:$offset, i32imm:$src),
|
|
|
|
"st $src, [$base+$offset]">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def STDFrr : F3_1<3, 0b100111,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$base, IntRegs:$offset, IntRegs:$src),
|
|
|
|
"std $src, [$base+$offset]">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def STDFri : F3_2<3, 0b100111,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$base, IntRegs:$offset, i32imm:$src),
|
|
|
|
"std $src, [$base+$offset]">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def STFSRrr : F3_1<3, 0b100101,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$base, IntRegs:$offset, IntRegs:$src),
|
|
|
|
"st $src, [$base+$offset]">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def STFSRri : F3_2<3, 0b100101,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$base, IntRegs:$offset, i32imm:$src),
|
|
|
|
"st $src, [$base+$offset]">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def STDFQrr : F3_1<3, 0b100110,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$base, IntRegs:$offset, IntRegs:$src),
|
|
|
|
"std $src, [$base+$offset]">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def STDFQri : F3_2<3, 0b100110,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$base, IntRegs:$offset, i32imm:$src),
|
|
|
|
"std $src, [$base+$offset]">;
|
2004-02-26 00:37:12 +00:00
|
|
|
|
2004-03-04 04:37:45 +00:00
|
|
|
// Section B.9 - SETHI Instruction, p. 104
|
2005-12-16 07:18:48 +00:00
|
|
|
def SETHIi: F2_1<0b100,
|
|
|
|
(ops IntRegs:$dst, i32imm:$src),
|
|
|
|
"sethi $src, $dst">;
|
2004-03-04 00:56:25 +00:00
|
|
|
|
2004-04-02 20:53:37 +00:00
|
|
|
// Section B.10 - NOP Instruction, p. 105
|
|
|
|
// (It's a special case of SETHI)
|
2004-10-14 22:33:32 +00:00
|
|
|
let rd = 0, imm22 = 0 in
|
2005-12-16 07:18:48 +00:00
|
|
|
def NOP : F2_1<0b100, (ops), "nop">;
|
2004-04-02 20:53:37 +00:00
|
|
|
|
2004-03-03 23:03:14 +00:00
|
|
|
// Section B.11 - Logical Instructions, p. 106
|
2005-12-16 06:25:42 +00:00
|
|
|
def ANDrr : F3_1<2, 0b000001,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"and $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ANDri : F3_2<2, 0b000001,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"and $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ANDCCrr : F3_1<2, 0b010001,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"andcc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ANDCCri : F3_2<2, 0b010001,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"andcc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ANDNrr : F3_1<2, 0b000101,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"andn $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ANDNri : F3_2<2, 0b000101,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"andn $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ANDNCCrr: F3_1<2, 0b010101,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"andncc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ANDNCCri: F3_2<2, 0b010101,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"andncc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ORrr : F3_1<2, 0b000010,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"or $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ORri : F3_2<2, 0b000010,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"or $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ORCCrr : F3_1<2, 0b010010,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"orcc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ORCCri : F3_2<2, 0b010010,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"orcc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ORNrr : F3_1<2, 0b000110,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"orn $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ORNri : F3_2<2, 0b000110,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"orn $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ORNCCrr : F3_1<2, 0b010110,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"orncc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ORNCCri : F3_2<2, 0b010110,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"orncc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def XORrr : F3_1<2, 0b000011,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"xor $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def XORri : F3_2<2, 0b000011,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"xor $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def XORCCrr : F3_1<2, 0b010011,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"xorcc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def XORCCri : F3_2<2, 0b010011,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"xorcc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def XNORrr : F3_1<2, 0b000111,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"xnor $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def XNORri : F3_2<2, 0b000111,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"xnor $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def XNORCCrr: F3_1<2, 0b010111,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"xnorcc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def XNORCCri: F3_2<2, 0b010111,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"xnorcc $b, $c, $dst">;
|
2004-03-03 23:03:14 +00:00
|
|
|
|
|
|
|
// Section B.12 - Shift Instructions, p. 107
|
2005-12-16 06:25:42 +00:00
|
|
|
def SLLrr : F3_1<2, 0b100101,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"sll $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SLLri : F3_2<2, 0b100101,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"sll $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SRLrr : F3_1<2, 0b100110,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"srl $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SRLri : F3_2<2, 0b100110,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"srl $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SRArr : F3_1<2, 0b100111,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"sra $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SRAri : F3_2<2, 0b100111,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"sla $b, $c, $dst">;
|
2004-03-03 23:03:14 +00:00
|
|
|
|
|
|
|
// Section B.13 - Add Instructions, p. 108
|
2005-12-16 06:25:42 +00:00
|
|
|
def ADDrr : F3_1<2, 0b000000,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"add $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ADDri : F3_2<2, 0b000000,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"add $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ADDCCrr : F3_1<2, 0b010000,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"addcc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ADDCCri : F3_2<2, 0b010000,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"addcc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ADDXrr : F3_1<2, 0b001000,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"addx $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ADDXri : F3_2<2, 0b001000,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"addx $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ADDXCCrr: F3_1<2, 0b011000,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"addxcc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def ADDXCCri: F3_2<2, 0b011000,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"addxcc $b, $c, $dst">;
|
2004-03-03 23:03:14 +00:00
|
|
|
|
2004-03-04 04:37:45 +00:00
|
|
|
// Section B.15 - Subtract Instructions, p. 110
|
2005-12-16 06:25:42 +00:00
|
|
|
def SUBrr : F3_1<2, 0b000100,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"sub $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SUBri : F3_2<2, 0b000100,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"sub $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SUBCCrr : F3_1<2, 0b010100,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"subcc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SUBCCri : F3_2<2, 0b010100,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"subcc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SUBXrr : F3_1<2, 0b001100,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"subx $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SUBXri : F3_2<2, 0b001100,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"subx $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SUBXCCrr: F3_1<2, 0b011100,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"subxcc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SUBXCCri: F3_2<2, 0b011100,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"subxcc $b, $c, $dst">;
|
2004-03-04 04:37:45 +00:00
|
|
|
|
2004-03-16 22:37:13 +00:00
|
|
|
// Section B.18 - Multiply Instructions, p. 113
|
2005-12-16 06:25:42 +00:00
|
|
|
def UMULrr : F3_1<2, 0b001010,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"umul $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def UMULri : F3_2<2, 0b001010,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"umul $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SMULrr : F3_1<2, 0b001011,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"smul $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SMULri : F3_2<2, 0b001011,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"smul $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def UMULCCrr: F3_1<2, 0b011010,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"umulcc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def UMULCCri: F3_2<2, 0b011010,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"umulcc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SMULCCrr: F3_1<2, 0b011011,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"smulcc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SMULCCri: F3_2<2, 0b011011,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"smulcc $b, $c, $dst">;
|
2004-03-16 22:37:13 +00:00
|
|
|
|
2004-04-07 04:01:00 +00:00
|
|
|
// Section B.19 - Divide Instructions, p. 115
|
2005-12-16 06:25:42 +00:00
|
|
|
def UDIVrr : F3_1<2, 0b001110,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"udiv $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def UDIVri : F3_2<2, 0b001110,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"udiv $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SDIVrr : F3_1<2, 0b001111,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"sdiv $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SDIVri : F3_2<2, 0b001111,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"sdiv $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def UDIVCCrr : F3_1<2, 0b011110,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"udivcc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def UDIVCCri : F3_2<2, 0b011110,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"udivcc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SDIVCCrr : F3_1<2, 0b011111,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"sdivcc $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SDIVCCri : F3_2<2, 0b011111,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"sdivcc $b, $c, $dst">;
|
2004-04-07 04:01:00 +00:00
|
|
|
|
2004-03-06 05:32:13 +00:00
|
|
|
// Section B.20 - SAVE and RESTORE, p. 117
|
2005-12-16 06:25:42 +00:00
|
|
|
def SAVErr : F3_1<2, 0b111100,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"save $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def SAVEri : F3_2<2, 0b111100,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"save $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def RESTORErr : F3_1<2, 0b111101,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"restore $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def RESTOREri : F3_2<2, 0b111101,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"restore $b, $c, $dst">;
|
2004-03-06 05:32:13 +00:00
|
|
|
|
2004-05-08 04:21:32 +00:00
|
|
|
// Section B.21 - Branch on Integer Condition Codes Instructions, p. 119
|
2004-06-17 22:34:29 +00:00
|
|
|
|
|
|
|
// conditional branch class:
|
2005-12-17 06:54:41 +00:00
|
|
|
class BranchV8<bits<4> cc, dag ops, string asmstr>
|
|
|
|
: F2_2<cc, 0b010, ops, asmstr> {
|
2004-06-17 22:34:29 +00:00
|
|
|
let isBranch = 1;
|
|
|
|
let isTerminator = 1;
|
2004-09-30 04:04:48 +00:00
|
|
|
let hasDelaySlot = 1;
|
2004-06-17 22:34:29 +00:00
|
|
|
}
|
2004-07-31 02:24:37 +00:00
|
|
|
|
|
|
|
let isBarrier = 1 in
|
2005-12-17 06:54:41 +00:00
|
|
|
def BA : BranchV8<0b1000, (ops IntRegs:$dst), "ba $dst">;
|
|
|
|
def BN : BranchV8<0b0000, (ops IntRegs:$dst), "bn $dst">;
|
|
|
|
def BNE : BranchV8<0b1001, (ops IntRegs:$dst), "bne $dst">;
|
|
|
|
def BE : BranchV8<0b0001, (ops IntRegs:$dst), "be $dst">;
|
|
|
|
def BG : BranchV8<0b1010, (ops IntRegs:$dst), "bg $dst">;
|
|
|
|
def BLE : BranchV8<0b0010, (ops IntRegs:$dst), "ble $dst">;
|
|
|
|
def BGE : BranchV8<0b1011, (ops IntRegs:$dst), "bge $dst">;
|
|
|
|
def BL : BranchV8<0b0011, (ops IntRegs:$dst), "bl $dst">;
|
|
|
|
def BGU : BranchV8<0b1100, (ops IntRegs:$dst), "bgu $dst">;
|
|
|
|
def BLEU : BranchV8<0b0100, (ops IntRegs:$dst), "bleu $dst">;
|
|
|
|
def BCC : BranchV8<0b1101, (ops IntRegs:$dst), "bcc $dst">;
|
|
|
|
def BCS : BranchV8<0b0101, (ops IntRegs:$dst), "bcs $dst">;
|
2004-05-08 04:21:32 +00:00
|
|
|
|
2004-07-08 09:08:22 +00:00
|
|
|
// Section B.22 - Branch on Floating-point Condition Codes Instructions, p. 121
|
|
|
|
|
|
|
|
// floating-point conditional branch class:
|
2005-12-17 06:54:41 +00:00
|
|
|
class FPBranchV8<bits<4> cc, dag ops, string asmstr>
|
|
|
|
: F2_2<cc, 0b110, ops, asmstr> {
|
2004-07-08 09:08:22 +00:00
|
|
|
let isBranch = 1;
|
|
|
|
let isTerminator = 1;
|
2004-09-30 04:04:48 +00:00
|
|
|
let hasDelaySlot = 1;
|
2004-07-08 09:08:22 +00:00
|
|
|
}
|
|
|
|
|
2005-12-17 06:54:41 +00:00
|
|
|
def FBA : FPBranchV8<0b1000, (ops IntRegs:$dst), "fba $dst">;
|
|
|
|
def FBN : FPBranchV8<0b0000, (ops IntRegs:$dst), "fbn $dst">;
|
|
|
|
def FBU : FPBranchV8<0b0111, (ops IntRegs:$dst), "fbu $dst">;
|
|
|
|
def FBG : FPBranchV8<0b0110, (ops IntRegs:$dst), "fbg $dst">;
|
|
|
|
def FBUG : FPBranchV8<0b0101, (ops IntRegs:$dst), "fbug $dst">;
|
|
|
|
def FBL : FPBranchV8<0b0100, (ops IntRegs:$dst), "fbl $dst">;
|
|
|
|
def FBUL : FPBranchV8<0b0011, (ops IntRegs:$dst), "fbul $dst">;
|
|
|
|
def FBLG : FPBranchV8<0b0010, (ops IntRegs:$dst), "fblg $dst">;
|
|
|
|
def FBNE : FPBranchV8<0b0001, (ops IntRegs:$dst), "fbne $dst">;
|
|
|
|
def FBE : FPBranchV8<0b1001, (ops IntRegs:$dst), "fbe $dst">;
|
|
|
|
def FBUE : FPBranchV8<0b1010, (ops IntRegs:$dst), "fbue $dst">;
|
|
|
|
def FBGE : FPBranchV8<0b1011, (ops IntRegs:$dst), "fbge $dst">;
|
|
|
|
def FBUGE: FPBranchV8<0b1100, (ops IntRegs:$dst), "fbuge $dst">;
|
|
|
|
def FBLE : FPBranchV8<0b1101, (ops IntRegs:$dst), "fble $dst">;
|
|
|
|
def FBULE: FPBranchV8<0b1110, (ops IntRegs:$dst), "fbule $dst">;
|
|
|
|
def FBO : FPBranchV8<0b1111, (ops IntRegs:$dst), "fbo $dst">;
|
2004-07-08 09:08:22 +00:00
|
|
|
|
2004-11-16 07:32:09 +00:00
|
|
|
|
|
|
|
|
2004-04-02 20:53:37 +00:00
|
|
|
// Section B.24 - Call and Link Instruction, p. 125
|
2004-03-06 05:32:13 +00:00
|
|
|
// This is the only Format 1 instruction
|
2004-11-16 07:32:09 +00:00
|
|
|
let Uses = [O0, O1, O2, O3, O4, O5], hasDelaySlot = 1, isCall = 1 in {
|
2004-09-30 04:04:48 +00:00
|
|
|
// pc-relative call:
|
2004-11-16 07:32:09 +00:00
|
|
|
let Defs = [O0, O1, O2, O3, O4, O5, O7, G1, G2, G3, G4, G5, G6, G7,
|
|
|
|
D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14, D15] in
|
2004-09-29 20:45:05 +00:00
|
|
|
def CALL : InstV8 {
|
2005-12-17 06:54:41 +00:00
|
|
|
let OperandList = (ops IntRegs:$dst);
|
2004-09-29 20:45:05 +00:00
|
|
|
bits<30> disp;
|
|
|
|
let op = 1;
|
|
|
|
let Inst{29-0} = disp;
|
2005-12-17 06:54:41 +00:00
|
|
|
let AsmString = "call $dst";
|
2004-09-29 20:45:05 +00:00
|
|
|
}
|
2004-11-16 07:32:09 +00:00
|
|
|
|
|
|
|
// indirect call (O7 is an EXPLICIT def in indirect calls, so it cannot also
|
|
|
|
// be an implicit def):
|
|
|
|
let Defs = [O0, O1, O2, O3, O4, O5, G1, G2, G3, G4, G5, G6, G7,
|
|
|
|
D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14, D15] in
|
2005-12-16 06:52:00 +00:00
|
|
|
def JMPLrr : F3_1<2, 0b111000,
|
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"jmpl $b+$c, $dst">;
|
2004-09-29 20:45:05 +00:00
|
|
|
}
|
2004-02-26 00:37:12 +00:00
|
|
|
|
2004-04-07 04:06:46 +00:00
|
|
|
// Section B.29 - Write State Register Instructions
|
2005-12-16 06:25:42 +00:00
|
|
|
def WRrr : F3_1<2, 0b110000,
|
2005-12-16 06:52:00 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, IntRegs:$c),
|
|
|
|
"wr $b, $c, $dst">;
|
2005-12-16 06:25:42 +00:00
|
|
|
def WRri : F3_2<2, 0b110000,
|
2005-12-16 07:10:02 +00:00
|
|
|
(ops IntRegs:$dst, IntRegs:$b, i32imm:$c),
|
|
|
|
"wr $b, $c, $dst">;
|
2004-04-07 05:04:01 +00:00
|
|
|
|
2004-06-27 22:53:56 +00:00
|
|
|
// Convert Integer to Floating-point Instructions, p. 141
|
2005-12-17 06:32:52 +00:00
|
|
|
def FITOS : F3_3<2, 0b110100, 0b011000100,
|
|
|
|
(ops FPRegs:$dst, FPRegs:$src),
|
|
|
|
"fitos $src, $dst">;
|
|
|
|
def FITOD : F3_3<2, 0b110100, 0b011001000,
|
|
|
|
(ops DFPRegs:$dst, DFPRegs:$src),
|
|
|
|
"fitod $src, $dst">;
|
2004-06-27 22:53:56 +00:00
|
|
|
|
2004-10-14 19:39:35 +00:00
|
|
|
// Convert Floating-point to Integer Instructions, p. 142
|
2005-12-17 06:32:52 +00:00
|
|
|
def FSTOI : F3_3<2, 0b110100, 0b011010001,
|
|
|
|
(ops FPRegs:$dst, FPRegs:$src),
|
|
|
|
"fstoi $src, $dst">;
|
|
|
|
def FDTOI : F3_3<2, 0b110100, 0b011010010,
|
|
|
|
(ops DFPRegs:$dst, DFPRegs:$src),
|
|
|
|
"fdtoi $src, $dst">;
|
2004-10-14 19:39:35 +00:00
|
|
|
|
2004-06-24 21:22:09 +00:00
|
|
|
// Convert between Floating-point Formats Instructions, p. 143
|
2005-12-17 06:32:52 +00:00
|
|
|
def FSTOD : F3_3<2, 0b110100, 0b011001001,
|
|
|
|
(ops DFPRegs:$dst, FPRegs:$src),
|
|
|
|
"fstod $src, $dst">;
|
|
|
|
def FDTOS : F3_3<2, 0b110100, 0b011000110,
|
|
|
|
(ops FPRegs:$dst, DFPRegs:$src),
|
|
|
|
"fdtos $src, $dst">;
|
2004-06-24 21:22:09 +00:00
|
|
|
|
2004-06-18 06:28:10 +00:00
|
|
|
// Floating-point Move Instructions, p. 144
|
2005-12-17 06:32:52 +00:00
|
|
|
def FMOVS : F3_3<2, 0b110100, 0b000000001,
|
|
|
|
(ops FPRegs:$dst, FPRegs:$src),
|
|
|
|
"fmovs $src, $dst">;
|
|
|
|
def FNEGS : F3_3<2, 0b110100, 0b000000101,
|
|
|
|
(ops FPRegs:$dst, FPRegs:$src),
|
|
|
|
"fnegs $src, $dst">;
|
|
|
|
def FABSS : F3_3<2, 0b110100, 0b000001001,
|
|
|
|
(ops FPRegs:$dst, FPRegs:$src),
|
|
|
|
"fabss $src, $dst">;
|
2004-06-18 06:28:10 +00:00
|
|
|
|
2004-06-27 22:53:56 +00:00
|
|
|
// Floating-point Add and Subtract Instructions, p. 146
|
2005-12-17 06:32:52 +00:00
|
|
|
def FADDS : F3_3<2, 0b110100, 0b001000001,
|
|
|
|
(ops FPRegs:$dst, FPRegs:$src1, FPRegs:$src2),
|
|
|
|
"fadds $src1, $src2, $dst">;
|
|
|
|
def FADDD : F3_3<2, 0b110100, 0b001000010,
|
|
|
|
(ops DFPRegs:$dst, DFPRegs:$src1, DFPRegs:$src2),
|
|
|
|
"faddd $src1, $src2, $dst">;
|
|
|
|
def FSUBS : F3_3<2, 0b110100, 0b001000101,
|
|
|
|
(ops FPRegs:$dst, FPRegs:$src1, FPRegs:$src2),
|
|
|
|
"fsubs $src1, $src2, $dst">;
|
|
|
|
def FSUBD : F3_3<2, 0b110100, 0b001000110,
|
|
|
|
(ops DFPRegs:$dst, DFPRegs:$src1, DFPRegs:$src2),
|
|
|
|
"fsubd $src1, $src2, $dst">;
|
2004-06-27 22:53:56 +00:00
|
|
|
|
|
|
|
// Floating-point Multiply and Divide Instructions, p. 147
|
2005-12-17 06:32:52 +00:00
|
|
|
def FMULS : F3_3<2, 0b110100, 0b001001001,
|
|
|
|
(ops FPRegs:$dst, FPRegs:$src1, FPRegs:$src2),
|
|
|
|
"fmuls $src1, $src2, $dst">;
|
|
|
|
def FMULD : F3_3<2, 0b110100, 0b001001010,
|
|
|
|
(ops DFPRegs:$dst, DFPRegs:$src1, DFPRegs:$src2),
|
|
|
|
"fmuld $src1, $src2, $dst">;
|
|
|
|
def FSMULD : F3_3<2, 0b110100, 0b001101001,
|
|
|
|
(ops DFPRegs:$dst, FPRegs:$src1, FPRegs:$src2),
|
|
|
|
"fsmuld $src1, $src2, $dst">;
|
|
|
|
def FDIVS : F3_3<2, 0b110100, 0b001001101,
|
|
|
|
(ops FPRegs:$dst, FPRegs:$src1, FPRegs:$src2),
|
|
|
|
"fdivs $src1, $src2, $dst">;
|
|
|
|
def FDIVD : F3_3<2, 0b110100, 0b001001110,
|
|
|
|
(ops DFPRegs:$dst, DFPRegs:$src1, DFPRegs:$src2),
|
|
|
|
"fdivd $src1, $src2, $dst">;
|
2004-06-24 21:22:09 +00:00
|
|
|
|
2004-07-08 09:08:22 +00:00
|
|
|
// Floating-point Compare Instructions, p. 148
|
2004-09-30 04:04:48 +00:00
|
|
|
// Note: the 2nd template arg is different for these guys.
|
|
|
|
// Note 2: the result of a FCMP is not available until the 2nd cycle
|
|
|
|
// after the instr is retired, but there is no interlock. This behavior
|
2005-12-17 06:32:52 +00:00
|
|
|
// is modelled with a forced noop after the instruction.
|
|
|
|
def FCMPS : F3_3<2, 0b110101, 0b001010001,
|
|
|
|
(ops FPRegs:$src1, FPRegs:$src2),
|
2005-12-17 06:54:41 +00:00
|
|
|
"fcmps $src1, $src2\n\tnop">;
|
2005-12-17 06:32:52 +00:00
|
|
|
def FCMPD : F3_3<2, 0b110101, 0b001010010,
|
|
|
|
(ops DFPRegs:$src1, DFPRegs:$src2),
|
2005-12-17 06:54:41 +00:00
|
|
|
"fcmpd $src1, $src2\n\tnop">;
|
2005-12-17 06:32:52 +00:00
|
|
|
def FCMPES : F3_3<2, 0b110101, 0b001010101,
|
|
|
|
(ops FPRegs:$src1, FPRegs:$src2),
|
2005-12-17 06:54:41 +00:00
|
|
|
"fcmpes $src1, $src2\n\tnop">;
|
2005-12-17 06:32:52 +00:00
|
|
|
def FCMPED : F3_3<2, 0b110101, 0b001010110,
|
|
|
|
(ops DFPRegs:$src1, DFPRegs:$src2),
|
2005-12-17 06:54:41 +00:00
|
|
|
"fcmped $src1, $src2\n\tnop">;
|