base.isa (4561:ade4960f0832) base.isa (4679:0b39fa8f5eb8)
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:

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

56// Authors: Gabe Black
57
58let {{
59 # This will be populated with mappings between microop mnemonics and
60 # the classes that represent them.
61 microopClasses = {}
62}};
63
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:

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

56// Authors: Gabe Black
57
58let {{
59 # This will be populated with mappings between microop mnemonics and
60 # the classes that represent them.
61 microopClasses = {}
62}};
63
64//A class which is the base of all x86 micro ops. It provides a function to
65//set necessary flags appropriately.
66output header {{
67 class X86MicroopBase : public X86StaticInst
68 {
69 protected:
70 const char * instMnem;
71 uint8_t opSize;
72 uint8_t addrSize;
73
74 X86MicroopBase(ExtMachInst _machInst,
75 const char *mnem, const char *_instMnem,
76 bool isMicro, bool isDelayed,
77 bool isFirst, bool isLast,
78 OpClass __opClass) :
79 X86StaticInst(mnem, _machInst, __opClass),
80 instMnem(_instMnem)
81 {
82 flags[IsMicroop] = isMicro;
83 flags[IsDelayedCommit] = isDelayed;
84 flags[IsFirstMicroop] = isFirst;
85 flags[IsLastMicroop] = isLast;
86 }
87
88 std::string generateDisassembly(Addr pc,
89 const SymbolTable *symtab) const
90 {
91 std::stringstream ss;
92
93 ccprintf(ss, "\t%s.%s", instMnem, mnemonic);
94
95 return ss.str();
96 }
97 };
98}};
99
100//////////////////////////////////////////////////////////////////////////
101//
102// Base class for the python representation of x86 microops
103//
104//////////////////////////////////////////////////////////////////////////
105
106let {{
107 class X86Microop(object):

--- 29 unchanged lines hidden ---
64//////////////////////////////////////////////////////////////////////////
65//
66// Base class for the python representation of x86 microops
67//
68//////////////////////////////////////////////////////////////////////////
69
70let {{
71 class X86Microop(object):

--- 29 unchanged lines hidden ---