Deleted Added
sdiff udiff text old ( 9918:2c7219e2d999 ) new ( 9920:028e4da64b42 )
full compact
1# Copyright (c) 2003-2005 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
9# notice, this list of conditions and the following disclaimer in the

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

492 return 0
493
494 def isFloatReg(self):
495 return 0
496
497 def isIntReg(self):
498 return 0
499
500 def isControlReg(self):
501 return 0
502
503 def isPCState(self):
504 return 0
505
506 def isPCPart(self):
507 return self.isPCState() and self.reg_spec

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

655 wb = '''
656 {
657 %s final_val = %s;
658 %s\n
659 if (traceData) { traceData->setData(final_val); }
660 }''' % (self.ctype, self.base_name, wp)
661 return wb
662
663class ControlRegOperand(Operand):
664 def isReg(self):
665 return 1
666
667 def isControlReg(self):
668 return 1
669
670 def makeConstructor(self, predRead, predWrite):

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

810 next_pos = match.end()
811 self.sort()
812 # enumerate source & dest register operands... used in building
813 # constructor later
814 self.numSrcRegs = 0
815 self.numDestRegs = 0
816 self.numFPDestRegs = 0
817 self.numIntDestRegs = 0
818 self.numMiscDestRegs = 0
819 self.memOperand = None
820
821 # Flags to keep track if one or more operands are to be read/written
822 # conditionally.
823 self.predRead = False
824 self.predWrite = False
825

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

830 self.numSrcRegs += 1
831 if op_desc.is_dest:
832 op_desc.dest_reg_idx = self.numDestRegs
833 self.numDestRegs += 1
834 if op_desc.isFloatReg():
835 self.numFPDestRegs += 1
836 elif op_desc.isIntReg():
837 self.numIntDestRegs += 1
838 elif op_desc.isControlReg():
839 self.numMiscDestRegs += 1
840 elif op_desc.isMem():
841 if self.memOperand:
842 error("Code block has more than one memory operand.")
843 self.memOperand = op_desc
844
845 # Check if this operand has read/write predication. If true, then

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

1025
1026 # The header of the constructor declares the variables to be used
1027 # in the body of the constructor.
1028 header = ''
1029 header += '\n\t_numSrcRegs = 0;'
1030 header += '\n\t_numDestRegs = 0;'
1031 header += '\n\t_numFPDestRegs = 0;'
1032 header += '\n\t_numIntDestRegs = 0;'
1033
1034 self.constructor = header + \
1035 self.operands.concatAttrStrings('constructor')
1036
1037 self.flags = self.operands.concatAttrLists('flags')
1038
1039 # Make a basic guess on the operand class (function unit type).
1040 # These are good enough for most cases, and can be overridden

--- 1094 unchanged lines hidden ---