static_inst.hh (12109:f29e9c5418aa) static_inst.hh (12234:78ece221f9f5)
1/*
2 * Copyright (c) 2010-2013, 2016 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 34 unchanged lines hidden (view full) ---

43#define __ARCH_ARM_INSTS_STATICINST_HH__
44
45#include <memory>
46
47#include "arch/arm/faults.hh"
48#include "arch/arm/utility.hh"
49#include "arch/arm/system.hh"
50#include "base/trace.hh"
1/*
2 * Copyright (c) 2010-2013, 2016 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 34 unchanged lines hidden (view full) ---

43#define __ARCH_ARM_INSTS_STATICINST_HH__
44
45#include <memory>
46
47#include "arch/arm/faults.hh"
48#include "arch/arm/utility.hh"
49#include "arch/arm/system.hh"
50#include "base/trace.hh"
51#include "cpu/exec_context.hh"
51#include "cpu/static_inst.hh"
52#include "sim/byteswap.hh"
53#include "sim/full_system.hh"
54
55namespace ArmISA
56{
57
58class ArmStaticInst : public StaticInst

--- 226 unchanged lines hidden (view full) ---

285 if (bits(byteMask, 1))
286 bitMask = bitMask | mask(15, 8);
287 if (bits(byteMask, 0))
288 bitMask = bitMask | mask(7, 0);
289
290 return ((spsr & ~bitMask) | (val & bitMask));
291 }
292
52#include "cpu/static_inst.hh"
53#include "sim/byteswap.hh"
54#include "sim/full_system.hh"
55
56namespace ArmISA
57{
58
59class ArmStaticInst : public StaticInst

--- 226 unchanged lines hidden (view full) ---

286 if (bits(byteMask, 1))
287 bitMask = bitMask | mask(15, 8);
288 if (bits(byteMask, 0))
289 bitMask = bitMask | mask(7, 0);
290
291 return ((spsr & ~bitMask) | (val & bitMask));
292 }
293
293 template<class XC>
294 static inline Addr
294 static inline Addr
295 readPC(XC *xc)
295 readPC(ExecContext *xc)
296 {
297 return xc->pcState().instPC();
298 }
299
296 {
297 return xc->pcState().instPC();
298 }
299
300 template<class XC>
301 static inline void
300 static inline void
302 setNextPC(XC *xc, Addr val)
301 setNextPC(ExecContext *xc, Addr val)
303 {
304 PCState pc = xc->pcState();
305 pc.instNPC(val);
306 xc->pcState(pc);
307 }
308
309 template<class T>
310 static inline T

--- 24 unchanged lines hidden (view full) ---

335 for (unsigned i = 0; i < count; i++) {
336 conv.eVals[i] = gtole(conv.eVals[i]);
337 }
338 }
339 return gtoh(conv.tVal);
340 }
341
342 // Perform an interworking branch.
302 {
303 PCState pc = xc->pcState();
304 pc.instNPC(val);
305 xc->pcState(pc);
306 }
307
308 template<class T>
309 static inline T

--- 24 unchanged lines hidden (view full) ---

334 for (unsigned i = 0; i < count; i++) {
335 conv.eVals[i] = gtole(conv.eVals[i]);
336 }
337 }
338 return gtoh(conv.tVal);
339 }
340
341 // Perform an interworking branch.
343 template<class XC>
344 static inline void
342 static inline void
345 setIWNextPC(XC *xc, Addr val)
343 setIWNextPC(ExecContext *xc, Addr val)
346 {
347 PCState pc = xc->pcState();
348 pc.instIWNPC(val);
349 xc->pcState(pc);
350 }
351
352 // Perform an interworking branch in ARM mode, a regular branch
353 // otherwise.
344 {
345 PCState pc = xc->pcState();
346 pc.instIWNPC(val);
347 xc->pcState(pc);
348 }
349
350 // Perform an interworking branch in ARM mode, a regular branch
351 // otherwise.
354 template<class XC>
355 static inline void
352 static inline void
356 setAIWNextPC(XC *xc, Addr val)
353 setAIWNextPC(ExecContext *xc, Addr val)
357 {
358 PCState pc = xc->pcState();
359 pc.instAIWNPC(val);
360 xc->pcState(pc);
361 }
362
363 inline Fault
364 disabledFault() const

--- 62 unchanged lines hidden ---
354 {
355 PCState pc = xc->pcState();
356 pc.instAIWNPC(val);
357 xc->pcState(pc);
358 }
359
360 inline Fault
361 disabledFault() const

--- 62 unchanged lines hidden ---