static_inst.hh (7296:27c60324ec4d) static_inst.hh (7317:0a0fb1ba4058)
1/*
2 * Copyright (c) 2010 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

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

172 if (bits(byteMask, 1)) {
173 unsigned highIdx = affectState ? 15 : 9;
174 unsigned lowIdx = privileged ? 8 : 9;
175 bitMask = bitMask | mask(highIdx, lowIdx);
176 }
177 if (bits(byteMask, 0)) {
178 if (privileged) {
179 bitMask = bitMask | mask(7, 6);
1/*
2 * Copyright (c) 2010 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

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

172 if (bits(byteMask, 1)) {
173 unsigned highIdx = affectState ? 15 : 9;
174 unsigned lowIdx = privileged ? 8 : 9;
175 bitMask = bitMask | mask(highIdx, lowIdx);
176 }
177 if (bits(byteMask, 0)) {
178 if (privileged) {
179 bitMask = bitMask | mask(7, 6);
180 bitMask = bitMask | mask(5);
180 if (!badMode((OperatingMode)(val & mask(5)))) {
181 bitMask = bitMask | mask(5);
182 } else {
183 warn_once("Ignoring write of bad mode to CPSR.\n");
184 }
181 }
182 if (affectState)
183 bitMask = bitMask | (1 << 5);
184 }
185
186 return ((uint32_t)cpsr & ~bitMask) | (val & bitMask);
187 }
188

--- 106 unchanged lines hidden ---
185 }
186 if (affectState)
187 bitMask = bitMask | (1 << 5);
188 }
189
190 return ((uint32_t)cpsr & ~bitMask) | (val & bitMask);
191 }
192

--- 106 unchanged lines hidden ---