isa_parser.py (3949:b6664282d899) isa_parser.py (3950:19a99edda63b)
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

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

1357 c += '\n\t_destRegIdx[%d] = %s + Ctrl_Base_DepTag;' % \
1358 (self.dest_reg_idx, self.reg_spec)
1359 return c
1360
1361 def makeRead(self):
1362 bit_select = 0
1363 if (self.ctype == 'float' or self.ctype == 'double'):
1364 error(0, 'Attempt to read control register as FP')
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

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

1357 c += '\n\t_destRegIdx[%d] = %s + Ctrl_Base_DepTag;' % \
1358 (self.dest_reg_idx, self.reg_spec)
1359 return c
1360
1361 def makeRead(self):
1362 bit_select = 0
1363 if (self.ctype == 'float' or self.ctype == 'double'):
1364 error(0, 'Attempt to read control register as FP')
1365 base = 'xc->readMiscRegOperandWithEffect(%s)' % self.reg_spec
1365 base = 'xc->readMiscRegOperandWithEffect(this, %s)' % self.src_reg_idx
1366 if self.size == self.dflt_size:
1367 return '%s = %s;\n' % (self.base_name, base)
1368 else:
1369 return '%s = bits(%s, %d, 0);\n' % \
1370 (self.base_name, base, self.size-1)
1371
1372 def makeWrite(self):
1373 if (self.ctype == 'float' or self.ctype == 'double'):

--- 511 unchanged lines hidden ---
1366 if self.size == self.dflt_size:
1367 return '%s = %s;\n' % (self.base_name, base)
1368 else:
1369 return '%s = bits(%s, %d, 0);\n' % \
1370 (self.base_name, base, self.size-1)
1371
1372 def makeWrite(self):
1373 if (self.ctype == 'float' or self.ctype == 'double'):

--- 511 unchanged lines hidden ---