aboutsummaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorStafford Horne <shorne@gmail.com>2017-03-20 15:33:51 +0000
committerNick Clifton <nickc@redhat.com>2017-03-20 15:33:51 +0000
commit4ea0266c22eccf6e7719469a981267659e47ef3a (patch)
tree4fd050c951a3ff8145e1444329035717473ea26d /cpu
parentd5e0ba9cdb0d002b97bab722cce673ce86cf7b11 (diff)
downloadfsf-binutils-gdb-4ea0266c22eccf6e7719469a981267659e47ef3a.zip
fsf-binutils-gdb-4ea0266c22eccf6e7719469a981267659e47ef3a.tar.gz
fsf-binutils-gdb-4ea0266c22eccf6e7719469a981267659e47ef3a.tar.bz2
Update the openrisc previous program counter (ppc) when running code in the cgen based simulator.
* or1kcommon.cpu: Add pc set semantics to also update ppc.
Diffstat (limited to 'cpu')
-rw-r--r--cpu/ChangeLog4
-rw-r--r--cpu/or1kcommon.cpu5
2 files changed, 9 insertions, 0 deletions
diff --git a/cpu/ChangeLog b/cpu/ChangeLog
index 47c86a9..ac63d28 100644
--- a/cpu/ChangeLog
+++ b/cpu/ChangeLog
@@ -1,3 +1,7 @@
+2017-03-15 Stafford Horne <shorne@gmail.com>
+
+ * or1kcommon.cpu: Add pc set semantics to also update ppc.
+
2016-10-06 Alan Modra <amodra@gmail.com>
* mep.opc (expand_string): Add fall through comment.
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