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; |
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); |
108 printDestReg(response, 0, dataSize); |
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; |
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 --- |