ldstop.isa (5118:f1b1cb6d0fbe) | ldstop.isa (5149:356e00996637) |
---|---|
1// Copyright (c) 2007 The Hewlett-Packard Development Company 2// All rights reserved. 3// 4// Redistribution and use of this software in source and binary forms, 5// with or without modification, are permitted provided that the 6// following conditions are met: 7// 8// The software must be used only for Non-Commercial Use which means any --- 311 unchanged lines hidden (view full) --- 320 _dataSize, _addressSize, %(op_class)s) 321 { 322 buildMe(); 323 } 324}}; 325 326let {{ 327 class LdStOp(X86Microop): | 1// Copyright (c) 2007 The Hewlett-Packard Development Company 2// All rights reserved. 3// 4// Redistribution and use of this software in source and binary forms, 5// with or without modification, are permitted provided that the 6// following conditions are met: 7// 8// The software must be used only for Non-Commercial Use which means any --- 311 unchanged lines hidden (view full) --- 320 _dataSize, _addressSize, %(op_class)s) 321 { 322 buildMe(); 323 } 324}}; 325 326let {{ 327 class LdStOp(X86Microop): |
328 def __init__(self, data, segment, addr, disp, dataSize): | 328 def __init__(self, data, segment, addr, disp, dataSize, addressSize): |
329 self.data = data 330 [self.scale, self.index, self.base] = addr 331 self.disp = disp 332 self.segment = segment 333 self.dataSize = dataSize | 329 self.data = data 330 [self.scale, self.index, self.base] = addr 331 self.disp = disp 332 self.segment = segment 333 self.dataSize = dataSize |
334 self.addressSize = "env.addressSize" | 334 self.addressSize = addressSize |
335 336 def getAllocator(self, *microFlags): 337 allocator = '''new %(class_name)s(machInst, mnemonic 338 %(flags)s, %(scale)s, %(index)s, %(base)s, 339 %(disp)s, %(segment)s, %(data)s, 340 %(dataSize)s, %(addressSize)s)''' % { 341 "class_name" : self.className, 342 "flags" : self.microFlagsText(microFlags), --- 30 unchanged lines hidden (view full) --- 373 "mem_flags": mem_flags}) 374 header_output += MicroLdStOpDeclare.subst(iop) 375 decoder_output += MicroLdStOpConstructor.subst(iop) 376 exec_output += MicroLoadExecute.subst(iop) 377 exec_output += MicroLoadInitiateAcc.subst(iop) 378 exec_output += MicroLoadCompleteAcc.subst(iop) 379 380 class LoadOp(LdStOp): | 335 336 def getAllocator(self, *microFlags): 337 allocator = '''new %(class_name)s(machInst, mnemonic 338 %(flags)s, %(scale)s, %(index)s, %(base)s, 339 %(disp)s, %(segment)s, %(data)s, 340 %(dataSize)s, %(addressSize)s)''' % { 341 "class_name" : self.className, 342 "flags" : self.microFlagsText(microFlags), --- 30 unchanged lines hidden (view full) --- 373 "mem_flags": mem_flags}) 374 header_output += MicroLdStOpDeclare.subst(iop) 375 decoder_output += MicroLdStOpConstructor.subst(iop) 376 exec_output += MicroLoadExecute.subst(iop) 377 exec_output += MicroLoadInitiateAcc.subst(iop) 378 exec_output += MicroLoadCompleteAcc.subst(iop) 379 380 class LoadOp(LdStOp): |
381 def __init__(self, data, segment, addr, 382 disp = 0, dataSize="env.dataSize"): | 381 def __init__(self, data, segment, addr, disp = 0, 382 dataSize="env.dataSize", addressSize="env.addressSize"): |
383 super(LoadOp, self).__init__(data, segment, | 383 super(LoadOp, self).__init__(data, segment, |
384 addr, disp, dataSize) | 384 addr, disp, dataSize, addressSize) |
385 self.className = Name 386 self.mnemonic = name 387 388 microopClasses[name] = LoadOp 389 390 defineMicroLoadOp('Ld', 'Data = merge(Data, Mem, dataSize);') 391 defineMicroLoadOp('Ldst', 'Data = merge(Data, Mem, dataSize);', 'StoreCheck') 392 defineMicroLoadOp('Ldfp', 'FpData.uqw = Mem;') --- 13 unchanged lines hidden (view full) --- 406 "mem_flags": mem_flags}) 407 header_output += MicroLdStOpDeclare.subst(iop) 408 decoder_output += MicroLdStOpConstructor.subst(iop) 409 exec_output += MicroStoreExecute.subst(iop) 410 exec_output += MicroStoreInitiateAcc.subst(iop) 411 exec_output += MicroStoreCompleteAcc.subst(iop) 412 413 class StoreOp(LdStOp): | 385 self.className = Name 386 self.mnemonic = name 387 388 microopClasses[name] = LoadOp 389 390 defineMicroLoadOp('Ld', 'Data = merge(Data, Mem, dataSize);') 391 defineMicroLoadOp('Ldst', 'Data = merge(Data, Mem, dataSize);', 'StoreCheck') 392 defineMicroLoadOp('Ldfp', 'FpData.uqw = Mem;') --- 13 unchanged lines hidden (view full) --- 406 "mem_flags": mem_flags}) 407 header_output += MicroLdStOpDeclare.subst(iop) 408 decoder_output += MicroLdStOpConstructor.subst(iop) 409 exec_output += MicroStoreExecute.subst(iop) 410 exec_output += MicroStoreInitiateAcc.subst(iop) 411 exec_output += MicroStoreCompleteAcc.subst(iop) 412 413 class StoreOp(LdStOp): |
414 def __init__(self, data, segment, addr, 415 disp = 0, dataSize="env.dataSize"): | 414 def __init__(self, data, segment, addr, disp = 0, 415 dataSize="env.dataSize", addressSize="env.addressSize"): |
416 super(StoreOp, self).__init__(data, segment, | 416 super(StoreOp, self).__init__(data, segment, |
417 addr, disp, dataSize) | 417 addr, disp, dataSize, addressSize) |
418 self.className = Name 419 self.mnemonic = name 420 421 microopClasses[name] = StoreOp 422 423 defineMicroStoreOp('St', 'Mem = Data;') 424 defineMicroStoreOp('Stfp', 'Mem = FpData.uqw;') 425 426 iop = InstObjParams("lea", "Lea", 'X86ISA::LdStOp', 427 {"code": "Data = merge(Data, EA, dataSize);", 428 "ea_code": calculateEA, 429 "mem_flags": 0}) 430 header_output += MicroLeaDeclare.subst(iop) 431 decoder_output += MicroLdStOpConstructor.subst(iop) 432 exec_output += MicroLeaExecute.subst(iop) 433 434 class LeaOp(LdStOp): | 418 self.className = Name 419 self.mnemonic = name 420 421 microopClasses[name] = StoreOp 422 423 defineMicroStoreOp('St', 'Mem = Data;') 424 defineMicroStoreOp('Stfp', 'Mem = FpData.uqw;') 425 426 iop = InstObjParams("lea", "Lea", 'X86ISA::LdStOp', 427 {"code": "Data = merge(Data, EA, dataSize);", 428 "ea_code": calculateEA, 429 "mem_flags": 0}) 430 header_output += MicroLeaDeclare.subst(iop) 431 decoder_output += MicroLdStOpConstructor.subst(iop) 432 exec_output += MicroLeaExecute.subst(iop) 433 434 class LeaOp(LdStOp): |
435 def __init__(self, data, segment, addr, 436 disp = 0, dataSize="env.dataSize"): | 435 def __init__(self, data, segment, addr, disp = 0, 436 dataSize="env.dataSize", addressSize="env.addressSize"): |
437 super(LeaOp, self).__init__(data, segment, | 437 super(LeaOp, self).__init__(data, segment, |
438 addr, disp, dataSize) | 438 addr, disp, dataSize, addressSize) |
439 self.className = "Lea" 440 self.mnemonic = "lea" 441 442 microopClasses["lea"] = LeaOp 443}}; 444 | 439 self.className = "Lea" 440 self.mnemonic = "lea" 441 442 microopClasses["lea"] = LeaOp 443}}; 444 |