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: Matjaz Breskvar <phoenix@o...>
    Date: Thu, 13 Nov 2003 03:50:11 +0100
    Subject: Re: [openrisc] ABI & TLB changes (was: Optimization Problems)
    Top

    
    before i reply to Pablos email, i'd like to point out one more time that
    we intend to make changes to MMU (TLB) to make it easier to use and also
    more efficient. if someone has any arguments againt it now would be the
    best time ;)
    
    * pablo.huerta@a... (pablo.huerta@a...) wrote:
    > Hi again:
    > 
    > The bugs I have found and the way to solve them are the following:
    
    <snip>
     
    > That's all the changes that must be done in or32.md. I think that this
    > changes will solve most of the optimization problems. I don't have
    > tested it with GCC 3.2.3, but in 3.4 they work fine.
    
    Thanks for the analysis. if you have time it would be great if you can
    just fix it in opencores cvs (for gcc-3.1 and gcc-3.2.3).
     
    > Now, changes I think that must be made in or32.S:
    > 
    > If the ABI has not changed since the last time, Calle-Saved Registers
    > are: r10, r13, r15, r17, r19, r21, r23, r25, r27, r29 and r31, so if
    > you use them inside a function call, you should save them at function
    > entry and restore them at function exit, so in file or32.S you should do:
    > 
    >    in function ___udivsi3, the instruction "l.addi          r13,r0,32"
    >  should use another register (r12 for example) instead of r13, or you
    > should save r13 in function entry for restoring it in function exit.
    > The same happens with registers r15 and r17 in manay instructions. I
    > think that the easiest way to solve that problem is to replace every
    > usage of r13 for r12, r15 for r14, and r17 for r16.
    
    this is the thing where ABI defined in arch manual doesn't correspond with
    what's actually implemented and will be corrected. since there is alot
    of code written that conforms to what's actually implemented we
    will correct the arch manual. i'm sorry for the confusion but i it will be
    much easier to change the arch manual.
    
    
    this is the definition from opencores gcc.
    
     /* 1 for registers not available across function calls.
        These must include the FIXED_REGISTERS and also any
        registers that can be used without being saved.
        The latter must include the registers where values are returned
        and the register where structure-value addresses are passed.
        Aside from that, you can include as many other registers as you like.
    */
    #define CALL_USED_REGISTERS {1, 1, 1, 1, 1, 1, 1, 1,   1, 1, 0, 1, 0, 1, 0, 1 \
                                 , 0, 1, 0, 1, 0, 1, 0, 1,  0, 1, 0, 1, 0, 1, 0, 1}
    
    
    the other stuff that i found to need fixing in arch manual can be viewed at
    
    http://entrance <dot> dyndns <dot> org/SplitBrain/index.php?x=.%2For1k%2Ferrata
    
    regards,
    p.
    
    
    

    ReferenceAuthor
    Re: [openrisc] Optimization ProblemsPablo huerta

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