macroop.isa (5161:e7334f2d7bef) | macroop.isa (5666:e7925fa8f0d6) |
---|---|
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; | 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; |
|
79 80 //Constructor. 81 Macroop(const char *mnem, ExtMachInst _machInst, | 80 81 //Constructor. 82 Macroop(const char *mnem, ExtMachInst _machInst, |
82 uint32_t _numMicroops) | 83 uint32_t _numMicroops, X86ISA::EmulEnv _emulEnv) |
83 : StaticInst(mnem, _machInst, No_OpClass), | 84 : StaticInst(mnem, _machInst, No_OpClass), |
84 numMicroops(_numMicroops) | 85 numMicroops(_numMicroops), emulEnv(_emulEnv) |
85 { 86 assert(numMicroops); 87 microops = new StaticInstPtr[numMicroops]; 88 flags[IsMacroop] = true; 89 } 90 91 ~Macroop() 92 { --- 9 unchanged lines hidden (view full) --- 102 } 103 104 std::string generateDisassembly(Addr pc, 105 const SymbolTable *symtab) const 106 { 107 return mnemonic; 108 } 109 | 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: |
|
110 %(MacroExecPanic)s | 112 %(MacroExecPanic)s |
113 114 ExtMachInst 115 getExtMachInst() 116 { 117 return machInst; 118 } 119 120 X86ISA::EmulEnv 121 getEmulEnv() 122 { 123 return emulEnv; 124 } |
|
111 }; 112}}; 113 114////////////////////////////////////////////////////////////////////////////// 115// 116// X86 specific 117// 118////////////////////////////////////////////////////////////////////////////// --- 15 unchanged lines hidden (view full) --- 134 }; 135 }; 136}}; 137 138// Basic instruction class constructor template. 139def template MacroConstructor {{ 140 inline X86Macroop::%(class_name)s::%(class_name)s( 141 ExtMachInst machInst, EmulEnv env) | 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) |
142 : %(base_class)s("%(mnemonic)s", machInst, %(num_microops)s) | 156 : %(base_class)s("%(mnemonic)s", machInst, %(num_microops)s, env) |
143 { 144 %(adjust_env)s; 145 %(adjust_imm)s; 146 %(adjust_disp)s; 147 %(do_modrm)s; 148 %(constructor)s; 149 //alloc_microops is the code that sets up the microops 150 //array in the parent class. --- 149 unchanged lines hidden --- | 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 --- |