LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Find Resources
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Openrisc > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: =?unknown-8bit?Q?Gy=F6rgy?= 'nog' Jeney<nog@s...>
    Date: Mon Mar 28 09:40:58 CEST 2005
    Subject: [openrisc] [or1ksim #52] Remove useless indirection
    Top
    Hi,

    This removes a useless indirection: check_depend()->depend_operands().

    ChangeLog:
    * Remove useless indirection: check_depend()->depend_operands().

    nog.
    -------------- next part --------------
    diff -urp --unidirectional-new-file /home/nog/or1ksim-split/cpu/common/stats.c ./cpu/common/stats.c
    --- /home/nog/or1ksim-split/cpu/common/stats.c 2005-02-09 18:03:36.000000000 +0100
    +++ ./cpu/common/stats.c 2005-02-12 11:26:50.000000000 +0100
    @@ -59,14 +59,6 @@
    struct dmmustats_entry dmmu_stats = {0}; /* data mmu stats */
    struct raw_stats raw_stats = {0}; /* RAW hazard stats */

    -/* Dependency */
    -
    -int check_depend()
    -{
    - debug(5,"check_depend\n");
    - return depend_operands(&icomplet[0], &iqueue[0]);
    -}
    -
    void addsstats(int item, int cnt_dynamic)
    {
    int i = 0;
    --- /home/nog/or1ksim-split/cpu/common/stats.h 2004-02-03 15:23:16.000000000 +0100
    +++ ./cpu/common/stats.h 2005-02-12 11:06:14.000000000 +0100
    @@ -102,7 +102,6 @@
    extern struct dmmustats_entry dmmu_stats;
    extern struct raw_stats raw_stats;

    -extern int check_depend();
    extern void addsstats(int item, int cnt_dynamic);
    extern void adddstats(int item1, int item2, int cnt_dynamic, int depend);
    extern void addfstats(enum insn_type item1, enum insn_type item2, int cnt_dynamic, int depend);
    --- cpu/or32/execute.c 2005-03-21 20:08:39.000000000 +0100
    +++ /home/nog/or1ksim-split/cpu/or32/execute.c 2005-03-23 16:48:00.000000000 +0100
    @@ -204,7 +204,7 @@
    dst: flag src: flag always 1
    */

    -int depend_operands(prev, next)
    +static int check_depend(prev, next)
    struct iqueue_entry *prev;
    struct iqueue_entry *next;
    {
    @@ -323,11 +323,13 @@
    {
    if (config.cpu.dependstats) {
    /* Dynamic, dependency stats. */
    - adddstats(icomplet[0].insn_index, current->insn_index, 1, check_depend());
    + adddstats(icomplet[0].insn_index, current->insn_index, 1,
    + check_depend(icomplet, current));

    /* Dynamic, functional units stats. */
    addfstats(or32_opcodes[icomplet[0].insn_index].func_unit,
    - or32_opcodes[current->insn_index].func_unit, 1, check_depend());
    + or32_opcodes[current->insn_index].func_unit, 1,
    + check_depend(icomplet, current));

    /* Dynamic, single stats. */
    addsstats(current->insn_index, 1);
    @@ -350,13 +352,13 @@

    /* Pseudo multiple issue benchmark */
    if ((multissue[or32_opcodes[current->insn_index].func_unit] < 1) ||
    - (check_depend()) || (issued_per_cycle < 1)) {
    + (check_depend(icomplet, current)) || (issued_per_cycle < 1)) {
    int i;
    for (i = 0; i < 20; i++)
    multissue[i] = 2;
    issued_per_cycle = 2;
    runtime.cpu.supercycles++;
    - if (check_depend())
    + if (check_depend(icomplet, current))
    runtime.cpu.hazardwait++;
    multissue[it_unknown] = 2;
    multissue[it_shift] = 2;

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.