|
| 1 | +;; DFA scheduling description of the Synopsys RMX-100 cpu |
| 2 | +;; for GNU C compiler |
| 3 | +;; Copyright (C) 2023 Free Software Foundation, Inc. |
| 4 | + |
| 5 | +;; This file is part of GCC. |
| 6 | + |
| 7 | +;; GCC is free software; you can redistribute it and/or modify |
| 8 | +;; it under the terms of the GNU General Public License as published by |
| 9 | +;; the Free Software Foundation; either version 3, or (at your option) |
| 10 | +;; any later version. |
| 11 | + |
| 12 | +;; GCC is distributed in the hope that it will be useful, |
| 13 | +;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | +;; GNU General Public License for more details. |
| 16 | + |
| 17 | +;; You should have received a copy of the GNU General Public License |
| 18 | +;; along with GCC; see the file COPYING3. If not see |
| 19 | +;; <http://www.gnu.org/licenses/>. |
| 20 | + |
| 21 | +(define_automaton "arcv_rmx100") |
| 22 | + |
| 23 | +(define_cpu_unit "arcv_rmx100_ALU" "arcv_rmx100") |
| 24 | +;(define_cpu_unit "arcv_rmx100_CSR" "arcv_rmx100") |
| 25 | +(define_cpu_unit "arcv_rmx100_FPU" "arcv_rmx100") |
| 26 | +(define_cpu_unit "arcv_rmx100_MPY" "arcv_rmx100") |
| 27 | +(define_cpu_unit "arcv_rmx100_DIV" "arcv_rmx100") |
| 28 | +(define_cpu_unit "arcv_rmx100_DMP" "arcv_rmx100") |
| 29 | + |
| 30 | +;; Instruction reservation for arithmetic instructions. |
| 31 | +(define_insn_reservation "arcv_rmx100_alu_arith" 1 |
| 32 | + (and (eq_attr "tune" "arcv_rmx100") |
| 33 | + (eq_attr "type" "unknown, const, arith, shift, slt, multi, auipc, nop, |
| 34 | + logical, move, atomic, mvpair, bitmanip, clz, ctz, cpop, |
| 35 | + zicond, condmove, clmul, min, max, minu, maxu, rotate")) |
| 36 | + "arcv_rmx100_ALU") |
| 37 | + |
| 38 | +(define_insn_reservation "arcv_rmx100_jmp_insn" 1 |
| 39 | + (and (eq_attr "tune" "arcv_rmx100") |
| 40 | + (eq_attr "type" "branch, jump, call, jalr, ret, trap")) |
| 41 | + "arcv_rmx100_ALU") |
| 42 | + |
| 43 | +; DIV insn: latency may be overridden by a define_bypass |
| 44 | +(define_insn_reservation "arcv_rmx100_div_insn" 35 |
| 45 | + (and (eq_attr "tune" "arcv_rmx100") |
| 46 | + (eq_attr "type" "idiv")) |
| 47 | + "arcv_rmx100_DIV*35") |
| 48 | + |
| 49 | +; MPY insn: latency may be overridden by a define_bypass |
| 50 | +(define_insn_reservation "arcv_rmx100_mpy32_insn" 9 |
| 51 | + (and (eq_attr "tune" "arcv_rmx100") |
| 52 | + (eq_attr "type" "imul")) |
| 53 | + "arcv_rmx100_MPY") |
| 54 | + |
| 55 | +(define_insn_reservation "arcv_rmx100_load_insn" 3 |
| 56 | + (and (eq_attr "tune" "arcv_rmx100") |
| 57 | + (eq_attr "type" "load,fpload")) |
| 58 | + "arcv_rmx100_DMP,nothing*2") |
| 59 | + |
| 60 | +(define_insn_reservation "arcv_rmx100_store_insn" 1 |
| 61 | + (and (eq_attr "tune" "arcv_rmx100") |
| 62 | + (eq_attr "type" "store,fpstore")) |
| 63 | + "arcv_rmx100_DMP") |
| 64 | + |
| 65 | +(define_insn_reservation "arcv_rmx100_farith_insn" 2 |
| 66 | + (and (eq_attr "tune" "arcv_rmx100") |
| 67 | + (eq_attr "type" "fadd,fmul,fmadd,fcmp")) |
| 68 | + "arcv_rmx100_FPU*2") |
| 69 | + |
| 70 | +(define_insn_reservation "arcv_rmx100_fdiv_insn" 17 |
| 71 | + (and (eq_attr "tune" "arcv_rmx100") |
| 72 | + (eq_attr "type" "fdiv,fsqrt")) |
| 73 | + "arcv_rmx100_FPU*17") |
| 74 | + |
| 75 | +(define_insn_reservation "arcv_rmx100_xfer" 2 |
| 76 | + (and (eq_attr "tune" "arcv_rmx100") |
| 77 | + (eq_attr "type" "fmove,mtc,mfc,fcvt,fcvt_f2i,fcvt_i2f")) |
| 78 | + "arcv_rmx100_FPU*2") |
| 79 | + |
| 80 | +;;(define_insn_reservation "core" 1 |
| 81 | +;; (eq_attr "type" "block, brk, dmb, flag, lr, sr, sync") |
| 82 | +;; "arcv_rmx100_ALU0 + arcv_rmx100_ALU1 + arcv_rmx100_DMP + arcv_rmx100_MPY + arcv_rmx100_MPY64 + arcv_rmx100_DIV") |
| 83 | + |
| 84 | +(define_insn_reservation "arcv_rmx100_fmul_half" 5 |
| 85 | + (and (eq_attr "tune" "arcv_rmx100") |
| 86 | + (and (eq_attr "type" "fadd,fmul,fmadd") |
| 87 | + (eq_attr "mode" "HF"))) |
| 88 | + "arcv_rmx100_FPU") |
| 89 | + |
| 90 | +(define_insn_reservation "arcv_rmx100_fmul_single" 5 |
| 91 | + (and (eq_attr "tune" "arcv_rmx100") |
| 92 | + (and (eq_attr "type" "fadd,fmul,fmadd") |
| 93 | + (eq_attr "mode" "SF"))) |
| 94 | + "arcv_rmx100_FPU") |
| 95 | + |
| 96 | +(define_insn_reservation "arcv_rmx100_fmul_double" 7 |
| 97 | + (and (eq_attr "tune" "arcv_rmx100") |
| 98 | + (and (eq_attr "type" "fadd,fmul,fmadd") |
| 99 | + (eq_attr "mode" "DF"))) |
| 100 | + "arcv_rmx100_FPU") |
| 101 | + |
| 102 | +(define_insn_reservation "arcv_rmx100_fdiv" 20 |
| 103 | + (and (eq_attr "tune" "arcv_rmx100") |
| 104 | + (eq_attr "type" "fdiv")) |
| 105 | + "arcv_rmx100_FPU*20") |
| 106 | + |
| 107 | +(define_insn_reservation "arcv_rmx100_fsqrt" 25 |
| 108 | + (and (eq_attr "tune" "arcv_rmx100") |
| 109 | + (eq_attr "type" "fsqrt")) |
| 110 | + "arcv_rmx100_FPU*25") |
0 commit comments