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

Subversion Repositories or1k

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 1250 to Rev 1251
    Reverse comparison

Rev 1250 → Rev 1251

/trunk/gdb-5.3/gdb/or1k-tdep.c
783,15 → 783,27
pc += OR1K_INSTLEN;
 
/* Get the link register */
insn = or1k_fetch_instruction (pc);
if ((insn & 0xfc1ff800) != 0xd4014800) /* l.sw I(r1),r9 */
goto fp_save;
immediate_hi = (insn & 0x03E00000) >> 10;
immediate = (insn & 0x000007FF) | immediate_hi;
pc += OR1K_INSTLEN;
if (fi)
saved_reg_frame_offset[9] = saved_reg_frame_offset[PC_REGNUM] = immediate;
 
fp_save:
insn = or1k_fetch_instruction (pc);
if ((insn & 0xfc1ff800) != 0xd4011000) /* l.sw I(r1),r2 */
goto done;
goto fp_adjust;
immediate_hi = (insn & 0x03E00000) >> 10;
immediate = (insn & 0x000007FF) | immediate_hi;
pc += OR1K_INSTLEN;
if (fi)
saved_reg_frame_offset[2] = immediate;
saved_reg_frame_offset[2] = immediate;
 
fp_adjust:
insn = or1k_fetch_instruction (pc);
if ((insn & 0xFFFF0000) != 0x9c410000) /* l.addi r2,r1,I */
goto done;
881,6 → 893,11
/* Look for the storage of the frame pointer in the
function prologue.. */
unsigned long insn = read_memory_integer(func_pc+4,4);
 
/* If this is not the l.sw I(r1),r2 we're looking for,
give it a second try. */
if( (insn&0xFC1FF800) != 0xd4011000 )
insn = read_memory_integer(func_pc+8,4);
/* If bits are 31 - 26 are %110101,
and bits 20 - 16 are %00001,
962,18 → 979,6
fi->saved_regs[PC_REGNUM] = read_register(LR_REGNUM);
}
 
void or1k_init_frame_pc(int leaf, struct frame_info *frame)
{
struct frame_info *next=frame->next;
if(frame->saved_regs==NULL)
or1k_init_saved_regs(frame);
frame->pc=frame->saved_regs[PC_REGNUM];
 
if(next->saved_regs==NULL)
or1k_init_saved_regs(next);
frame->pc=next->saved_regs[LR_REGNUM];
};
 
static CORE_ADDR
read_next_frame_reg (fi, regno)
struct frame_info *fi;
/trunk/gdb-5.3/gdb/config/or1k/tm-or1k.h
382,12 → 382,15
 
/* FRAME_CHAIN takes a frame's nominal address
and produces the frame's chain-pointer. */
extern CORE_ADDR or1k_frame_chain PARAMS ((struct frame_info *));
#define FRAME_CHAIN(thisframe) (CORE_ADDR) or1k_frame_chain (thisframe)
extern CORE_ADDR or1k_frame_chain PARAMS ((struct frame_info *));
 
extern void or1k_init_extra_frame_info (int fromleaf, struct frame_info *);
#define INIT_EXTRA_FRAME_INFO(fromleaf, fi) or1k_init_extra_frame_info (fromleaf, fi)
 
/* #define INIT_FRAME_PC */ /* Not necessary */
 
 
/* Discard from the stack the innermost frame, restoring all registers. */
extern void or1k_pop_frame PARAMS ((void));
#define POP_FRAME or1k_pop_frame()
433,9 → 436,6
/* Is floating/vector unit present. */
#define OR1K_VF_PRESENT (or1k_implementation.vf_present)
 
/* #define INIT_FRAME_PC */ /* Not necessary */
//#define INIT_FRAME_PC(leaf, frame) or1k_init_frame_pc(leaf, frame)
 
/* Stack grows downward. */
#define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
 

powered by: WebSVN 2.1.0

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