regop.isa (6647:5a9fd91b66a3) regop.isa (6742:a2a79fe9655d)
1// Copyright (c) 2007-2008 The Hewlett-Packard Development Company
2// All rights reserved.
3//
4// Redistribution and use of this software in source and binary forms,
5// with or without modification, are permitted provided that the
6// following conditions are met:
7//
8// The software must be used only for Non-Commercial Use which means any

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

520
521 class Xor(LogicRegOp):
522 code = 'DestReg = merge(DestReg, psrc1 ^ op2, dataSize)'
523
524 class Mul1s(WrRegOp):
525 code = '''
526 ProdLow = psrc1 * op2;
527 int halfSize = (dataSize * 8) / 2;
1// Copyright (c) 2007-2008 The Hewlett-Packard Development Company
2// All rights reserved.
3//
4// Redistribution and use of this software in source and binary forms,
5// with or without modification, are permitted provided that the
6// following conditions are met:
7//
8// The software must be used only for Non-Commercial Use which means any

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

520
521 class Xor(LogicRegOp):
522 code = 'DestReg = merge(DestReg, psrc1 ^ op2, dataSize)'
523
524 class Mul1s(WrRegOp):
525 code = '''
526 ProdLow = psrc1 * op2;
527 int halfSize = (dataSize * 8) / 2;
528 uint64_t shifter = (1ULL << halfSize);
528 uint64_t shifter = (ULL(1) << halfSize);
529 uint64_t hiResult;
530 uint64_t psrc1_h = psrc1 / shifter;
531 uint64_t psrc1_l = psrc1 & mask(halfSize);
532 uint64_t psrc2_h = (op2 / shifter) & mask(halfSize);
533 uint64_t psrc2_l = op2 & mask(halfSize);
534 hiResult = ((psrc1_l * psrc2_h + psrc1_h * psrc2_l +
535 ((psrc1_l * psrc2_l) / shifter)) /shifter) +
536 psrc1_h * psrc2_h;

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

548 ccFlagBits = ccFlagBits & ~(ext & (CFBit | OFBit | ECFBit));
549 }
550 '''
551
552 class Mul1u(WrRegOp):
553 code = '''
554 ProdLow = psrc1 * op2;
555 int halfSize = (dataSize * 8) / 2;
529 uint64_t hiResult;
530 uint64_t psrc1_h = psrc1 / shifter;
531 uint64_t psrc1_l = psrc1 & mask(halfSize);
532 uint64_t psrc2_h = (op2 / shifter) & mask(halfSize);
533 uint64_t psrc2_l = op2 & mask(halfSize);
534 hiResult = ((psrc1_l * psrc2_h + psrc1_h * psrc2_l +
535 ((psrc1_l * psrc2_l) / shifter)) /shifter) +
536 psrc1_h * psrc2_h;

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

548 ccFlagBits = ccFlagBits & ~(ext & (CFBit | OFBit | ECFBit));
549 }
550 '''
551
552 class Mul1u(WrRegOp):
553 code = '''
554 ProdLow = psrc1 * op2;
555 int halfSize = (dataSize * 8) / 2;
556 uint64_t shifter = (1ULL << halfSize);
556 uint64_t shifter = (ULL(1) << halfSize);
557 uint64_t psrc1_h = psrc1 / shifter;
558 uint64_t psrc1_l = psrc1 & mask(halfSize);
559 uint64_t psrc2_h = (op2 / shifter) & mask(halfSize);
560 uint64_t psrc2_l = op2 & mask(halfSize);
561 ProdHi = ((psrc1_l * psrc2_h + psrc1_h * psrc2_l +
562 ((psrc1_l * psrc2_l) / shifter)) / shifter) +
563 psrc1_h * psrc2_h;
564 '''

--- 869 unchanged lines hidden ---
557 uint64_t psrc1_h = psrc1 / shifter;
558 uint64_t psrc1_l = psrc1 & mask(halfSize);
559 uint64_t psrc2_h = (op2 / shifter) & mask(halfSize);
560 uint64_t psrc2_l = op2 & mask(halfSize);
561 ProdHi = ((psrc1_l * psrc2_h + psrc1_h * psrc2_l +
562 ((psrc1_l * psrc2_l) / shifter)) / shifter) +
563 psrc1_h * psrc2_h;
564 '''

--- 869 unchanged lines hidden ---