decoder.isa (4235:945b78b3477b) | decoder.isa (4237:3493eb63512e) |
---|---|
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 --- 412 unchanged lines hidden (view full) --- 421 int32_t overflow = Rs1<1:0> || val2<1:0> || (Rs1<31:> == val2<31:> && val2<31:> != resTemp<31:>); 422 if(overflow) fault = new TagOverflow;}}, 423 {{((Rs1<31:0> + val2<31:0>)<32:0>)}}, 424 {{overflow}}, 425 {{((Rs1 >> 1) + (val2 >> 1) + (Rs1 & val2 & 0x1))<63:>}}, 426 {{Rs1<63:> == val2<63:> && val2<63:> != resTemp<63:>}} 427 ); 428 0x24: mulscc({{ | 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 --- 412 unchanged lines hidden (view full) --- 421 int32_t overflow = Rs1<1:0> || val2<1:0> || (Rs1<31:> == val2<31:> && val2<31:> != resTemp<31:>); 422 if(overflow) fault = new TagOverflow;}}, 423 {{((Rs1<31:0> + val2<31:0>)<32:0>)}}, 424 {{overflow}}, 425 {{((Rs1 >> 1) + (val2 >> 1) + (Rs1 & val2 & 0x1))<63:>}}, 426 {{Rs1<63:> == val2<63:> && val2<63:> != resTemp<63:>}} 427 ); 428 0x24: mulscc({{ |
429 int64_t resTemp, multiplicand = Rs2_or_imm13; 430 int32_t multiplier = Rs1<31:0>; | |
431 int32_t savedLSB = Rs1<0:>; | 429 int32_t savedLSB = Rs1<0:>; |
432 multiplier = multiplier<31:1> | 433 ((Ccr<3:3> ^ Ccr<1:1>) << 32); 434 if(!Y<0:>) 435 multiplicand = 0; 436 Rd = resTemp = multiplicand + multiplier; | 430 431 //Step 1 432 int64_t multiplicand = Rs2_or_imm13; 433 //Step 2 434 int32_t partialP = Rs1<31:1> | 435 ((Ccr<3:3> ^ Ccr<1:1>) << 31); 436 //Step 3 437 int32_t added = Y<0:> ? multiplicand : 0; 438 Rd = partialP + added; 439 //Steps 4 & 5 |
437 Y = Y<31:1> | (savedLSB << 31);}}, | 440 Y = Y<31:1> | (savedLSB << 31);}}, |
438 {{((multiplicand<31:0> + multiplier<31:0>)<32:0>)}}, 439 {{multiplicand<31:> == multiplier<31:> && multiplier<31:> != resTemp<31:>}}, 440 {{((multiplicand >> 1) + (multiplier >> 1) + (multiplicand & multiplier & 0x1))<63:>}}, 441 {{multiplicand<63:> == multiplier<63:> && multiplier<63:> != resTemp<63:>}} | 441 {{((partialP<31:0> + added<31:0>)<32:0>)}}, 442 {{partialP<31:> == added<31:> && added<31:> != Rd<31:>}}, 443 {{((partialP >> 1) + (added >> 1) + (partialP & added & 0x1))<63:>}}, 444 {{partialP<63:> == added<63:> && partialP<63:> != Rd<63:>}} |
442 ); 443 } 444 format IntOp 445 { 446 0x25: decode X { 447 0x0: sll({{Rd = Rs1 << (I ? SHCNT32 : Rs2<4:0>);}}); 448 0x1: sllx({{Rd = Rs1 << (I ? SHCNT64 : Rs2<5:0>);}}); 449 } --- 1201 unchanged lines hidden --- | 445 ); 446 } 447 format IntOp 448 { 449 0x25: decode X { 450 0x0: sll({{Rd = Rs1 << (I ? SHCNT32 : Rs2<4:0>);}}); 451 0x1: sllx({{Rd = Rs1 << (I ? SHCNT64 : Rs2<5:0>);}}); 452 } --- 1201 unchanged lines hidden --- |