Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108578
b: refs/heads/master
c: 5400c5a
h: refs/heads/master
v: v3
  • Loading branch information
Jie Zhang authored and Bryan Wu committed Aug 5, 2008
1 parent 3a2f771 commit a5384ed
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 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: 0f0625d895bc5b3c3d7352486a94e5a75f10fd35
refs/heads/master: 5400c5aa2de41501be7529831c9df36c729bf371
20 changes: 13 additions & 7 deletions trunk/arch/blackfin/mach-common/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ ENTRY(_ex_single_step)
cc = r7 == r6;
if cc jump _bfin_return_from_exception;

#ifdef CONFIG_KGDB
/* Don't do single step in hardware exception handler */
p5.l = lo(IPEND);
p5.h = hi(IPEND);
r6 = [p5];
cc = bittst(r6, 5);
if cc jump _bfin_return_from_exception;

#ifdef CONFIG_KGDB
/* skip single step if current interrupt priority is higher than
* that of the first instruction, from which gdb starts single step */
r6 >>= 6;
Expand All @@ -191,12 +191,22 @@ ENTRY(_ex_single_step)
#endif

/* If we were in user mode, do the single step normally. */
p5.l = lo(IPEND);
p5.h = hi(IPEND);
r6 = [p5];
r7 = 0xffe0 (z);
r7 = r7 & r6;
cc = r7 == 0;
if cc jump 1f;
if !cc jump 1f;

/* Single stepping only a single instruction, so clear the trace
* bit here. */
r7 = syscfg;
bitclr (r7, 0);
syscfg = R7;
jump _ex_trap_c;

1:
/*
* We were in an interrupt handler. By convention, all of them save
* SYSCFG with their first instruction, so by checking whether our
Expand Down Expand Up @@ -224,15 +234,11 @@ ENTRY(_ex_single_step)
cc = R7 == R6;
if !cc jump _bfin_return_from_exception;

1:
/* Single stepping only a single instruction, so clear the trace
* bit here. */
r7 = syscfg;
bitclr (r7, 0);
syscfg = R7;

jump _ex_trap_c;

/* Fall through to _bfin_return_from_exception. */
ENDPROC(_ex_single_step)

ENTRY(_bfin_return_from_exception)
Expand Down

0 comments on commit a5384ed

Please sign in to comment.