mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-12 01:24:12 +08:00
* rs6000-tdep.c (ppc_deal_with_atomic_sequence): Correct branch
destination calculation. Don't expect >> to sign extend. Don't add a break if branch lands inside the sequence anywhere.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2011-11-22 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* rs6000-tdep.c (ppc_deal_with_atomic_sequence): Correct branch
|
||||||
|
destination calculation. Don't expect >> to sign extend. Don't
|
||||||
|
add a break if branch lands inside the sequence anywhere.
|
||||||
|
|
||||||
2011-11-21 Keith Seitz <keiths@redhat.com>
|
2011-11-21 Keith Seitz <keiths@redhat.com>
|
||||||
|
|
||||||
* gdb.mi/mi-var-display.exp: Remove XFAIL for c_variable-7.51,
|
* gdb.mi/mi-var-display.exp: Remove XFAIL for c_variable-7.51,
|
||||||
|
@ -1116,8 +1116,8 @@ ppc_deal_with_atomic_sequence (struct frame_info *frame)
|
|||||||
its destination address. */
|
its destination address. */
|
||||||
if ((insn & BRANCH_MASK) == BC_INSN)
|
if ((insn & BRANCH_MASK) == BC_INSN)
|
||||||
{
|
{
|
||||||
int immediate = ((insn & ~3) << 16) >> 16;
|
int immediate = ((insn & 0xfffc) ^ 0x8000) - 0x8000;
|
||||||
int absolute = ((insn >> 1) & 1);
|
int absolute = insn & 2;
|
||||||
|
|
||||||
if (bc_insn_count >= 1)
|
if (bc_insn_count >= 1)
|
||||||
return 0; /* More than one conditional branch found, fallback
|
return 0; /* More than one conditional branch found, fallback
|
||||||
@ -1126,7 +1126,7 @@ ppc_deal_with_atomic_sequence (struct frame_info *frame)
|
|||||||
if (absolute)
|
if (absolute)
|
||||||
breaks[1] = immediate;
|
breaks[1] = immediate;
|
||||||
else
|
else
|
||||||
breaks[1] = pc + immediate;
|
breaks[1] = loc + immediate;
|
||||||
|
|
||||||
bc_insn_count++;
|
bc_insn_count++;
|
||||||
last_breakpoint++;
|
last_breakpoint++;
|
||||||
@ -1150,11 +1150,10 @@ ppc_deal_with_atomic_sequence (struct frame_info *frame)
|
|||||||
breaks[0] = loc;
|
breaks[0] = loc;
|
||||||
|
|
||||||
/* Check for duplicated breakpoints. Check also for a breakpoint
|
/* Check for duplicated breakpoints. Check also for a breakpoint
|
||||||
placed (branch instruction's destination) at the stwcx/stdcx
|
placed (branch instruction's destination) anywhere in sequence. */
|
||||||
instruction, this resets the reservation and take us back to the
|
if (last_breakpoint
|
||||||
lwarx/ldarx instruction at the beginning of the atomic sequence. */
|
&& (breaks[1] == breaks[0]
|
||||||
if (last_breakpoint && ((breaks[1] == breaks[0])
|
|| (breaks[1] >= pc && breaks[1] <= closing_insn)))
|
||||||
|| (breaks[1] == closing_insn)))
|
|
||||||
last_breakpoint = 0;
|
last_breakpoint = 0;
|
||||||
|
|
||||||
/* Effectively inserts the breakpoints. */
|
/* Effectively inserts the breakpoints. */
|
||||||
|
Reference in New Issue
Block a user