specialize.isa (5241:a6602acdd046) | specialize.isa (5294:7222bdaed33b) |
---|---|
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: --- 140 unchanged lines hidden (view full) --- 149 elif opType.tag == "M": 150 # This refers to memory. The macroop constructor sets up modrm 151 # addressing. Non memory modrm settings should cause an error. 152 env.doModRM = True 153 return doRipRelativeDecode(Name, opTypes, env) 154 elif opType.tag == None or opType.size == None: 155 raise Exception, "Problem parsing operand tag: %s" % opType.tag 156 elif opType.tag == "C": | 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: --- 140 unchanged lines hidden (view full) --- 149 elif opType.tag == "M": 150 # This refers to memory. The macroop constructor sets up modrm 151 # addressing. Non memory modrm settings should cause an error. 152 env.doModRM = True 153 return doRipRelativeDecode(Name, opTypes, env) 154 elif opType.tag == None or opType.size == None: 155 raise Exception, "Problem parsing operand tag: %s" % opType.tag 156 elif opType.tag == "C": |
157 # A control register indexed by the "reg" field |
|
157 env.addReg(ModRMRegIndex) 158 Name += "_C" 159 elif opType.tag == "D": | 158 env.addReg(ModRMRegIndex) 159 Name += "_C" 160 elif opType.tag == "D": |
161 # A debug register indexed by the "reg" field |
|
160 env.addReg(ModRMRegIndex) 161 Name += "_D" | 162 env.addReg(ModRMRegIndex) 163 Name += "_D" |
162 elif opType.tag in ("G", "P", "S", "T", "V"): | 164 elif opType.tag == "S": 165 # A segment selector register indexed by the "reg" field 166 env.addReg(ModRMRegIndex) 167 Name += "_S" 168 elif opType.tag in ("G", "P", "T", "V"): |
163 # Use the "reg" field of the ModRM byte to select the register 164 env.addReg(ModRMRegIndex) 165 Name += "_R" 166 elif opType.tag in ("E", "Q", "W"): 167 # This might refer to memory or to a register. We need to 168 # divide it up farther. 169 regEnv = copy.copy(env) 170 regEnv.addReg(ModRMRMIndex) --- 28 unchanged lines hidden --- | 169 # Use the "reg" field of the ModRM byte to select the register 170 env.addReg(ModRMRegIndex) 171 Name += "_R" 172 elif opType.tag in ("E", "Q", "W"): 173 # This might refer to memory or to a register. We need to 174 # divide it up farther. 175 regEnv = copy.copy(env) 176 regEnv.addReg(ModRMRMIndex) --- 28 unchanged lines hidden --- |