base.isa (4343:3f11bcf873b3) | base.isa (4344:174e31456abe) |
---|---|
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: --- 49 unchanged lines hidden (view full) --- 58//The operand types a microop template can be specialized with 59output header {{ 60 enum OperandType { 61 RegisterOperand, 62 ImmediateOperand 63 }; 64}}; 65 | 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: --- 49 unchanged lines hidden (view full) --- 58//The operand types a microop template can be specialized with 59output header {{ 60 enum OperandType { 61 RegisterOperand, 62 ImmediateOperand 63 }; 64}}; 65 |
66//A class which is the base of all x86 micro ops it provides a function to | 66//A class which is the base of all x86 micro ops. It provides a function to |
67//set necessary flags appropriately. 68output header {{ 69 class X86MicroOpBase : public X86StaticInst 70 { 71 protected: 72 uint8_t opSize; 73 uint8_t addrSize; 74 --- 17 unchanged lines hidden (view full) --- 92// behavior in microops. 93def template BaseMicroOpTemplateDeclare {{ 94 template%(signature)s 95 class %(class_name)s; 96}}; 97 98let {{ 99 def buildBaseMicroOpTemplate(Name, numParams): | 67//set necessary flags appropriately. 68output header {{ 69 class X86MicroOpBase : public X86StaticInst 70 { 71 protected: 72 uint8_t opSize; 73 uint8_t addrSize; 74 --- 17 unchanged lines hidden (view full) --- 92// behavior in microops. 93def template BaseMicroOpTemplateDeclare {{ 94 template%(signature)s 95 class %(class_name)s; 96}}; 97 98let {{ 99 def buildBaseMicroOpTemplate(Name, numParams): |
100 assert(numParams > 0) |
|
100 signature = "<" 101 signature += "int SignatureOperandTypeSpecifier0" 102 for count in xrange(1,numParams): 103 signature += \ 104 ", int SingatureOperandTypeSpecifier%d" % count 105 signature += ">" 106 subs = {"signature" : signature, "class_name" : Name} 107 return BaseMicroOpTemplateDeclare.subst(subs) | 101 signature = "<" 102 signature += "int SignatureOperandTypeSpecifier0" 103 for count in xrange(1,numParams): 104 signature += \ 105 ", int SingatureOperandTypeSpecifier%d" % count 106 signature += ">" 107 subs = {"signature" : signature, "class_name" : Name} 108 return BaseMicroOpTemplateDeclare.subst(subs) |
109}}; |
|
108 | 110 |
109 RegOpType = "RegisterOperand" 110 ImmOpType = "ImmediateOperand" 111 | 111let {{ |
112 def buildMicroOpTemplateDict(*params): 113 signature = "<" 114 if len(params): 115 signature += params[0] 116 if len(params) > 1: 117 for param in params[1:]: 118 signature += ", %s" % param 119 signature += ">" --- 56 unchanged lines hidden --- | 112 def buildMicroOpTemplateDict(*params): 113 signature = "<" 114 if len(params): 115 signature += params[0] 116 if len(params) > 1: 117 for param in params[1:]: 118 signature += ", %s" % param 119 signature += ">" --- 56 unchanged lines hidden --- |