Deleted Added
sdiff udiff text old ( 2989:9a6f66c38acc ) new ( 2996:56a278b5dbfa )
full compact
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;
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;
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({{
274 int64_t resTemp, val2 = Rs2_or_imm13;
275 Rd = resTemp = 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:>}},
282 {{Rs1<63:> == val2<63:> && val2<63:> != resTemp<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 ---