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: Balaji V. Iyer<bviyer@n...>
    Date: Sun Dec 9 09:55:36 CET 2007
    Subject: [openrisc] Help with another constraint
    Top
    Hello Everyone,
    I am trying to partition register files in GCC port of Opencores
    (OPENRISC 1000). It is currently failing the following constraint in
    negdi2

    (insn 15 13 16 (set (mem:SI (plus:SI (reg/f:SI 2 r2)
    (const_int -28 [0xffffffe4])) [0 D.1256+0 S4 A32])
    (neg:SI (reg:SI 3 r3 [orig:80 D.1255 ] [80]))) 38 {negsi2} (nil)
    (nil))
    ../../gcc-4.0.2/gcc/libgcc2.c:72: internal compiler error: in
    final_scan_insn, at final.c:2439
    Please submit a full bug report,


    REGISTER R2 is the frame pointer!!

    I think this is because of the way I am handling the frame
    pointer...This is how I do it in the or32.h file



    #define FRAME_POINTER_REGNUM 2
    #define FRAME_POINTER_REQUIRED 0

    #define INITIAL_FRAME_POINTER_OFFSET(DEPTH)
    \
    { int regno;
    \
    int offset = 0;
    \
    for( regno=0; regno < FIRST_PSEUDO_REGISTER; regno++ )
    \
    if( regs_ever_live[regno] && !call_used_regs[regno] )
    \
    offset += 4;
    \
    (DEPTH) = (!current_function_is_leaf || regs_ever_live[LINK_REGNUM] ?
    4 : 0) + \
    (frame_pointer_needed ? 4 : 0)
    + \
    offset
    + \
    OR32_ALIGN(current_function_outgoing_args_size,4)
    + \
    OR32_ALIGN(get_frame_size(),4);
    \
    }


    #define FIX_FRAME_POINTER_ADDRESS(ADDR,DEPTH) \
    { int offset = -1;
    \
    rtx regs = stack_pointer_rtx;
    \
    if (ADDR == frame_pointer_rtx)
    \
    offset = 0;
    \
    else if (GET_CODE (ADDR) == PLUS && XEXP (ADDR, 1) ==
    frame_pointer_rtx \
    && GET_CODE (XEXP (ADDR, 0)) == CONST_INT)
    \
    offset = INTVAL (XEXP (ADDR, 0));
    \
    else if (GET_CODE (ADDR) == PLUS && XEXP (ADDR, 0) ==
    frame_pointer_rtx \
    && GET_CODE (XEXP (ADDR, 1)) == CONST_INT)
    \
    offset = INTVAL (XEXP (ADDR, 1));
    \
    else if (GET_CODE (ADDR) == PLUS && XEXP (ADDR, 0) ==
    frame_pointer_rtx) \
    { rtx other_reg = XEXP (ADDR, 1);
    \
    offset = 0;
    \
    regs = gen_rtx (PLUS, Pmode, stack_pointer_rtx, other_reg); }
    \
    else if (GET_CODE (ADDR) == PLUS && XEXP (ADDR, 1) ==
    frame_pointer_rtx) \
    { rtx other_reg = XEXP (ADDR, 0);
    \
    offset = 0;
    \
    regs = gen_rtx (PLUS, Pmode, stack_pointer_rtx, other_reg); }
    \
    if (offset >= 0)
    \
    { int regno;
    \
    extern char call_used_regs[];
    \
    offset += 4; /* I don't know why??? */
    \
    for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
    \
    if (regs_ever_live[regno] && ! call_used_regs[regno])
    \
    offset += 4;
    \
    ADDR = plus_constant (regs, offset + (DEPTH)); } } What am I doing wrong?? ANy help is highly highly appreciated! Yours Sincerely, Balaji V. Iyer. -- Balaji V. Iyer PhD Student, Center for Efficient, Scalable and Reliable Computing, Department of Electrical and Computer Engineering, North Carolina State University.

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