Deleted Added
sdiff udiff text old ( 9582:0632d2d1575c ) new ( 9921:ee049bfce978 )
full compact
1// Copyright (c) 2007-2008 The Hewlett-Packard Development Company
2// All rights reserved.
3//
4// The license below extends only to copyright in the software and shall
5// not be construed as granting a license to any other intellectual
6// property including but not limited to intellectual property relating
7// to a hardware implementation of the functionality of the software
8// licensed hereunder. You may use the software subject to the license
9// terms below provided that you ensure that this notice is replicated
10// unmodified and in its entirety in all distributions of the software,
11// modified or unmodified, in source code or in binary form.
12//
13// Copyright (c) 2007 The Regents of The University of Michigan
14// All rights reserved.
15//
16// Redistribution and use in source and binary forms, with or without
17// modification, are permitted provided that the following conditions are
18// met: redistributions of source code must retain the above copyright
19// notice, this list of conditions and the following disclaimer;
20// redistributions in binary form must reproduce the above copyright
21// notice, this list of conditions and the following disclaimer in the

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

56 return ('IntReg', 'uqw', 'INTREG_FOLDED(%s, %s)' % (idx, foldBit),
57 'IsInteger', id)
58 def intReg(idx, id):
59 return ('IntReg', 'uqw', idx, 'IsInteger', id)
60 def impIntReg(idx, id):
61 return ('IntReg', 'uqw', 'INTREG_IMPLICIT(%s)' % idx, 'IsInteger', id)
62 def floatReg(idx, id):
63 return ('FloatReg', 'df', idx, 'IsFloating', id)
64 def controlReg(idx, id, ctype = 'uqw'):
65 return ('ControlReg', ctype, idx,
66 (None, None, ['IsSerializeAfter',
67 'IsSerializing',
68 'IsNonSpeculative']),
69 id)
70 def squashCheckReg(idx, id, check, ctype = 'uqw'):
71 return ('ControlReg', ctype, idx,

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

113 'RIP': ('PCState', 'uqw', 'pc',
114 (None, None, 'IsControl'), 50),
115 'NRIP': ('PCState', 'uqw', 'npc',
116 (None, None, 'IsControl'), 50),
117 'nuIP': ('PCState', 'uqw', 'nupc',
118 (None, None, 'IsControl'), 50),
119 # These registers hold the condition code portion of the flag
120 # register. The nccFlagBits version holds the rest.
121 'ccFlagBits': intReg('INTREG_PSEUDO(0)', 60),
122 'cfofBits': intReg('INTREG_PSEUDO(1)', 61),
123 'dfBit': intReg('INTREG_PSEUDO(2)', 62),
124 'ecfBit': intReg('INTREG_PSEUDO(3)', 63),
125 'ezfBit': intReg('INTREG_PSEUDO(4)', 64),
126
127 # These Pred registers are to be used where reading the portions of
128 # condition code registers is possibly optional, depending on how the
129 # check evaluates. There are two checks being specified, one tests if
130 # a register needs to be read, the other tests whether the register
131 # needs to be written to. It is unlikely that these would need to be
132 # used in the actual operation of the instruction. It is expected
133 # that these are used only in the flag code.
134
135 # Rationale behind the checks: at times, we need to partially update
136 # the condition code bits in a register. So we read the register even
137 # in the case when the all the bits will be written, or none of the
138 # bits will be written. The read predicate checks if any of the bits
139 # would be retained, the write predicate checks if any of the bits
140 # are being written.
141
142 'PredccFlagBits': ('IntReg', 'uqw', 'INTREG_PSEUDO(0)', 'IsInteger',
143 60, None, None, '''(((ext & (PFBit | AFBit | ZFBit | SFBit
144 )) != (PFBit | AFBit | ZFBit | SFBit )) &&
145 ((ext & (PFBit | AFBit | ZFBit | SFBit )) != 0))''',
146 '((ext & (PFBit | AFBit | ZFBit | SFBit )) != 0)'),
147 'PredcfofBits': ('IntReg', 'uqw', 'INTREG_PSEUDO(1)', 'IsInteger',
148 61, None, None, '''(((ext & CFBit) == 0 ||
149 (ext & OFBit) == 0) && ((ext & (CFBit | OFBit)) != 0))''',
150 '((ext & (CFBit | OFBit)) != 0)'),
151 'PreddfBit': ('IntReg', 'uqw', 'INTREG_PSEUDO(2)', 'IsInteger',
152 62, None, None, '(false)', '((ext & DFBit) != 0)'),
153 'PredecfBit': ('IntReg', 'uqw', 'INTREG_PSEUDO(3)', 'IsInteger',
154 63, None, None, '(false)', '((ext & ECFBit) != 0)'),
155 'PredezfBit': ('IntReg', 'uqw', 'INTREG_PSEUDO(4)', 'IsInteger',
156 64, None, None, '(false)', '((ext & EZFBit) != 0)'),
157
158 # These register should needs to be more protected so that later
159 # instructions don't map their indexes with an old value.
160 'nccFlagBits': controlReg('MISCREG_RFLAGS', 65),
161
162 # Registers related to the state of x87 floating point unit.
163 'TOP': controlReg('MISCREG_X87_TOP', 66, ctype='ub'),

--- 40 unchanged lines hidden ---