Deleted Added
sdiff udiff text old ( 3980:9bcb2a2e9bb8 ) new ( 4004:d551cf1bba0d )
full compact
1// Copyright (c) 2006-2007 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

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

62 CarryClear=0xD,
63 CarrySet=0x5,
64 Positive=0xE,
65 Negative=0x6,
66 OverflowClear=0xF,
67 OverflowSet=0x7
68 };
69
70 extern char * CondTestAbbrev[];
71
72 /**
73 * Base class for all SPARC static instructions.
74 */
75 class SparcStaticInst : public StaticInst
76 {
77 protected:

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

88 void printReg(std::ostream &os, int reg) const;
89 void printSrcReg(std::ostream &os, int reg) const;
90 void printDestReg(std::ostream &os, int reg) const;
91
92 void printRegArray(std::ostream &os,
93 const RegIndex indexArray[], int num) const;
94 };
95
96 bool passesCondition(uint32_t codes, uint32_t condition);
97
98 inline int64_t sign_ext(uint64_t data, int origWidth)
99 {
100 int shiftAmount = 64 - origWidth;
101 return (((int64_t)data) << shiftAmount) >> shiftAmount;
102 }
103}};

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

362 if(_numSrcRegs > 0)
363 ss << ",";
364 printReg(ss, _destRegIdx[0]);
365 }
366
367 return ss.str();
368 }
369
370 bool passesCondition(uint32_t codes, uint32_t condition)
371 {
372 CondCodes condCodes;
373 condCodes.bits = 0;
374 condCodes.c = codes & 0x1 ? 1 : 0;
375 condCodes.v = codes & 0x2 ? 1 : 0;
376 condCodes.z = codes & 0x4 ? 1 : 0;
377 condCodes.n = codes & 0x8 ? 1 : 0;

--- 65 unchanged lines hidden ---