static_inst.hh (12614:0bc465e1f5fb) static_inst.hh (12616:4b463b4dc098)
1/*
2 * Copyright (c) 2006-2007 The Regents of The University of Michigan
3 * All rights reserved.
4 * Copyright 2017 Google Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

85/**
86 * Base class for all SPARC static instructions.
87 */
88class SparcStaticInst : public StaticInst
89{
90 protected:
91 using StaticInst::StaticInst;
92
1/*
2 * Copyright (c) 2006-2007 The Regents of The University of Michigan
3 * All rights reserved.
4 * Copyright 2017 Google Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

85/**
86 * Base class for all SPARC static instructions.
87 */
88class SparcStaticInst : public StaticInst
89{
90 protected:
91 using StaticInst::StaticInst;
92
93 std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const;
93 std::string generateDisassembly(
94 Addr pc, const SymbolTable *symtab) const override;
94
95 static void printMnemonic(std::ostream &os, const char *mnemonic);
96 static void printReg(std::ostream &os, RegId reg);
97
98 void printSrcReg(std::ostream &os, int reg) const;
99 void printDestReg(std::ostream &os, int reg) const;
100
101 void printRegArray(std::ostream &os,
102 const RegId indexArray[], int num) const;
103
95
96 static void printMnemonic(std::ostream &os, const char *mnemonic);
97 static void printReg(std::ostream &os, RegId reg);
98
99 void printSrcReg(std::ostream &os, int reg) const;
100 void printDestReg(std::ostream &os, int reg) const;
101
102 void printRegArray(std::ostream &os,
103 const RegId indexArray[], int num) const;
104
104 void advancePC(PCState &pcState) const;
105 void advancePC(PCState &pcState) const override;
105
106 static bool passesFpCondition(uint32_t fcc, uint32_t condition);
107 static bool passesCondition(uint32_t codes, uint32_t condition);
108
109 size_t
110 asBytes(void *buf, size_t size) override
111 {
112 return simpleAsBytes(buf, size, machInst);
113 }
114};
115
116}
117
118#endif //__ARCH_SPARC_INSTS_STATIC_INST_HH__
106
107 static bool passesFpCondition(uint32_t fcc, uint32_t condition);
108 static bool passesCondition(uint32_t codes, uint32_t condition);
109
110 size_t
111 asBytes(void *buf, size_t size) override
112 {
113 return simpleAsBytes(buf, size, machInst);
114 }
115};
116
117}
118
119#endif //__ARCH_SPARC_INSTS_STATIC_INST_HH__