base.isa (3597:4766c8942c7e) base.isa (3603:714467743f9b)
1// Copyright (c) 2006 The Regents of The University of Michigan
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met: redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer;
8// redistributions in binary form must reproduce the above copyright

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

239 }
240
241 return ss.str();
242 }
243
244 bool passesCondition(uint32_t codes, uint32_t condition)
245 {
246 CondCodes condCodes;
1// Copyright (c) 2006 The Regents of The University of Michigan
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met: redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer;
8// redistributions in binary form must reproduce the above copyright

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

239 }
240
241 return ss.str();
242 }
243
244 bool passesCondition(uint32_t codes, uint32_t condition)
245 {
246 CondCodes condCodes;
247 condCodes.bits = codes;
247 condCodes.bits = 0;
248 condCodes.c = codes & 0x1 ? 1 : 0;
249 condCodes.v = codes & 0x2 ? 1 : 0;
250 condCodes.z = codes & 0x4 ? 1 : 0;
251 condCodes.n = codes & 0x8 ? 1 : 0;
252
248 switch(condition)
249 {
250 case Always:
251 return true;
252 case Never:
253 return false;
254 case NotEqual:
255 return !condCodes.z;

--- 32 unchanged lines hidden ---
253 switch(condition)
254 {
255 case Always:
256 return true;
257 case Never:
258 return false;
259 case NotEqual:
260 return !condCodes.z;

--- 32 unchanged lines hidden ---