decoder.isa (2989:9a6f66c38acc) decoder.isa (2996:56a278b5dbfa)
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

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

230 else Rd = resTemp;
231 } }},
232 {{0}},
233 {{overflow}},
234 {{0}},
235 {{0}}
236 );
237 0x1F: sdivcc({{
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

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

230 else Rd = resTemp;
231 } }},
232 {{0}},
233 {{overflow}},
234 {{0}},
235 {{0}}
236 );
237 0x1F: sdivcc({{
238 int32_t resTemp, val2 = Rs2_or_imm13.sdw;
239 int32_t overflow = 0, underflow = 0;
238 int64_t val2 = Rs2_or_imm13.sdw<31:0>;
239 bool overflow = false, underflow = false;
240 if(val2 == 0) fault = new DivisionByZero;
241 else
242 {
240 if(val2 == 0) fault = new DivisionByZero;
241 else
242 {
243 Rd = resTemp = (int64_t)((Y << 32) | Rs1.sdw<31:0>) / val2;
244 overflow = (resTemp<63:31> != 0);
245 underflow = (resTemp<63:> && resTemp<62:31> != 0xFFFFFFFF);
246 if(overflow) Rd = resTemp = 0x7FFFFFFF;
247 else if(underflow) resTemp = Rd = 0xFFFFFFFF80000000ULL;
248 else Rd = resTemp;
243 Rd = (int64_t)((Y << 32) | Rs1.sdw<31:0>) / val2;
244 overflow = (Rd<63:31> != 0);
245 underflow = (Rd<63:> && Rd<62:31> != 0xFFFFFFFF);
246 if(overflow) Rd = 0x7FFFFFFF;
247 else if(underflow) Rd = 0xFFFFFFFF80000000ULL;
249 } }},
250 {{0}},
251 {{overflow || underflow}},
252 {{0}},
253 {{0}}
254 );
255 0x20: taddcc({{
256 int64_t resTemp, val2 = Rs2_or_imm13;

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

266 Rd = resTemp = Rs1 + val2;
267 int32_t overflow = Rs1<1:0> || val2<1:0> || (Rs1<31:> == val2<31:> && val2<31:> != resTemp<31:>);}},
268 {{(Rs1 & 0xFFFFFFFF + val2 & 0xFFFFFFFF) >> 31}},
269 {{overflow}},
270 {{((Rs1 >> 1) + (val2 >> 1) + (Rs1 & val2 & 0x1))<63:>}},
271 {{Rs1<63:> == val2<63:> && val2<63:> != resTemp<63:>}}
272 );
273 0x22: taddcctv({{
248 } }},
249 {{0}},
250 {{overflow || underflow}},
251 {{0}},
252 {{0}}
253 );
254 0x20: taddcc({{
255 int64_t resTemp, val2 = Rs2_or_imm13;

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

265 Rd = resTemp = Rs1 + val2;
266 int32_t overflow = Rs1<1:0> || val2<1:0> || (Rs1<31:> == val2<31:> && val2<31:> != resTemp<31:>);}},
267 {{(Rs1 & 0xFFFFFFFF + val2 & 0xFFFFFFFF) >> 31}},
268 {{overflow}},
269 {{((Rs1 >> 1) + (val2 >> 1) + (Rs1 & val2 & 0x1))<63:>}},
270 {{Rs1<63:> == val2<63:> && val2<63:> != resTemp<63:>}}
271 );
272 0x22: taddcctv({{
274 int64_t resTemp, val2 = Rs2_or_imm13;
275 Rd = resTemp = Rs1 + val2;
273 int64_t val2 = Rs2_or_imm13;
274 Rd = Rs1 + val2;
276 int32_t overflow = Rs1<1:0> || val2<1:0> ||
277 (Rs1<31:> == val2<31:> && val2<31:> != Rd<31:>);
278 if(overflow) fault = new TagOverflow;}},
279 {{((Rs1 & 0xFFFFFFFF + val2 & 0xFFFFFFFF) >> 31)}},
280 {{overflow}},
281 {{((Rs1 >> 1) + (val2 >> 1) + (Rs1 & val2 & 0x1))<63:>}},
275 int32_t overflow = Rs1<1:0> || val2<1:0> ||
276 (Rs1<31:> == val2<31:> && val2<31:> != Rd<31:>);
277 if(overflow) fault = new TagOverflow;}},
278 {{((Rs1 & 0xFFFFFFFF + val2 & 0xFFFFFFFF) >> 31)}},
279 {{overflow}},
280 {{((Rs1 >> 1) + (val2 >> 1) + (Rs1 & val2 & 0x1))<63:>}},
282 {{Rs1<63:> == val2<63:> && val2<63:> != resTemp<63:>}}
281 {{Rs1<63:> == val2<63:> && val2<63:> != Rd<63:>}}
283 );
284 0x23: tsubcctv({{
285 int64_t resTemp, val2 = Rs2_or_imm13;
286 Rd = resTemp = Rs1 + val2;
287 int32_t overflow = Rs1<1:0> || val2<1:0> || (Rs1<31:> == val2<31:> && val2<31:> != resTemp<31:>);
288 if(overflow) fault = new TagOverflow;}},
289 {{((Rs1 & 0xFFFFFFFF + val2 & 0xFFFFFFFF) >> 31)}},
290 {{overflow}},

--- 602 unchanged lines hidden ---
282 );
283 0x23: tsubcctv({{
284 int64_t resTemp, val2 = Rs2_or_imm13;
285 Rd = resTemp = Rs1 + val2;
286 int32_t overflow = Rs1<1:0> || val2<1:0> || (Rs1<31:> == val2<31:> && val2<31:> != resTemp<31:>);
287 if(overflow) fault = new TagOverflow;}},
288 {{((Rs1 & 0xFFFFFFFF + val2 & 0xFFFFFFFF) >> 31)}},
289 {{overflow}},

--- 602 unchanged lines hidden ---