def set_constraints(self, ii, state_space): #FIXME: this assumes, that there are no contradictions #between constraints on the same operand. #If there are, e.g. MOD=3 ... MOD=1, both values will be #set as legal.. check such things here? #set constraints that come from operands deciders xed3_nt.get_ii_constraints(ii, state_space, self.constraints) #print "CONSTRAINTS: {}".format(self.constraints) #special care for VEXVALID - it makes it easy to dispatch #vex and legacy instructions: #for legacy we will explicitly set VEXVALID=0 if _vexvalid_op not in self.constraints: self.constraints[_vexvalid_op] = {0: True}
def set_constraints(self, ii, state_space): #FIXME: this assumes, that there are no contradictions #between constraints on the same operand. #If there are, e.g. MOD=3 ... MOD=1, both values will be #set as legal.. check such things here? #set constraints that come from operands deciders xed3_nt.get_ii_constraints(ii, state_space, self.constraints) #print "CONSTRAINTS: {}".format(self.constraints) #special care for VEXVALID - it makes it easy to dispatch vex #and legacy instructions. For legacy we will explicitly set #VEXVALID=0. if 'VEXVALID' not in self.constraints: self.constraints['VEXVALID'] = {0: True} # since we dispatch at the high level on MAP and VEXVALID, we # should not include them in the standard constraints. self.special_constraints = {} for od in ['MAP', 'VEXVALID']: if od in self.constraints: self.special_constraints[od] = self.constraints[od] del self.constraints[od]