swap.isa (5096:eb06635e06ac) swap.isa (5736:426510e758ad)
1// Copyright (c) 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

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

128
129let {{
130 SwapFuncs = [SwapExecute, SwapInitiateAcc, SwapCompleteAcc]
131}};
132
133
134def format Swap(code, postacc_code, mem_flags, *opt_flags) {{
135 mem_flags = makeList(mem_flags)
1// Copyright (c) 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

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

128
129let {{
130 SwapFuncs = [SwapExecute, SwapInitiateAcc, SwapCompleteAcc]
131}};
132
133
134def format Swap(code, postacc_code, mem_flags, *opt_flags) {{
135 mem_flags = makeList(mem_flags)
136 mem_flags = [ 'Request::%s' % flag for flag in mem_flags ]
136 flags = string.join(mem_flags, '|')
137
138 (header_output,
139 decoder_output,
140 exec_output,
141 decode_block) = doMemFormat(code, SwapFuncs, '', name, Name, flags,
142 ["IsStoreConditional"], postacc_code)
143}};
144
145def format SwapAlt(code, postacc_code, mem_flags, *opt_flags) {{
146 mem_flags = makeList(mem_flags)
137 flags = string.join(mem_flags, '|')
138
139 (header_output,
140 decoder_output,
141 exec_output,
142 decode_block) = doMemFormat(code, SwapFuncs, '', name, Name, flags,
143 ["IsStoreConditional"], postacc_code)
144}};
145
146def format SwapAlt(code, postacc_code, mem_flags, *opt_flags) {{
147 mem_flags = makeList(mem_flags)
148 mem_flags = [ 'Request::%s' % flag for flag in mem_flags ]
147 mem_flags.append("EXT_ASI")
148 flags = string.join(mem_flags, '|')
149 (header_output,
150 decoder_output,
151 exec_output,
152 decode_block) = doMemFormat(code, SwapFuncs, AlternateASIPrivFaultCheck,
153 name, Name, flags, ["IsStoreConditional"], postacc_code)
154}};

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

170 exec_output = doSplitExecute(execute, name, Name, mem_flags,
171 ["IsStoreConditional"], microParams);
172 return (header_output, decoder_output, exec_output, decode_block)
173}};
174
175
176def format CasAlt(code, postacc_code, mem_flags, *opt_flags) {{
177 mem_flags = makeList(mem_flags)
149 mem_flags.append("EXT_ASI")
150 flags = string.join(mem_flags, '|')
151 (header_output,
152 decoder_output,
153 exec_output,
154 decode_block) = doMemFormat(code, SwapFuncs, AlternateASIPrivFaultCheck,
155 name, Name, flags, ["IsStoreConditional"], postacc_code)
156}};

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

172 exec_output = doSplitExecute(execute, name, Name, mem_flags,
173 ["IsStoreConditional"], microParams);
174 return (header_output, decoder_output, exec_output, decode_block)
175}};
176
177
178def format CasAlt(code, postacc_code, mem_flags, *opt_flags) {{
179 mem_flags = makeList(mem_flags)
180 mem_flags = [ 'Request::%s' % flag for flag in mem_flags ]
178 mem_flags.append("EXT_ASI")
179 flags = string.join(mem_flags, '|')
180 (header_output,
181 decoder_output,
182 exec_output,
183 decode_block) = doCasFormat(code, SwapFuncs, AlternateASIPrivFaultCheck,
184 name, Name, flags, ["IsStoreConditional"], postacc_code)
185}};
186
187
181 mem_flags.append("EXT_ASI")
182 flags = string.join(mem_flags, '|')
183 (header_output,
184 decoder_output,
185 exec_output,
186 decode_block) = doCasFormat(code, SwapFuncs, AlternateASIPrivFaultCheck,
187 name, Name, flags, ["IsStoreConditional"], postacc_code)
188}};
189
190