OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [config/] [or32/] [or32.md] - Diff between revs 154 and 247

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 154 Rev 247
Line 1... Line 1...
;; Machine description for GNU compiler, OpenRISC 1000 family, OR32 ISA
;; Machine description for GNU compiler, OpenRISC 1000 family, OR32 ISA
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software
 
;; Foundation, Inc.
;; Contributed by Damjan Lampret  in 1999.
;; Contributed by Damjan Lampret  in 1999.
;; Major optimizations by Matjaz Breskvar  in 2005.
;; Major optimizations by Matjaz Breskvar  in 2005.
;; Floating point additions by Jungsook Yang  and Julius Baxter 
;; Floating point additions by Jungsook Yang  and
 
;; Julius Baxter 
 
 
;; This file is part of GNU CC.
;; This file is part of GNU CC.
 
 
;; GNU CC is free software; you can redistribute it and/or modify
;; GNU CC is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; it under the terms of the GNU General Public License as published by
Line 25... Line 27...
 
 
(define_attr "type"
(define_attr "type"
  "unknown,load,store,move,extend,logic,add,mul,shift,compare,branch,jump,fp"
  "unknown,load,store,move,extend,logic,add,mul,shift,compare,branch,jump,fp"
  (const_string "unknown"))
  (const_string "unknown"))
 
 
;; Number of instructions
;; Number of machine instructions required to implement an insn.
(define_attr "length" "" (const_int 1))
(define_attr "length" "" (const_int 1))
 
 
 
;; Single delay slot after branch or jump instructions, wich may contain any
 
;; instruction but another branch or jump.
(define_delay (eq_attr "type" "branch,jump")
(define_delay (eq_attr "type" "branch,jump")
               [(and (eq_attr "type" "!branch,jump")
               [(and (eq_attr "type" "!branch,jump")
                     (eq_attr "length" "1")) (nil) (nil)])
                     (eq_attr "length" "1")) (nil) (nil)])
 
 
;; (define_function_unit NAME MULTIPLICITY SIMULTANEITY
;; ALU is modelled as a single functional unit, which is reserved for varying
;;                       TEST READY-DELAY ISSUE-DELAY [CONFLICT-LIST])
;; numbers of slots.
;; MULTIPLICITY - Number of functional units of this type
 
;; SIMULTANEITY - Zero for pipelined functional unit
 
;; READY-DELAY - Number of cycles before result is available
 
;; ISSUE-DELAY - Number of cycles before unit can accept new instruction
 
;;
;;
;(define_function_unit "bit_unit" 1 0 (eq_attr "type" "shift") 3 1)
;; I think this is all incorrect for the OR1K. The latency says when the
;(define_function_unit "lsu" 1 0 (eq_attr "type" "load") 3 3)
;; result will be ready, not how long the pipeline takes to execute.
;(define_function_unit "lsu" 1 0 (eq_attr "type" "store") 2 1)
 
;(define_function_unit "alu" 1 0 (eq_attr "type" "add,logic,extend,move,compare") 2 1)
 
;(define_function_unit "mul_unit" 1 0 (eq_attr "type" "mul") 16 16)
 
(define_cpu_unit "or32_alu")
(define_cpu_unit "or32_alu")
(define_insn_reservation "bit_unit" 3 (eq_attr "type" "shift") "or32_alu")
(define_insn_reservation "bit_unit" 3 (eq_attr "type" "shift") "or32_alu")
(define_insn_reservation "lsu_load" 3 (eq_attr "type" "load") "or32_alu*3")
(define_insn_reservation "lsu_load" 3 (eq_attr "type" "load") "or32_alu*3")
(define_insn_reservation "lsu_store" 2 (eq_attr "type" "store") "or32_alu")
(define_insn_reservation "lsu_store" 2 (eq_attr "type" "store") "or32_alu")
(define_insn_reservation "alu_unit" 2 (eq_attr "type" "add,logic,extend,move,compare") "or32_alu")
(define_insn_reservation "alu_unit" 2
 
                         (eq_attr "type" "add,logic,extend,move,compare")
 
                         "or32_alu")
(define_insn_reservation "mul_unit" 16 (eq_attr "type" "mul") "or32_alu*16")
(define_insn_reservation "mul_unit" 16 (eq_attr "type" "mul") "or32_alu*16")
 
 


;; Called after register allocation to add any instructions needed for the
;; Called after register allocation to add any instructions needed for the
;; prologue.  Using a prologue insn is favored compared to putting all of the
;; prologue.  Using a prologue insn is favored compared to putting all of the

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.