limmop.isa (4792:ccab7ba2c6e5) limmop.isa (4804:4a707cb7065b)
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

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

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

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

73
74def template MicroLimmOpDeclare {{
75 class %(class_name)s : public X86ISA::X86MicroopBase
76 {
77 protected:
78 const RegIndex dest;
79 const uint64_t imm;
80 const uint8_t dataSize;
81 RegIndex foldOBit;
81 void buildMe();
82
83 std::string generateDisassembly(Addr pc,
84 const SymbolTable *symtab) const;
85
86 public:
87 %(class_name)s(ExtMachInst _machInst,
88 const char * instMnem,

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

99
100def template MicroLimmOpDisassembly {{
101 std::string %(class_name)s::generateDisassembly(Addr pc,
102 const SymbolTable *symtab) const
103 {
104 std::stringstream response;
105
106 printMnemonic(response, instMnem, mnemonic);
82 void buildMe();
83
84 std::string generateDisassembly(Addr pc,
85 const SymbolTable *symtab) const;
86
87 public:
88 %(class_name)s(ExtMachInst _machInst,
89 const char * instMnem,

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

100
101def template MicroLimmOpDisassembly {{
102 std::string %(class_name)s::generateDisassembly(Addr pc,
103 const SymbolTable *symtab) const
104 {
105 std::stringstream response;
106
107 printMnemonic(response, instMnem, mnemonic);
107 printReg(response, dest, dataSize);
108 printDestReg(response, 0, dataSize);
108 response << ", ";
109 ccprintf(response, "%#x", imm);
110 return response.str();
111 }
112}};
113
114def template MicroLimmOpConstructor {{
115
116 inline void %(class_name)s::buildMe()
117 {
109 response << ", ";
110 ccprintf(response, "%#x", imm);
111 return response.str();
112 }
113}};
114
115def template MicroLimmOpConstructor {{
116
117 inline void %(class_name)s::buildMe()
118 {
119 foldOBit = (dataSize == 1 && !machInst.rex.present) ? 1 << 6 : 0;
118 %(constructor)s;
119 }
120
121 inline %(class_name)s::%(class_name)s(
122 ExtMachInst machInst, const char * instMnem,
123 RegIndex _dest, uint64_t _imm, uint8_t _dataSize) :
124 %(base_class)s(machInst, "%(mnemonic)s", instMnem,
125 false, false, false, false, %(op_class)s),

--- 48 unchanged lines hidden ---
120 %(constructor)s;
121 }
122
123 inline %(class_name)s::%(class_name)s(
124 ExtMachInst machInst, const char * instMnem,
125 RegIndex _dest, uint64_t _imm, uint8_t _dataSize) :
126 %(base_class)s(machInst, "%(mnemonic)s", instMnem,
127 false, false, false, false, %(op_class)s),

--- 48 unchanged lines hidden ---