utility.hh (8902:75b524b64c28) utility.hh (9759:8f1f1bdedf8c)
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
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

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

100 }
101
102 inline uint64_t
103 getExecutingAsid(ThreadContext *tc)
104 {
105 return 0;
106 }
107
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
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

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

100 }
101
102 inline uint64_t
103 getExecutingAsid(ThreadContext *tc)
104 {
105 return 0;
106 }
107
108
109 /**
110 * Reconstruct the rflags register from the internal gem5 register
111 * state.
112 *
113 * gem5 stores rflags in several different registers to avoid
114 * pipeline dependencies. In order to get the true rflags value,
115 * we can't simply read the value of MISCREG_RFLAGS. Instead, we
116 * need to read out various state from microcode registers and
117 * merge that with MISCREG_RFLAGS.
118 *
119 * @param tc Thread context to read rflags from.
120 * @return rflags as seen by the guest.
121 */
122 uint64_t getRFlags(ThreadContext *tc);
123
124 /**
125 * Set update the rflags register and internal gem5 state.
126 *
127 * @note This function does not update MISCREG_M5_REG. You might
128 * need to update this register by writing anything to
129 * MISCREG_M5_REG with side-effects.
130 *
131 * @see X86ISA::getRFlags()
132 *
133 * @param tc Thread context to update
134 * @param val New rflags value to store in TC
135 */
136 void setRFlags(ThreadContext *tc, uint64_t val);
108}
109
110#endif // __ARCH_X86_UTILITY_HH__
137}
138
139#endif // __ARCH_X86_UTILITY_HH__