1*9880d681SAndroid Build Coastguard Worker//===-- LeonFeatures.td - Describe the Leon Features -------*- tablegen -*-===// 2*9880d681SAndroid Build Coastguard Worker// 3*9880d681SAndroid Build Coastguard Worker// The LLVM Compiler Infrastructure 4*9880d681SAndroid Build Coastguard Worker// 5*9880d681SAndroid Build Coastguard Worker// This file is distributed under the University of Illinois Open Source 6*9880d681SAndroid Build Coastguard Worker// License. See LICENSE.TXT for details. 7*9880d681SAndroid Build Coastguard Worker// 8*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===// 9*9880d681SAndroid Build Coastguard Worker// 10*9880d681SAndroid Build Coastguard Worker// 11*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===// 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===// 14*9880d681SAndroid Build Coastguard Worker// CASA Support differs between LEON3-FT GR712RC and LEON3-FT UT699 15*9880d681SAndroid Build Coastguard Worker// We need to have the option to switch this on and off. 16*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===// 17*9880d681SAndroid Build Coastguard Worker 18*9880d681SAndroid Build Coastguard Worker// support to casa instruction; for leon3 subtarget only 19*9880d681SAndroid Build Coastguard Workerdef LeonCASA : SubtargetFeature< 20*9880d681SAndroid Build Coastguard Worker "hasleoncasa", "HasLeonCasa", "true", 21*9880d681SAndroid Build Coastguard Worker "Enable CASA instruction for LEON3 and LEON4 processors">; 22*9880d681SAndroid Build Coastguard Worker 23*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===// 24*9880d681SAndroid Build Coastguard Worker// UMAC and SMAC support for LEON3 and LEON4 processors. 25*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===// 26*9880d681SAndroid Build Coastguard Worker 27*9880d681SAndroid Build Coastguard Worker// support to casa instruction; for leon3 subtarget only 28*9880d681SAndroid Build Coastguard Workerdef UMACSMACSupport 29*9880d681SAndroid Build Coastguard Worker : SubtargetFeature<"hasumacsmac", "HasUmacSmac", "true", 30*9880d681SAndroid Build Coastguard Worker "Enable UMAC and SMAC for LEON3 and LEON4 processors">; 31*9880d681SAndroid Build Coastguard Worker 32*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===// 33*9880d681SAndroid Build Coastguard Worker// LEON Erratum fixes 34*9880d681SAndroid Build Coastguard Worker//===----------------------------------------------------------------------===// 35*9880d681SAndroid Build Coastguard Worker 36*9880d681SAndroid Build Coastguard Workerdef ReplaceSDIV 37*9880d681SAndroid Build Coastguard Worker : SubtargetFeature< 38*9880d681SAndroid Build Coastguard Worker "replacesdiv", "PerformSDIVReplace", "true", 39*9880d681SAndroid Build Coastguard Worker "AT697E erratum fix: Do not emit SDIV, emit SDIVCC instead">; 40*9880d681SAndroid Build Coastguard Worker 41*9880d681SAndroid Build Coastguard Workerdef FixCALL 42*9880d681SAndroid Build Coastguard Worker : SubtargetFeature<"fixcall", "FixCallImmediates", "true", 43*9880d681SAndroid Build Coastguard Worker "AT697E erratum fix: Restrict the size of the immediate " 44*9880d681SAndroid Build Coastguard Worker "operand of the CALL instruction to 20 bits">; 45*9880d681SAndroid Build Coastguard Worker 46*9880d681SAndroid Build Coastguard Workerdef IgnoreZeroFlag 47*9880d681SAndroid Build Coastguard Worker : SubtargetFeature<"ignrzeroflag", "IgnoreZeroFlag", "true", 48*9880d681SAndroid Build Coastguard Worker "AT697E erratum fix: Do not rely on the zero bit flag " 49*9880d681SAndroid Build Coastguard Worker "on a divide overflow for SDIVCC and UDIVCC">; 50*9880d681SAndroid Build Coastguard Worker 51*9880d681SAndroid Build Coastguard Workerdef InsertNOPDoublePrecision 52*9880d681SAndroid Build Coastguard Worker : SubtargetFeature<"insrtnopdblprcsn", "InsertNOPDoublePrecision", "true", 53*9880d681SAndroid Build Coastguard Worker "LEON2 erratum fix: Insert a NOP before the double " 54*9880d681SAndroid Build Coastguard Worker "precision floating point instruction">; 55*9880d681SAndroid Build Coastguard Worker 56*9880d681SAndroid Build Coastguard Workerdef FixFSMULD : SubtargetFeature<"fixfsmuld", "FixFSMULD", "true", 57*9880d681SAndroid Build Coastguard Worker "LEON3 erratum fix: Do not select FSMULD">; 58*9880d681SAndroid Build Coastguard Worker 59*9880d681SAndroid Build Coastguard Workerdef ReplaceFMULS 60*9880d681SAndroid Build Coastguard Worker : SubtargetFeature<"replacefmuls", "ReplaceFMULS", "true", 61*9880d681SAndroid Build Coastguard Worker "LEON3 erratum fix: Replace FMULS instruction with a " 62*9880d681SAndroid Build Coastguard Worker "routine using conversions/double precision operations " 63*9880d681SAndroid Build Coastguard Worker "to replace FMULS">; 64*9880d681SAndroid Build Coastguard Worker 65*9880d681SAndroid Build Coastguard Workerdef PreventRoundChange 66*9880d681SAndroid Build Coastguard Worker : SubtargetFeature<"prvntroundchange", "PreventRoundChange", "true", 67*9880d681SAndroid Build Coastguard Worker "LEON3 erratum fix: Prevent any rounding mode change " 68*9880d681SAndroid Build Coastguard Worker "request: use only the round-to-nearest rounding mode">; 69*9880d681SAndroid Build Coastguard Worker 70*9880d681SAndroid Build Coastguard Workerdef FixAllFDIVSQRT 71*9880d681SAndroid Build Coastguard Worker : SubtargetFeature<"fixallfdivsqrt", "FixAllFDIVSQRT", "true", 72*9880d681SAndroid Build Coastguard Worker "LEON3 erratum fix: Fix FDIVS/FDIVD/FSQRTS/FSQRTD " 73*9880d681SAndroid Build Coastguard Worker "instructions with NOPs and floating-point store">; 74*9880d681SAndroid Build Coastguard Worker 75*9880d681SAndroid Build Coastguard Workerdef InsertNOPLoad 76*9880d681SAndroid Build Coastguard Worker : SubtargetFeature<"insertnopload", "InsertNOPLoad", "true", 77*9880d681SAndroid Build Coastguard Worker "LEON3 erratum fix: Insert a NOP instruction after " 78*9880d681SAndroid Build Coastguard Worker "every single-cycle load instruction when the next " 79*9880d681SAndroid Build Coastguard Worker "instruction is another load/store instruction">; 80*9880d681SAndroid Build Coastguard Worker 81*9880d681SAndroid Build Coastguard Workerdef FlushCacheLineSWAP 82*9880d681SAndroid Build Coastguard Worker : SubtargetFeature<"flshcachelineswap", "FlushCacheLineSWAP", "true", 83*9880d681SAndroid Build Coastguard Worker "LEON3 erratum fix: Flush cache line containing the " 84*9880d681SAndroid Build Coastguard Worker "lock before performing any of the atomic instructions " 85*9880d681SAndroid Build Coastguard Worker "SWAP and LDSTUB">; 86*9880d681SAndroid Build Coastguard Worker 87*9880d681SAndroid Build Coastguard Workerdef InsertNOPsLoadStore 88*9880d681SAndroid Build Coastguard Worker : SubtargetFeature<"insertnopsloadstore", "InsertNOPsLoadStore", "true", 89*9880d681SAndroid Build Coastguard Worker "LEON3 erratum fix: Insert NOPs between " 90*9880d681SAndroid Build Coastguard Worker "single-precision loads and the store, so the number of " 91*9880d681SAndroid Build Coastguard Worker "instructions between is 4">; 92