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: --- 62 unchanged lines hidden (view full) --- 71 72output header {{ 73 74 // Base class for combinationally generated macroops 75 class Macroop : public StaticInst 76 { 77 protected: 78 const uint32_t numMicroops; |
79 X86ISA::EmulEnv emulEnv; |
80 81 //Constructor. 82 Macroop(const char *mnem, ExtMachInst _machInst, |
83 uint32_t _numMicroops, X86ISA::EmulEnv _emulEnv) |
84 : StaticInst(mnem, _machInst, No_OpClass), |
85 numMicroops(_numMicroops), emulEnv(_emulEnv) |
86 { 87 assert(numMicroops); 88 microops = new StaticInstPtr[numMicroops]; 89 flags[IsMacroop] = true; 90 } 91 92 ~Macroop() 93 { --- 9 unchanged lines hidden (view full) --- 103 } 104 105 std::string generateDisassembly(Addr pc, 106 const SymbolTable *symtab) const 107 { 108 return mnemonic; 109 } 110 |
111 public: |
112 %(MacroExecPanic)s |
113 114 ExtMachInst 115 getExtMachInst() 116 { 117 return machInst; 118 } 119 120 X86ISA::EmulEnv 121 getEmulEnv() 122 { 123 return emulEnv; 124 } |
125 }; 126}}; 127 128////////////////////////////////////////////////////////////////////////////// 129// 130// X86 specific 131// 132////////////////////////////////////////////////////////////////////////////// --- 15 unchanged lines hidden (view full) --- 148 }; 149 }; 150}}; 151 152// Basic instruction class constructor template. 153def template MacroConstructor {{ 154 inline X86Macroop::%(class_name)s::%(class_name)s( 155 ExtMachInst machInst, EmulEnv env) |
156 : %(base_class)s("%(mnemonic)s", machInst, %(num_microops)s, env) |
157 { 158 %(adjust_env)s; 159 %(adjust_imm)s; 160 %(adjust_disp)s; 161 %(do_modrm)s; 162 %(constructor)s; 163 //alloc_microops is the code that sets up the microops 164 //array in the parent class. --- 149 unchanged lines hidden --- |