regop.isa (5116:91881e9404de) regop.isa (5138:069bbeae1ef8)
1// Copyright (c) 2007 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

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

477 code = 'DestReg = merge(DestReg, psrc1 + op2, dataSize);'
478
479 class Or(LogicRegOp):
480 code = 'DestReg = merge(DestReg, psrc1 | op2, dataSize);'
481
482 class Adc(FlagRegOp):
483 code = '''
484 CCFlagBits flags = ccFlagBits;
1// Copyright (c) 2007 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

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

477 code = 'DestReg = merge(DestReg, psrc1 + op2, dataSize);'
478
479 class Or(LogicRegOp):
480 code = 'DestReg = merge(DestReg, psrc1 | op2, dataSize);'
481
482 class Adc(FlagRegOp):
483 code = '''
484 CCFlagBits flags = ccFlagBits;
485 DestReg = merge(DestReg, psrc1 + op2 + flags.CF, dataSize);
485 DestReg = merge(DestReg, psrc1 + op2 + flags.cf, dataSize);
486 '''
487
488 class Sbb(SubRegOp):
489 code = '''
490 CCFlagBits flags = ccFlagBits;
486 '''
487
488 class Sbb(SubRegOp):
489 code = '''
490 CCFlagBits flags = ccFlagBits;
491 DestReg = merge(DestReg, psrc1 - op2 - flags.CF, dataSize);
491 DestReg = merge(DestReg, psrc1 - op2 - flags.cf, dataSize);
492 '''
493
494 class And(LogicRegOp):
495 code = 'DestReg = merge(DestReg, psrc1 & op2, dataSize)'
496
497 class Sub(SubRegOp):
498 code = 'DestReg = merge(DestReg, psrc1 - op2, dataSize)'
499

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

728
729 class Rcr(RegOp):
730 code = '''
731 uint8_t shiftAmt =
732 (op2 & ((dataSize == 8) ? mask(6) : mask(5)));
733 if(shiftAmt)
734 {
735 CCFlagBits flags = ccFlagBits;
492 '''
493
494 class And(LogicRegOp):
495 code = 'DestReg = merge(DestReg, psrc1 & op2, dataSize)'
496
497 class Sub(SubRegOp):
498 code = 'DestReg = merge(DestReg, psrc1 - op2, dataSize)'
499

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

728
729 class Rcr(RegOp):
730 code = '''
731 uint8_t shiftAmt =
732 (op2 & ((dataSize == 8) ? mask(6) : mask(5)));
733 if(shiftAmt)
734 {
735 CCFlagBits flags = ccFlagBits;
736 uint64_t top = flags.CF << (dataSize * 8 - shiftAmt);
736 uint64_t top = flags.cf << (dataSize * 8 - shiftAmt);
737 if(shiftAmt > 1)
738 top |= psrc1 << (dataSize * 8 - shiftAmt - 1);
739 uint64_t bottom = bits(psrc1, dataSize * 8, shiftAmt);
740 DestReg = merge(DestReg, top | bottom, dataSize);
741 }
742 else
743 DestReg = DestReg;
744 '''

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

799 class Rcl(RegOp):
800 code = '''
801 uint8_t shiftAmt =
802 (op2 & ((dataSize == 8) ? mask(6) : mask(5)));
803 if(shiftAmt)
804 {
805 CCFlagBits flags = ccFlagBits;
806 uint64_t top = psrc1 << shiftAmt;
737 if(shiftAmt > 1)
738 top |= psrc1 << (dataSize * 8 - shiftAmt - 1);
739 uint64_t bottom = bits(psrc1, dataSize * 8, shiftAmt);
740 DestReg = merge(DestReg, top | bottom, dataSize);
741 }
742 else
743 DestReg = DestReg;
744 '''

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

799 class Rcl(RegOp):
800 code = '''
801 uint8_t shiftAmt =
802 (op2 & ((dataSize == 8) ? mask(6) : mask(5)));
803 if(shiftAmt)
804 {
805 CCFlagBits flags = ccFlagBits;
806 uint64_t top = psrc1 << shiftAmt;
807 uint64_t bottom = flags.CF << (shiftAmt - 1);
807 uint64_t bottom = flags.cf << (shiftAmt - 1);
808 if(shiftAmt > 1)
809 bottom |=
810 bits(psrc1, dataSize * 8 - 1,
811 dataSize * 8 - shiftAmt + 1);
812 DestReg = merge(DestReg, top | bottom, dataSize);
813 }
814 else
815 DestReg = DestReg;

--- 62 unchanged lines hidden ---
808 if(shiftAmt > 1)
809 bottom |=
810 bits(psrc1, dataSize * 8 - 1,
811 dataSize * 8 - shiftAmt + 1);
812 DestReg = merge(DestReg, top | bottom, dataSize);
813 }
814 else
815 DestReg = DestReg;

--- 62 unchanged lines hidden ---