specialize.isa (4563:a2dab6654eee) | specialize.isa (4568:65dcd045da1d) |
---|---|
1// -*- mode:c++ -*- 2 3// Copyright (c) 2007 The Hewlett-Packard Development Company 4// All rights reserved. 5// 6// Redistribution and use of this software in source and binary forms, 7// with or without modification, are permitted provided that the 8// following conditions are met: --- 87 unchanged lines hidden (view full) --- 96 self.rsize = match.group("rsize") 97 98 ModRMRegIndex = "(MODRM_REG | (REX_R << 3))" 99 ModRMRMIndex = "(MODRM_RM | (REX_B << 3))" 100 101 # This function specializes the given piece of code to use a particular 102 # set of argument types described by "opTypes". 103 def specializeInst(Name, opTypes, env): | 1// -*- mode:c++ -*- 2 3// Copyright (c) 2007 The Hewlett-Packard Development Company 4// All rights reserved. 5// 6// Redistribution and use of this software in source and binary forms, 7// with or without modification, are permitted provided that the 8// following conditions are met: --- 87 unchanged lines hidden (view full) --- 96 self.rsize = match.group("rsize") 97 98 ModRMRegIndex = "(MODRM_REG | (REX_R << 3))" 99 ModRMRMIndex = "(MODRM_RM | (REX_B << 3))" 100 101 # This function specializes the given piece of code to use a particular 102 # set of argument types described by "opTypes". 103 def specializeInst(Name, opTypes, env): |
104 print "Specializing %s with opTypes %s" % (Name, opTypes) | 104 # print "Specializing %s with opTypes %s" % (Name, opTypes) |
105 while len(opTypes): 106 # Parse the operand type string we're working with 107 opType = OpType(opTypes[0]) 108 109 if opType.reg: 110 #Figure out what to do with fixed register operands 111 #This is the index to use, so we should stick it some place. 112 if opType.reg in ("A", "B", "C", "D"): --- 51 unchanged lines hidden --- | 105 while len(opTypes): 106 # Parse the operand type string we're working with 107 opType = OpType(opTypes[0]) 108 109 if opType.reg: 110 #Figure out what to do with fixed register operands 111 #This is the index to use, so we should stick it some place. 112 if opType.reg in ("A", "B", "C", "D"): --- 51 unchanged lines hidden --- |