specialize.isa (4868:99d4946469a1) | specialize.isa (5151:dec27c6c2b3b) |
---|---|
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: --- 158 unchanged lines hidden (view full) --- 167 memEnv = copy.copy(env) 168 memEnv.doModRM = True 169 return doSplitDecode("MODRM_MOD", 170 {"3" : (specializeInst, Name + "_R", copy.copy(opTypes), regEnv)}, 171 (doRipRelativeDecode, Name, copy.copy(opTypes), memEnv)) 172 elif opType.tag in ("I", "J"): 173 # Immediates 174 Name += "_I" | 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: --- 158 unchanged lines hidden (view full) --- 167 memEnv = copy.copy(env) 168 memEnv.doModRM = True 169 return doSplitDecode("MODRM_MOD", 170 {"3" : (specializeInst, Name + "_R", copy.copy(opTypes), regEnv)}, 171 (doRipRelativeDecode, Name, copy.copy(opTypes), memEnv)) 172 elif opType.tag in ("I", "J"): 173 # Immediates 174 Name += "_I" |
175 elif opType.tag == "O": 176 # Immediate containing a memory offset 177 Name += "_MI" |
|
175 elif opType.tag in ("PR", "R", "VR"): 176 # Non register modrm settings should cause an error 177 env.addReg(ModRMRMIndex) 178 Name += "_R" 179 elif opType.tag in ("X", "Y"): 180 # This type of memory addressing is for string instructions. 181 # They'll use the right index and segment internally. 182 Name += "_M" 183 else: 184 raise Exception, "Unrecognized tag %s." % opType.tag 185 186 # Generate code to return a macroop of the given name which will 187 # operate in the "emulation environment" env 188 return genMacroop(Name, env) 189}}; | 178 elif opType.tag in ("PR", "R", "VR"): 179 # Non register modrm settings should cause an error 180 env.addReg(ModRMRMIndex) 181 Name += "_R" 182 elif opType.tag in ("X", "Y"): 183 # This type of memory addressing is for string instructions. 184 # They'll use the right index and segment internally. 185 Name += "_M" 186 else: 187 raise Exception, "Unrecognized tag %s." % opType.tag 188 189 # Generate code to return a macroop of the given name which will 190 # operate in the "emulation environment" env 191 return genMacroop(Name, env) 192}}; |