Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36050
b: refs/heads/master
c: 29b376f
h: refs/heads/master
v: v3
  • Loading branch information
Franck Bui-Huu authored and Ralf Baechle committed Sep 27, 2006
1 parent e37fe15 commit b1dbc72
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1fd6909802b837ed5510603846c0ce5938d296a1
refs/heads/master: 29b376ff10aaea69ee4d93b70d0fbb2ebfd80f4e
12 changes: 10 additions & 2 deletions trunk/arch/mips/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,19 @@ static inline int is_sp_move_ins(union mips_instruction *ip)
static int get_frame_info(struct mips_frame_info *info)
{
union mips_instruction *ip = info->func;
int i, max_insns =
min(128UL, info->func_size / sizeof(union mips_instruction));
unsigned max_insns = info->func_size / sizeof(union mips_instruction);
unsigned i;

info->pc_offset = -1;
info->frame_size = 0;

if (!ip)
goto err;

if (max_insns == 0)
max_insns = 128U; /* unknown function size */
max_insns = min(128U, max_insns);

for (i = 0; i < max_insns; i++, ip++) {

if (is_jal_jalr_jr_ins(ip))
Expand All @@ -337,6 +344,7 @@ static int get_frame_info(struct mips_frame_info *info)
if (info->pc_offset < 0) /* leaf */
return 1;
/* prologue seems boggus... */
err:
return -1;
}

Expand Down

0 comments on commit b1dbc72

Please sign in to comment.