CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
114 lines
4.2 KiB
TableGen
114 lines
4.2 KiB
TableGen
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file describes the RISC-V instructions from the standard 'Zvvm' family
|
|
// of Integrated Matrix extensions.
|
|
// These extensions are still experimental as they haven't been ratified yet.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// Instructions
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
def VScaleAsmOperand : AsmOperandClass {
|
|
let Name = "RVVScaleRegOpOperand";
|
|
let RenderMethod = "addRegOperands";
|
|
let PredicateMethod = "isV0Reg";
|
|
let ParserMethod = "parseVScaleReg";
|
|
let DiagnosticType = "InvalidVScaleRegister";
|
|
let DiagnosticString = "operand must be v0.scale";
|
|
}
|
|
|
|
// An always present v0.scale operand encoded with vm=0. Classes that use this
|
|
// must set the vm field in RVInstV* to 0.
|
|
def VScaleOp : RegisterOperand<VMV0> {
|
|
let ParserMatchClass = VScaleAsmOperand;
|
|
let PrintMethod = "printVScaleReg";
|
|
let EncoderMethod = "getVMaskReg";
|
|
let DecoderMethod = "decodeVMaskReg";
|
|
}
|
|
|
|
class VIMEMACVV<bits<6> funct6, string opcodestr>
|
|
: RVInstVV<funct6, OPIVV, (outs VR:$vd_wb),
|
|
(ins VR:$vd, VR:$vs1, VR:$vs2), opcodestr,
|
|
"$vd, $vs1, $vs2"> {
|
|
let mayLoad = 0;
|
|
let mayStore = 0;
|
|
let hasSideEffects = 0;
|
|
let Constraints = "$vd = $vd_wb";
|
|
let vm = 1;
|
|
let VMConstraint = false;
|
|
}
|
|
|
|
class VFMEMACVV<bits<6> funct6, string opcodestr>
|
|
: RVInstVV<funct6, OPFVV, (outs VR:$vd_wb),
|
|
(ins VR:$vd, VR:$vs1, VR:$vs2), opcodestr,
|
|
"$vd, $vs1, $vs2"> {
|
|
let mayLoad = 0;
|
|
let mayStore = 0;
|
|
let hasSideEffects = 0;
|
|
let Constraints = "$vd = $vd_wb";
|
|
let Uses = [FRM, VL, VTYPE];
|
|
let mayRaiseFPException = true;
|
|
let vm = 1;
|
|
let VMConstraint = false;
|
|
}
|
|
|
|
class VFMEMACScaleVV<bits<6> funct6, string opcodestr>
|
|
: RVInstVV<funct6, OPFVV, (outs VR:$vd_wb),
|
|
(ins VR:$vd, VR:$vs1, VR:$vs2, VScaleOp:$vm), opcodestr,
|
|
"$vd, $vs1, $vs2$vm"> {
|
|
let mayLoad = 0;
|
|
let mayStore = 0;
|
|
let hasSideEffects = 0;
|
|
let Constraints = "$vd = $vd_wb";
|
|
let Uses = [FRM, VL, VTYPE];
|
|
let mayRaiseFPException = true;
|
|
let vm = 0;
|
|
let VMConstraint = false;
|
|
}
|
|
|
|
class VIFMEMACScaleVV<bits<6> funct6, string opcodestr>
|
|
: RVInstVV<funct6, OPIVV, (outs VR:$vd_wb),
|
|
(ins VR:$vd, VR:$vs1, VR:$vs2, VScaleOp:$vm), opcodestr,
|
|
"$vd, $vs1, $vs2$vm"> {
|
|
let mayLoad = 0;
|
|
let mayStore = 0;
|
|
let hasSideEffects = 0;
|
|
let Constraints = "$vd = $vd_wb";
|
|
let Uses = [FRM, VL, VTYPE];
|
|
let mayRaiseFPException = true;
|
|
let vm = 0;
|
|
let VMConstraint = false;
|
|
}
|
|
|
|
let Predicates = [HasStdExtZvvmm] in {
|
|
def VMMACC_VV : VIMEMACVV<0b111000, "vmmacc.vv">;
|
|
def VWMMACC_VV : VIMEMACVV<0b111001, "vwmmacc.vv">;
|
|
def VQMMACC_VV : VIMEMACVV<0b111010, "vqmmacc.vv">;
|
|
def V8WMMACC_VV : VIMEMACVV<0b111011, "v8wmmacc.vv">;
|
|
} // Predicates = [HasStdExtZvvmm]
|
|
|
|
let Predicates = [HasStdExtZvvfmm] in {
|
|
def VFMMACC_VV : VFMEMACVV<0b010100, "vfmmacc.vv">;
|
|
def VFWMMACC_VV : VFMEMACVV<0b010101, "vfwmmacc.vv">;
|
|
def VFQMMACC_VV : VFMEMACVV<0b010110, "vfqmmacc.vv">;
|
|
def VF8WMMACC_VV : VFMEMACVV<0b010111, "vf8wmmacc.vv">;
|
|
def VFWMMACC_VV_SCALE : VFMEMACScaleVV<0b010101, "vfwmmacc.vv">;
|
|
def VFQMMACC_VV_SCALE : VFMEMACScaleVV<0b010110, "vfqmmacc.vv">;
|
|
def VF8WMMACC_VV_SCALE : VFMEMACScaleVV<0b010111, "vf8wmmacc.vv">;
|
|
// FIXME: The integer-input MX forms should be gated by the
|
|
// Zvvxi*/Zvvxni* microscaling extensions once LLVM models those
|
|
// individual extension names. They are temporarily enabled under
|
|
// experimental-zvvfmm for MC bring-up.
|
|
def VFWIMMACC_VV : VIFMEMACScaleVV<0b111001, "vfwimmacc.vv">;
|
|
def VFQIMMACC_VV : VIFMEMACScaleVV<0b111010, "vfqimmacc.vv">;
|
|
def VF8WIMMACC_VV : VIFMEMACScaleVV<0b111011, "vf8wimmacc.vv">;
|
|
} // Predicates = [HasStdExtZvvfmm]
|