limmop.isa (4576:31f715613103) limmop.isa (4581:23166f771fa4)
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

--- 65 unchanged lines hidden (view full) ---

74def template MicroLimmOpDeclare {{
75 class %(class_name)s : public X86MicroopBase
76 {
77 protected:
78 const RegIndex dest;
79 const uint64_t imm;
80 void buildMe();
81
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

--- 65 unchanged lines hidden (view full) ---

74def template MicroLimmOpDeclare {{
75 class %(class_name)s : public X86MicroopBase
76 {
77 protected:
78 const RegIndex dest;
79 const uint64_t imm;
80 void buildMe();
81
82 std::string generateDisassembly(Addr pc,
83 const SymbolTable *symtab) const;
84
82 public:
83 %(class_name)s(ExtMachInst _machInst,
84 const char * instMnem,
85 bool isMicro, bool isDelayed, bool isFirst, bool isLast,
86 RegIndex _dest, uint64_t _imm);
87
88 %(class_name)s(ExtMachInst _machInst,
89 const char * instMnem,
90 RegIndex _dest, uint64_t _imm);
91
92 %(BasicExecDeclare)s
93 };
94}};
95
85 public:
86 %(class_name)s(ExtMachInst _machInst,
87 const char * instMnem,
88 bool isMicro, bool isDelayed, bool isFirst, bool isLast,
89 RegIndex _dest, uint64_t _imm);
90
91 %(class_name)s(ExtMachInst _machInst,
92 const char * instMnem,
93 RegIndex _dest, uint64_t _imm);
94
95 %(BasicExecDeclare)s
96 };
97}};
98
99def template MicroLimmOpDisassembly {{
100 std::string %(class_name)s::generateDisassembly(Addr pc,
101 const SymbolTable *symtab) const
102 {
103 std::stringstream response;
104
105 printMnemonic(response, instMnem, mnemonic);
106 printReg(response, dest);
107 response << ", ";
108 ccprintf(response, "%#x", imm);
109 return response.str();
110 }
111}};
112
96def template MicroLimmOpConstructor {{
97
98 inline void %(class_name)s::buildMe()
99 {
100 %(constructor)s;
101 }
102
103 inline %(class_name)s::%(class_name)s(

--- 39 unchanged lines hidden (view full) ---

143}};
144
145let {{
146 # Build up the all register version of this micro op
147 iop = InstObjParams("limm", "Limm", 'X86MicroopBase',
148 {"code" : "DestReg = imm;"})
149 header_output += MicroLimmOpDeclare.subst(iop)
150 decoder_output += MicroLimmOpConstructor.subst(iop)
113def template MicroLimmOpConstructor {{
114
115 inline void %(class_name)s::buildMe()
116 {
117 %(constructor)s;
118 }
119
120 inline %(class_name)s::%(class_name)s(

--- 39 unchanged lines hidden (view full) ---

160}};
161
162let {{
163 # Build up the all register version of this micro op
164 iop = InstObjParams("limm", "Limm", 'X86MicroopBase',
165 {"code" : "DestReg = imm;"})
166 header_output += MicroLimmOpDeclare.subst(iop)
167 decoder_output += MicroLimmOpConstructor.subst(iop)
168 decoder_output += MicroLimmOpDisassembly.subst(iop)
151 exec_output += MicroLimmOpExecute.subst(iop)
152}};
169 exec_output += MicroLimmOpExecute.subst(iop)
170}};