Chris Dewhurst | e3b8645 | 2016-05-09 11:55:15 +0000 | [diff] [blame] | 1 | //===-- LeonFeatures.td - Describe the Leon Features -------*- tablegen -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
Chris Dewhurst | 4f7cac3 | 2016-05-23 10:56:36 +0000 | [diff] [blame] | 13 | |
Chris Dewhurst | 3202f06 | 2016-07-08 15:33:56 +0000 | [diff] [blame] | 14 | //===----------------------------------------------------------------------===// |
| 15 | // UMAC and SMAC support for LEON3 and LEON4 processors. |
| 16 | //===----------------------------------------------------------------------===// |
Chris Dewhurst | 0c1e002 | 2016-06-19 11:03:28 +0000 | [diff] [blame] | 17 | |
James Y Knight | 2cc9da9 | 2016-08-12 14:48:09 +0000 | [diff] [blame] | 18 | //support to casa instruction; for leon3 subtarget only |
| 19 | def UMACSMACSupport : SubtargetFeature< |
| 20 | "hasumacsmac", |
| 21 | "HasUmacSmac", |
| 22 | "true", |
| 23 | "Enable UMAC and SMAC for LEON3 and LEON4 processors" |
| 24 | >; |
| 25 | |
Chris Dewhurst | 0c1e002 | 2016-06-19 11:03:28 +0000 | [diff] [blame] | 26 | |
Chris Dewhurst | 3202f06 | 2016-07-08 15:33:56 +0000 | [diff] [blame] | 27 | //===----------------------------------------------------------------------===// |
James Y Knight | 2cc9da9 | 2016-08-12 14:48:09 +0000 | [diff] [blame] | 28 | // CASA Support differs between LEON3-FT GR712RC and LEON3-FT UT699 |
| 29 | // We need to have the option to switch this on and off. |
Chris Dewhurst | 3202f06 | 2016-07-08 15:33:56 +0000 | [diff] [blame] | 30 | //===----------------------------------------------------------------------===// |
Chris Dewhurst | 0c1e002 | 2016-06-19 11:03:28 +0000 | [diff] [blame] | 31 | |
James Y Knight | 2cc9da9 | 2016-08-12 14:48:09 +0000 | [diff] [blame] | 32 | //support to casa instruction; for leon3 subtarget only |
| 33 | def LeonCASA : SubtargetFeature< |
| 34 | "hasleoncasa", |
| 35 | "HasLeonCasa", |
| 36 | "true", |
| 37 | "Enable CASA instruction for LEON3 and LEON4 processors" |
| 38 | >; |
Chris Dewhurst | 3202f06 | 2016-07-08 15:33:56 +0000 | [diff] [blame] | 39 | |
Chris Dewhurst | 8501312 | 2016-10-10 08:53:06 +0000 | [diff] [blame] | 40 | |
| 41 | def ReplaceSDIV : SubtargetFeature< |
| 42 | "replacesdiv", |
| 43 | "PerformSDIVReplace", |
| 44 | "true", |
| 45 | "AT697E erratum fix: Do not emit SDIV, emit SDIVCC instead" |
| 46 | >; |
| 47 | |
James Y Knight | 2cc9da9 | 2016-08-12 14:48:09 +0000 | [diff] [blame] | 48 | def InsertNOPLoad: SubtargetFeature< |
| 49 | "insertnopload", |
| 50 | "InsertNOPLoad", |
| 51 | "true", |
| 52 | "LEON3 erratum fix: Insert a NOP instruction after every single-cycle load instruction when the next instruction is another load/store instruction" |
| 53 | >; |
Chris Dewhurst | 3202f06 | 2016-07-08 15:33:56 +0000 | [diff] [blame] | 54 | |
James Y Knight | 2cc9da9 | 2016-08-12 14:48:09 +0000 | [diff] [blame] | 55 | def FixFSMULD : SubtargetFeature< |
| 56 | "fixfsmuld", |
| 57 | "FixFSMULD", |
| 58 | "true", |
| 59 | "LEON erratum fix: Do not use FSMULD" |
| 60 | >; |
Chris Dewhurst | 3202f06 | 2016-07-08 15:33:56 +0000 | [diff] [blame] | 61 | |
James Y Knight | 2cc9da9 | 2016-08-12 14:48:09 +0000 | [diff] [blame] | 62 | def ReplaceFMULS : SubtargetFeature< |
| 63 | "replacefmuls", |
| 64 | "ReplaceFMULS", |
| 65 | "true", |
| 66 | "LEON erratum fix: Replace FMULS instruction with FMULD and relevant conversion instructions" |
| 67 | >; |
Chris Dewhurst | 3202f06 | 2016-07-08 15:33:56 +0000 | [diff] [blame] | 68 | |
Chris Dewhurst | 2c3cdd6 | 2016-10-19 14:01:06 +0000 | [diff] [blame] | 69 | def DetectRoundChange : SubtargetFeature< |
| 70 | "detectroundchange", |
| 71 | "DetectRoundChange", |
| 72 | "true", |
| 73 | "LEON3 erratum detection: Detects any rounding mode change " |
| 74 | "request: use only the round-to-nearest rounding mode" |
| 75 | >; |
| 76 | |
James Y Knight | 2cc9da9 | 2016-08-12 14:48:09 +0000 | [diff] [blame] | 77 | def FixAllFDIVSQRT : SubtargetFeature< |
| 78 | "fixallfdivsqrt", |
| 79 | "FixAllFDIVSQRT", |
| 80 | "true", |
| 81 | "LEON erratum fix: Fix FDIVS/FDIVD/FSQRTS/FSQRTD instructions with NOPs and floating-point store" |
| 82 | >; |