decoder.isa revision 6076
14158SN/A// Copyright (c) 2007 The Hewlett-Packard Development Company 24158SN/A// All rights reserved. 34158SN/A// 44158SN/A// Redistribution and use of this software in source and binary forms, 54158SN/A// with or without modification, are permitted provided that the 64158SN/A// following conditions are met: 74158SN/A// 84158SN/A// The software must be used only for Non-Commercial Use which means any 94158SN/A// use which is NOT directed to receiving any direct monetary 104158SN/A// compensation for, or commercial advantage from such use. Illustrative 114158SN/A// examples of non-commercial use are academic research, personal study, 124158SN/A// teaching, education and corporate research & development. 134158SN/A// Illustrative examples of commercial use are distributing products for 144158SN/A// commercial advantage and providing services using the software for 154158SN/A// commercial advantage. 164158SN/A// 174158SN/A// If you wish to use this software or functionality therein that may be 184158SN/A// covered by patents for commercial use, please contact: 194158SN/A// Director of Intellectual Property Licensing 204158SN/A// Office of Strategy and Technology 214158SN/A// Hewlett-Packard Company 224158SN/A// 1501 Page Mill Road 234158SN/A// Palo Alto, California 94304 244158SN/A// 254158SN/A// Redistributions of source code must retain the above copyright notice, 264158SN/A// this list of conditions and the following disclaimer. Redistributions 274158SN/A// in binary form must reproduce the above copyright notice, this list of 284158SN/A// conditions and the following disclaimer in the documentation and/or 294158SN/A// other materials provided with the distribution. Neither the name of 304158SN/A// the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its 314158SN/A// contributors may be used to endorse or promote products derived from 324158SN/A// this software without specific prior written permission. No right of 334158SN/A// sublicense is granted herewith. Derivatives of the software and 344158SN/A// output created using the software may be prepared, but only for 354158SN/A// Non-Commercial Uses. Derivatives of the software may be shared with 364158SN/A// others provided: (i) the others agree to abide by the list of 374158SN/A// conditions herein which includes the Non-Commercial Use restrictions; 384158SN/A// and (ii) such Derivatives of the software include the above copyright 394158SN/A// notice to acknowledge the contribution from this software where 404158SN/A// applicable, this list of conditions and the disclaimer below. 414158SN/A// 424158SN/A// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 434158SN/A// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 444158SN/A// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 454158SN/A// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 464158SN/A// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 474158SN/A// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 484158SN/A// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 494158SN/A// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 504158SN/A// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 514158SN/A// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 524158SN/A// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 534158SN/A// 544158SN/A// Authors: Gabe Black 554158SN/A 564158SN/A//////////////////////////////////////////////////////////////////// 574158SN/A// 584158SN/A// The actual decoder specification 594158SN/A// 604158SN/A 614276Sgblack@eecs.umich.edudecode OPCODE_NUM default Unknown::unknown() 624158SN/A{ 634276Sgblack@eecs.umich.edu 0x0: M5InternalError::error( 644276Sgblack@eecs.umich.edu {{"Saw an ExtMachInst with zero opcode bytes!"}}); 654276Sgblack@eecs.umich.edu //1 byte opcodes 664276Sgblack@eecs.umich.edu ##include "one_byte_opcodes.isa" 674276Sgblack@eecs.umich.edu //2 byte opcodes 684276Sgblack@eecs.umich.edu ##include "two_byte_opcodes.isa" 694276Sgblack@eecs.umich.edu //3 byte opcodes 704276Sgblack@eecs.umich.edu 0x3: decode OPCODE_PREFIXA { 714276Sgblack@eecs.umich.edu 0xF0: decode OPCODE_PREFIXB { 724276Sgblack@eecs.umich.edu //We don't handle these properly in the predecoder yet, so there's 734276Sgblack@eecs.umich.edu //no reason to implement them for now. 744276Sgblack@eecs.umich.edu 0x38: decode OPCODE_OP { 754276Sgblack@eecs.umich.edu default: FailUnimpl::sseThreeEight(); 764276Sgblack@eecs.umich.edu } 774276Sgblack@eecs.umich.edu 0x3A: decode OPCODE_OP { 784276Sgblack@eecs.umich.edu default: FailUnimpl::sseThreeA(); 794276Sgblack@eecs.umich.edu } 804276Sgblack@eecs.umich.edu 0xF0: decode OPCODE_OP { 814276Sgblack@eecs.umich.edu default: FailUnimpl::threednow(); 824276Sgblack@eecs.umich.edu } 834276Sgblack@eecs.umich.edu default: M5InternalError::error( 844276Sgblack@eecs.umich.edu {{"Unexpected second opcode byte in three byte opcode!"}}); 854276Sgblack@eecs.umich.edu } 864276Sgblack@eecs.umich.edu default: M5InternalError::error( 874276Sgblack@eecs.umich.edu {{"Unexpected first opcode byte in three byte opcode!"}}); 884276Sgblack@eecs.umich.edu } 894158SN/A} 90