public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] cpu: or1k: Set ppc on pc change
@ 2017-03-17  5:18 Stafford Horne
  2017-03-20 15:35 ` Nick Clifton
  0 siblings, 1 reply; 3+ messages in thread
From: Stafford Horne @ 2017-03-17  5:18 UTC (permalink / raw)
  To: binutils; +Cc: openrisc, Stafford Horne

Currently the openrisc previous program counter (ppc) is never updated
when running the cgen based simulator.  This causes issues when running
the single step delay detection code in gdb.

cpu/ChangeLog:

2017-02-12  Stafford Horne  <shorne@gmail.com>

	* or1kcommon.cpu: Add pc set semantics to also update ppc.
---
Note I dont think any code needs rebuilding as this is only going to be
used by the simulator (not yet upstream).

 cpu/or1kcommon.cpu | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cpu/or1kcommon.cpu b/cpu/or1kcommon.cpu
index 1119f98..ced70c3 100644
--- a/cpu/or1kcommon.cpu
+++ b/cpu/or1kcommon.cpu
@@ -26,6 +26,11 @@
   (comment "program counter")
   (attrs PC (MACH ORBIS-MACHS))
   (type pc UWI)
+  (get () (raw-reg h-pc))
+  (set (newval) (sequence ()
+                 (set (reg h-sys-ppc) (raw-reg h-pc))
+                 (set (raw-reg h-pc) newval)
+                ))
   )
 
 (define-pmacro REG-INDICES
-- 
2.9.3

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] cpu: or1k: Set ppc on pc change
  2017-03-17  5:18 [PATCH] cpu: or1k: Set ppc on pc change Stafford Horne
@ 2017-03-20 15:35 ` Nick Clifton
  2017-03-20 21:20   ` Stafford Horne
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Clifton @ 2017-03-20 15:35 UTC (permalink / raw)
  To: Stafford Horne, binutils; +Cc: openrisc

Hi Stafford,

> 2017-02-12  Stafford Horne  <shorne@gmail.com>
> 
> 	* or1kcommon.cpu: Add pc set semantics to also update ppc.

Approved and applied.

Cheers
  Nick


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] cpu: or1k: Set ppc on pc change
  2017-03-20 15:35 ` Nick Clifton
@ 2017-03-20 21:20   ` Stafford Horne
  0 siblings, 0 replies; 3+ messages in thread
From: Stafford Horne @ 2017-03-20 21:20 UTC (permalink / raw)
  To: Nick Clifton; +Cc: binutils, openrisc

On Mon, Mar 20, 2017 at 03:35:42PM +0000, Nick Clifton wrote:
> Hi Stafford,
> 
> > 2017-02-12  Stafford Horne  <shorne@gmail.com>
> > 
> > 	* or1kcommon.cpu: Add pc set semantics to also update ppc.
> 
> Approved and applied.

Thank you

> Cheers
>   Nick
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-20 21:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-17  5:18 [PATCH] cpu: or1k: Set ppc on pc change Stafford Horne
2017-03-20 15:35 ` Nick Clifton
2017-03-20 21:20   ` Stafford Horne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).