nativetrace.hh (6397:cb1d7c957f49) nativetrace.hh (6398:7a94cba72e02)
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

34#include "base/types.hh"
35#include "cpu/nativetrace.hh"
36
37namespace Trace {
38
39class ArmNativeTrace : public NativeTrace
40{
41 public:
1/*
2 * Copyright (c) 2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

34#include "base/types.hh"
35#include "cpu/nativetrace.hh"
36
37namespace Trace {
38
39class ArmNativeTrace : public NativeTrace
40{
41 public:
42 enum StateID {
43 STATE_R0,
44 STATE_R1,
45 STATE_R2,
46 STATE_R3,
47 STATE_R4,
48 STATE_R5,
49 STATE_R6,
50 STATE_R7,
51 STATE_R8,
52 STATE_R9,
53 STATE_R10,
54 STATE_R11,
55 STATE_FP = STATE_R11,
56 STATE_R12,
57 STATE_R13,
58 STATE_SP = STATE_R13,
59 STATE_R14,
60 STATE_LR = STATE_R14,
61 STATE_R15,
62 STATE_PC = STATE_R15,
63 STATE_CPSR,
64 STATE_NUMVALS
65 };
66
67 protected:
68 struct ThreadState {
69 bool changed[STATE_NUMVALS];
70 uint32_t state[2][STATE_NUMVALS];
71 uint32_t *newState;
72 uint32_t *oldState;
73 int current;
74 void update(NativeTrace *parent);
75 void update(ThreadContext *tc);
76
77 ThreadState()
78 {
79 for (int i = 0; i < STATE_NUMVALS; i++) {
80 changed[i] = false;
81 state[0][i] = state[1][i] = 0;
82 current = 0;
83 newState = state[0];
84 oldState = state[1];
85 }
86 }
87 };
88
89 ThreadState nState, mState;
90
91 public:
42 ArmNativeTrace(const Params *p) : NativeTrace(p)
43 {}
44
45 void check(NativeTraceRecord *record);
46};
47
48} /* namespace Trace */
49
50#endif // __ARCH_ARM_NATIVETRACE_HH__
92 ArmNativeTrace(const Params *p) : NativeTrace(p)
93 {}
94
95 void check(NativeTraceRecord *record);
96};
97
98} /* namespace Trace */
99
100#endif // __ARCH_ARM_NATIVETRACE_HH__