microfpop.hh revision 12104:edd63f9c6184
16691Stjones1@inf.ed.ac.uk/* 26691Stjones1@inf.ed.ac.uk * Copyright (c) 2007 The Hewlett-Packard Development Company 36691Stjones1@inf.ed.ac.uk * All rights reserved. 46691Stjones1@inf.ed.ac.uk * 56691Stjones1@inf.ed.ac.uk * The license below extends only to copyright in the software and shall 66691Stjones1@inf.ed.ac.uk * not be construed as granting a license to any other intellectual 76691Stjones1@inf.ed.ac.uk * property including but not limited to intellectual property relating 86691Stjones1@inf.ed.ac.uk * to a hardware implementation of the functionality of the software 96691Stjones1@inf.ed.ac.uk * licensed hereunder. You may use the software subject to the license 106691Stjones1@inf.ed.ac.uk * terms below provided that you ensure that this notice is replicated 116691Stjones1@inf.ed.ac.uk * unmodified and in its entirety in all distributions of the software, 126691Stjones1@inf.ed.ac.uk * modified or unmodified, in source code or in binary form. 136691Stjones1@inf.ed.ac.uk * 146691Stjones1@inf.ed.ac.uk * Redistribution and use in source and binary forms, with or without 156691Stjones1@inf.ed.ac.uk * modification, are permitted provided that the following conditions are 166691Stjones1@inf.ed.ac.uk * met: redistributions of source code must retain the above copyright 176691Stjones1@inf.ed.ac.uk * notice, this list of conditions and the following disclaimer; 186691Stjones1@inf.ed.ac.uk * redistributions in binary form must reproduce the above copyright 196691Stjones1@inf.ed.ac.uk * notice, this list of conditions and the following disclaimer in the 206691Stjones1@inf.ed.ac.uk * documentation and/or other materials provided with the distribution; 216691Stjones1@inf.ed.ac.uk * neither the name of the copyright holders nor the names of its 226691Stjones1@inf.ed.ac.uk * contributors may be used to endorse or promote products derived from 236691Stjones1@inf.ed.ac.uk * this software without specific prior written permission. 246691Stjones1@inf.ed.ac.uk * 256691Stjones1@inf.ed.ac.uk * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 266691Stjones1@inf.ed.ac.uk * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 276691Stjones1@inf.ed.ac.uk * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 286691Stjones1@inf.ed.ac.uk * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 296691Stjones1@inf.ed.ac.uk * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 306691Stjones1@inf.ed.ac.uk * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 316691Stjones1@inf.ed.ac.uk * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 326691Stjones1@inf.ed.ac.uk * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 336691Stjones1@inf.ed.ac.uk * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 346691Stjones1@inf.ed.ac.uk * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 356691Stjones1@inf.ed.ac.uk * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 366691Stjones1@inf.ed.ac.uk * 376691Stjones1@inf.ed.ac.uk * Authors: Gabe Black 386691Stjones1@inf.ed.ac.uk */ 396691Stjones1@inf.ed.ac.uk 408232Snate@binkert.org#ifndef __ARCH_X86_INSTS_MICROFPOP_HH__ 416691Stjones1@inf.ed.ac.uk#define __ARCH_X86_INSTS_MICROFPOP_HH__ 426691Stjones1@inf.ed.ac.uk 436691Stjones1@inf.ed.ac.uk#include "arch/x86/insts/microop.hh" 446691Stjones1@inf.ed.ac.uk 456691Stjones1@inf.ed.ac.uknamespace X86ISA 466691Stjones1@inf.ed.ac.uk{ 476691Stjones1@inf.ed.ac.uk 486691Stjones1@inf.ed.ac.uk /** 496691Stjones1@inf.ed.ac.uk * Base classes for FpOps which provides a generateDisassembly method. 506691Stjones1@inf.ed.ac.uk */ 516691Stjones1@inf.ed.ac.uk class FpOp : public X86MicroopBase 526691Stjones1@inf.ed.ac.uk { 536691Stjones1@inf.ed.ac.uk protected: 546691Stjones1@inf.ed.ac.uk const RegIndex src1; 556691Stjones1@inf.ed.ac.uk const RegIndex src2; 566691Stjones1@inf.ed.ac.uk const RegIndex dest; 576691Stjones1@inf.ed.ac.uk const uint8_t dataSize; 586691Stjones1@inf.ed.ac.uk const int8_t spm; 596691Stjones1@inf.ed.ac.uk 606691Stjones1@inf.ed.ac.uk // Constructor 616691Stjones1@inf.ed.ac.uk FpOp(ExtMachInst _machInst, 626691Stjones1@inf.ed.ac.uk const char *mnem, const char *_instMnem, 636691Stjones1@inf.ed.ac.uk uint64_t setFlags, 646691Stjones1@inf.ed.ac.uk InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest, 656691Stjones1@inf.ed.ac.uk uint8_t _dataSize, int8_t _spm, 667532Ssteve.reinhardt@amd.com OpClass __opClass) : 676691Stjones1@inf.ed.ac.uk X86MicroopBase(_machInst, mnem, _instMnem, setFlags, 687532Ssteve.reinhardt@amd.com __opClass), 697532Ssteve.reinhardt@amd.com src1(_src1.regIdx), src2(_src2.regIdx), dest(_dest.regIdx), 706691Stjones1@inf.ed.ac.uk dataSize(_dataSize), spm(_spm) 716691Stjones1@inf.ed.ac.uk {} 726691Stjones1@inf.ed.ac.uk/* 736691Stjones1@inf.ed.ac.uk //Figure out what the condition code flags should be. 746691Stjones1@inf.ed.ac.uk uint64_t genFlags(uint64_t oldFlags, uint64_t flagMask, 756691Stjones1@inf.ed.ac.uk uint64_t _dest, uint64_t _src1, uint64_t _src2, 766691Stjones1@inf.ed.ac.uk bool subtract = false) const; 776691Stjones1@inf.ed.ac.uk bool checkCondition(uint64_t flags) const;*/ 786691Stjones1@inf.ed.ac.uk 796691Stjones1@inf.ed.ac.uk std::string generateDisassembly(Addr pc, 806691Stjones1@inf.ed.ac.uk const SymbolTable *symtab) const; 816691Stjones1@inf.ed.ac.uk }; 826691Stjones1@inf.ed.ac.uk} 836691Stjones1@inf.ed.ac.uk 846691Stjones1@inf.ed.ac.uk#endif //__ARCH_X86_INSTS_MICROFPOP_HH__ 856691Stjones1@inf.ed.ac.uk