microfpop.hh revision 6345
15083Sgblack@eecs.umich.edu/*
25083Sgblack@eecs.umich.edu * Copyright (c) 2007 The Hewlett-Packard Development Company
35083Sgblack@eecs.umich.edu * All rights reserved.
45083Sgblack@eecs.umich.edu *
55083Sgblack@eecs.umich.edu * Redistribution and use of this software in source and binary forms,
65083Sgblack@eecs.umich.edu * with or without modification, are permitted provided that the
75083Sgblack@eecs.umich.edu * following conditions are met:
85083Sgblack@eecs.umich.edu *
95083Sgblack@eecs.umich.edu * The software must be used only for Non-Commercial Use which means any
105083Sgblack@eecs.umich.edu * use which is NOT directed to receiving any direct monetary
115083Sgblack@eecs.umich.edu * compensation for, or commercial advantage from such use.  Illustrative
125083Sgblack@eecs.umich.edu * examples of non-commercial use are academic research, personal study,
135083Sgblack@eecs.umich.edu * teaching, education and corporate research & development.
145083Sgblack@eecs.umich.edu * Illustrative examples of commercial use are distributing products for
155083Sgblack@eecs.umich.edu * commercial advantage and providing services using the software for
165083Sgblack@eecs.umich.edu * commercial advantage.
175083Sgblack@eecs.umich.edu *
185083Sgblack@eecs.umich.edu * If you wish to use this software or functionality therein that may be
195083Sgblack@eecs.umich.edu * covered by patents for commercial use, please contact:
205083Sgblack@eecs.umich.edu *     Director of Intellectual Property Licensing
215083Sgblack@eecs.umich.edu *     Office of Strategy and Technology
225083Sgblack@eecs.umich.edu *     Hewlett-Packard Company
235083Sgblack@eecs.umich.edu *     1501 Page Mill Road
245083Sgblack@eecs.umich.edu *     Palo Alto, California  94304
255083Sgblack@eecs.umich.edu *
265083Sgblack@eecs.umich.edu * Redistributions of source code must retain the above copyright notice,
275083Sgblack@eecs.umich.edu * this list of conditions and the following disclaimer.  Redistributions
285083Sgblack@eecs.umich.edu * in binary form must reproduce the above copyright notice, this list of
295083Sgblack@eecs.umich.edu * conditions and the following disclaimer in the documentation and/or
305083Sgblack@eecs.umich.edu * other materials provided with the distribution.  Neither the name of
315083Sgblack@eecs.umich.edu * the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
325083Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from
335083Sgblack@eecs.umich.edu * this software without specific prior written permission.  No right of
345083Sgblack@eecs.umich.edu * sublicense is granted herewith.  Derivatives of the software and
355083Sgblack@eecs.umich.edu * output created using the software may be prepared, but only for
365083Sgblack@eecs.umich.edu * Non-Commercial Uses.  Derivatives of the software may be shared with
375083Sgblack@eecs.umich.edu * others provided: (i) the others agree to abide by the list of
385083Sgblack@eecs.umich.edu * conditions herein which includes the Non-Commercial Use restrictions;
395083Sgblack@eecs.umich.edu * and (ii) such Derivatives of the software include the above copyright
405083Sgblack@eecs.umich.edu * notice to acknowledge the contribution from this software where
415083Sgblack@eecs.umich.edu * applicable, this list of conditions and the disclaimer below.
425083Sgblack@eecs.umich.edu *
435083Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
445083Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
455083Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
465083Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
475083Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
485083Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
495083Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
505083Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
515083Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
525083Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
535083Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
545083Sgblack@eecs.umich.edu *
555083Sgblack@eecs.umich.edu * Authors: Gabe Black
565083Sgblack@eecs.umich.edu */
575083Sgblack@eecs.umich.edu
585083Sgblack@eecs.umich.edu#ifndef __ARCH_X86_INSTS_MICROFPOP_HH__
595083Sgblack@eecs.umich.edu#define __ARCH_X86_INSTS_MICROFPOP_HH__
605083Sgblack@eecs.umich.edu
615083Sgblack@eecs.umich.edu#include "arch/x86/insts/microop.hh"
625083Sgblack@eecs.umich.edu
635083Sgblack@eecs.umich.edunamespace X86ISA
645083Sgblack@eecs.umich.edu{
655083Sgblack@eecs.umich.edu
665083Sgblack@eecs.umich.edu    /**
675083Sgblack@eecs.umich.edu     * Base classes for FpOps which provides a generateDisassembly method.
685083Sgblack@eecs.umich.edu     */
695083Sgblack@eecs.umich.edu    class FpOp : public X86MicroopBase
705083Sgblack@eecs.umich.edu    {
715083Sgblack@eecs.umich.edu      protected:
725083Sgblack@eecs.umich.edu        const RegIndex src1;
735083Sgblack@eecs.umich.edu        const RegIndex src2;
745083Sgblack@eecs.umich.edu        const RegIndex dest;
755083Sgblack@eecs.umich.edu        const uint8_t dataSize;
765083Sgblack@eecs.umich.edu        const int8_t spm;
775083Sgblack@eecs.umich.edu
785083Sgblack@eecs.umich.edu        // Constructor
795083Sgblack@eecs.umich.edu        FpOp(ExtMachInst _machInst,
805083Sgblack@eecs.umich.edu                const char *mnem, const char *_instMnem,
815083Sgblack@eecs.umich.edu                bool isMicro, bool isDelayed,
825083Sgblack@eecs.umich.edu                bool isFirst, bool isLast,
836345Sgblack@eecs.umich.edu                InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
845083Sgblack@eecs.umich.edu                uint8_t _dataSize, int8_t _spm,
855083Sgblack@eecs.umich.edu                OpClass __opClass) :
865083Sgblack@eecs.umich.edu            X86MicroopBase(_machInst, mnem, _instMnem,
875083Sgblack@eecs.umich.edu                    isMicro, isDelayed, isFirst, isLast,
885083Sgblack@eecs.umich.edu                    __opClass),
896345Sgblack@eecs.umich.edu            src1(_src1.idx), src2(_src2.idx), dest(_dest.idx),
905083Sgblack@eecs.umich.edu            dataSize(_dataSize), spm(_spm)
915083Sgblack@eecs.umich.edu        {}
925083Sgblack@eecs.umich.edu/*
935083Sgblack@eecs.umich.edu        //Figure out what the condition code flags should be.
945083Sgblack@eecs.umich.edu        uint64_t genFlags(uint64_t oldFlags, uint64_t flagMask,
955083Sgblack@eecs.umich.edu                uint64_t _dest, uint64_t _src1, uint64_t _src2,
965083Sgblack@eecs.umich.edu                bool subtract = false) const;
975083Sgblack@eecs.umich.edu        bool checkCondition(uint64_t flags) const;*/
985083Sgblack@eecs.umich.edu
995083Sgblack@eecs.umich.edu        std::string generateDisassembly(Addr pc,
1005083Sgblack@eecs.umich.edu            const SymbolTable *symtab) const;
1015083Sgblack@eecs.umich.edu    };
1025083Sgblack@eecs.umich.edu}
1035083Sgblack@eecs.umich.edu
1045083Sgblack@eecs.umich.edu#endif //__ARCH_X86_INSTS_MICROFPOP_HH__
105