decoder.isa (5893:41b18fe25a0e) | decoder.isa (6639:ae3263589c7c) |
---|---|
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 --- 212 unchanged lines hidden (view full) --- 221 0x1C: subccc({{ 222 int64_t res, op1 = Rs1, op2 = Rs2_or_imm13; 223 Rd = res = op1 - op2 - Ccr<0:>; 224 }}, sub=True); 225 0x1D: IntOpCcRes::udivxcc({{ 226 if(Rs2_or_imm13.udw == 0) fault = new DivisionByZero; 227 else Rd = Rs1.udw / Rs2_or_imm13.udw;}}); 228 0x1E: IntOpCcRes::udivcc({{ | 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 --- 212 unchanged lines hidden (view full) --- 221 0x1C: subccc({{ 222 int64_t res, op1 = Rs1, op2 = Rs2_or_imm13; 223 Rd = res = op1 - op2 - Ccr<0:>; 224 }}, sub=True); 225 0x1D: IntOpCcRes::udivxcc({{ 226 if(Rs2_or_imm13.udw == 0) fault = new DivisionByZero; 227 else Rd = Rs1.udw / Rs2_or_imm13.udw;}}); 228 0x1E: IntOpCcRes::udivcc({{ |
229 uint32_t resTemp, val2 = Rs2_or_imm13.udw; | 229 uint64_t resTemp; 230 uint32_t val2 = Rs2_or_imm13.udw; |
230 int32_t overflow = 0; 231 if(val2 == 0) fault = new DivisionByZero; 232 else 233 { 234 resTemp = (uint64_t)((Y << 32) | Rs1.udw<31:0>) / val2; 235 overflow = (resTemp<63:32> != 0); 236 if(overflow) Rd = resTemp = 0xFFFFFFFF; 237 else Rd = resTemp; --- 1189 unchanged lines hidden --- | 231 int32_t overflow = 0; 232 if(val2 == 0) fault = new DivisionByZero; 233 else 234 { 235 resTemp = (uint64_t)((Y << 32) | Rs1.udw<31:0>) / val2; 236 overflow = (resTemp<63:32> != 0); 237 if(overflow) Rd = resTemp = 0xFFFFFFFF; 238 else Rd = resTemp; --- 1189 unchanged lines hidden --- |