mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
1a21909e98
This patch adds support for the z13 processor type and its vector facility, and adds MC support for all new instructions provided by that facilily. Apart from defining the new instructions, the main changes are: - Adding VR128, VR64 and VR32 register classes. - Making FP64 a subclass of VR64 and FP32 a subclass of VR32. - Adding a D(V,B) addressing mode for scatter/gather operations - Adding 1-, 2-, and 3-bit immediate operands for some 4-bit fields. Until now all immediate operands have been the same width as the underlying field (hence the assert->return change in decode[SU]ImmOperand). In addition, sys::getHostCPUName is extended to detect running natively on a z13 machine. Based on a patch by Richard Sandiford. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236520 91177308-0d34-0410-b5e6-96231b3b80d8
97 lines
3.5 KiB
TableGen
97 lines
3.5 KiB
TableGen
//===-- SystemZ.td - SystemZ processors and features ---------*- tblgen -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Processor and feature definitions.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
class SystemZFeature<string extname, string intname, string desc>
|
|
: Predicate<"Subtarget->has"##intname##"()">,
|
|
AssemblerPredicate<"Feature"##intname, extname>,
|
|
SubtargetFeature<extname, "Has"##intname, "true", desc>;
|
|
|
|
class SystemZMissingFeature<string intname>
|
|
: Predicate<"!Subtarget->has"##intname##"()">;
|
|
|
|
def FeatureDistinctOps : SystemZFeature<
|
|
"distinct-ops", "DistinctOps",
|
|
"Assume that the distinct-operands facility is installed"
|
|
>;
|
|
|
|
def FeatureLoadStoreOnCond : SystemZFeature<
|
|
"load-store-on-cond", "LoadStoreOnCond",
|
|
"Assume that the load/store-on-condition facility is installed"
|
|
>;
|
|
|
|
def FeatureHighWord : SystemZFeature<
|
|
"high-word", "HighWord",
|
|
"Assume that the high-word facility is installed"
|
|
>;
|
|
|
|
def FeatureFPExtension : SystemZFeature<
|
|
"fp-extension", "FPExtension",
|
|
"Assume that the floating-point extension facility is installed"
|
|
>;
|
|
|
|
def FeaturePopulationCount : SystemZFeature<
|
|
"population-count", "PopulationCount",
|
|
"Assume that the population-count facility is installed"
|
|
>;
|
|
|
|
def FeatureFastSerialization : SystemZFeature<
|
|
"fast-serialization", "FastSerialization",
|
|
"Assume that the fast-serialization facility is installed"
|
|
>;
|
|
|
|
def FeatureInterlockedAccess1 : SystemZFeature<
|
|
"interlocked-access1", "InterlockedAccess1",
|
|
"Assume that interlocked-access facility 1 is installed"
|
|
>;
|
|
def FeatureNoInterlockedAccess1 : SystemZMissingFeature<"InterlockedAccess1">;
|
|
|
|
def FeatureMiscellaneousExtensions : SystemZFeature<
|
|
"miscellaneous-extensions", "MiscellaneousExtensions",
|
|
"Assume that the miscellaneous-extensions facility is installed"
|
|
>;
|
|
|
|
def FeatureTransactionalExecution : SystemZFeature<
|
|
"transactional-execution", "TransactionalExecution",
|
|
"Assume that the transactional-execution facility is installed"
|
|
>;
|
|
|
|
def FeatureProcessorAssist : SystemZFeature<
|
|
"processor-assist", "ProcessorAssist",
|
|
"Assume that the processor-assist facility is installed"
|
|
>;
|
|
|
|
def FeatureVector : SystemZFeature<
|
|
"vector", "Vector",
|
|
"Assume that the vectory facility is installed"
|
|
>;
|
|
def FeatureNoVector : SystemZMissingFeature<"Vector">;
|
|
|
|
def : Processor<"generic", NoItineraries, []>;
|
|
def : Processor<"z10", NoItineraries, []>;
|
|
def : Processor<"z196", NoItineraries,
|
|
[FeatureDistinctOps, FeatureLoadStoreOnCond, FeatureHighWord,
|
|
FeatureFPExtension, FeaturePopulationCount,
|
|
FeatureFastSerialization, FeatureInterlockedAccess1]>;
|
|
def : Processor<"zEC12", NoItineraries,
|
|
[FeatureDistinctOps, FeatureLoadStoreOnCond, FeatureHighWord,
|
|
FeatureFPExtension, FeaturePopulationCount,
|
|
FeatureFastSerialization, FeatureInterlockedAccess1,
|
|
FeatureMiscellaneousExtensions,
|
|
FeatureTransactionalExecution, FeatureProcessorAssist]>;
|
|
def : Processor<"z13", NoItineraries,
|
|
[FeatureDistinctOps, FeatureLoadStoreOnCond, FeatureHighWord,
|
|
FeatureFPExtension, FeaturePopulationCount,
|
|
FeatureFastSerialization, FeatureInterlockedAccess1,
|
|
FeatureTransactionalExecution, FeatureProcessorAssist,
|
|
FeatureVector]>;
|