diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2010-06-02 12:57:59 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2010-06-02 12:57:59 -0500 |
commit | 9ef82c0bc437a962398857dcb365a8493a9ac5c7 (patch) | |
tree | 72a8bb547981a08249aac1f3af9d36641220d9c3 /src/arch/arm/insts/static_inst.hh | |
parent | 1c0d9806e5475e07fd62e56938bde77f52496cfb (diff) | |
download | gem5-9ef82c0bc437a962398857dcb365a8493a9ac5c7.tar.xz |
ARM: Track the current ISA mode using the PC.
Diffstat (limited to 'src/arch/arm/insts/static_inst.hh')
-rw-r--r-- | src/arch/arm/insts/static_inst.hh | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/arch/arm/insts/static_inst.hh b/src/arch/arm/insts/static_inst.hh index f2881c3b6..7a87fce2b 100644 --- a/src/arch/arm/insts/static_inst.hh +++ b/src/arch/arm/insts/static_inst.hh @@ -1,4 +1,17 @@ -/* Copyright (c) 2007-2008 The Florida State University +/* + * Copyright (c) 2010 ARM Limited + * All rights reserved + * + * The license below extends only to copyright in the software and shall + * not be construed as granting a license to any other intellectual + * property including but not limited to intellectual property relating + * to a hardware implementation of the functionality of the software + * licensed hereunder. You may use the software subject to the license + * terms below provided that you ensure that this notice is replicated + * unmodified and in its entirety in all distributions of the software, + * modified or unmodified, in source code or in binary form. + * + * Copyright (c) 2007-2008 The Florida State University * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -124,6 +137,14 @@ class ArmStaticInst : public StaticInst return ((spsr & ~bitMask) | (val & bitMask)); } + + template<class XC> + static void + setNextPC(XC *xc, Addr val) + { + xc->setNextPC((xc->readNextPC() & PcModeMask) | + (val & ~PcModeMask)); + } }; } |