bitfields.isa revision 6691
16691Stjones1@inf.ed.ac.uk// -*- mode:c++ -*-
26691Stjones1@inf.ed.ac.uk
36691Stjones1@inf.ed.ac.uk// Copyright (c) 2009 The University of Edinburgh
46691Stjones1@inf.ed.ac.uk// All rights reserved.
56691Stjones1@inf.ed.ac.uk//
66691Stjones1@inf.ed.ac.uk// Redistribution and use in source and binary forms, with or without
76691Stjones1@inf.ed.ac.uk// modification, are permitted provided that the following conditions are
86691Stjones1@inf.ed.ac.uk// met: redistributions of source code must retain the above copyright
96691Stjones1@inf.ed.ac.uk// notice, this list of conditions and the following disclaimer;
106691Stjones1@inf.ed.ac.uk// redistributions in binary form must reproduce the above copyright
116691Stjones1@inf.ed.ac.uk// notice, this list of conditions and the following disclaimer in the
126691Stjones1@inf.ed.ac.uk// documentation and/or other materials provided with the distribution;
136691Stjones1@inf.ed.ac.uk// neither the name of the copyright holders nor the names of its
146691Stjones1@inf.ed.ac.uk// contributors may be used to endorse or promote products derived from
156691Stjones1@inf.ed.ac.uk// this software without specific prior written permission.
166691Stjones1@inf.ed.ac.uk//
176691Stjones1@inf.ed.ac.uk// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
186691Stjones1@inf.ed.ac.uk// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
196691Stjones1@inf.ed.ac.uk// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
206691Stjones1@inf.ed.ac.uk// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
216691Stjones1@inf.ed.ac.uk// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
226691Stjones1@inf.ed.ac.uk// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
236691Stjones1@inf.ed.ac.uk// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
246691Stjones1@inf.ed.ac.uk// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
256691Stjones1@inf.ed.ac.uk// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
266691Stjones1@inf.ed.ac.uk// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
276691Stjones1@inf.ed.ac.uk// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
286691Stjones1@inf.ed.ac.uk//
296691Stjones1@inf.ed.ac.uk// Authors: Timothy M. Jones
306691Stjones1@inf.ed.ac.uk
316691Stjones1@inf.ed.ac.uk////////////////////////////////////////////////////////////////////
326691Stjones1@inf.ed.ac.uk//
336691Stjones1@inf.ed.ac.uk// Bitfield definitions.
346691Stjones1@inf.ed.ac.uk//
356691Stjones1@inf.ed.ac.uk// The endianness is the opposite to what's used here, so things
366691Stjones1@inf.ed.ac.uk// are reversed sometimes. Not sure of a fix to this though...
376691Stjones1@inf.ed.ac.uk
386691Stjones1@inf.ed.ac.uk// Opcode fields
396691Stjones1@inf.ed.ac.ukdef bitfield OPCODE        <31:26>;
406691Stjones1@inf.ed.ac.ukdef bitfield X_XO          <10:0>;
416691Stjones1@inf.ed.ac.ukdef bitfield XO_XO         <10:1>;
426691Stjones1@inf.ed.ac.ukdef bitfield A_XO          <5:1>;
436691Stjones1@inf.ed.ac.uk
446691Stjones1@inf.ed.ac.uk// Register fields
456691Stjones1@inf.ed.ac.ukdef bitfield RA            <20:16>;
466691Stjones1@inf.ed.ac.ukdef bitfield RB            <15:11>;
476691Stjones1@inf.ed.ac.ukdef bitfield RS            <25:21>;
486691Stjones1@inf.ed.ac.ukdef bitfield RT            <25:21>;
496691Stjones1@inf.ed.ac.ukdef bitfield FRA           <20:16>;
506691Stjones1@inf.ed.ac.ukdef bitfield FRB           <15:11>;
516691Stjones1@inf.ed.ac.ukdef bitfield FRC           <10:6>;
526691Stjones1@inf.ed.ac.ukdef bitfield FRS           <25:21>;
536691Stjones1@inf.ed.ac.ukdef bitfield FRT           <25:21>;
546691Stjones1@inf.ed.ac.uk
556691Stjones1@inf.ed.ac.uk// The record bit can be in two positions
566691Stjones1@inf.ed.ac.uk// Used to enable setting of the condition register
576691Stjones1@inf.ed.ac.ukdef bitfield RC31          <0>;
586691Stjones1@inf.ed.ac.ukdef bitfield RC21          <10>;
596691Stjones1@inf.ed.ac.uk
606691Stjones1@inf.ed.ac.uk// Used to enable setting of the overflow flags
616691Stjones1@inf.ed.ac.ukdef bitfield OE            <10>;
626691Stjones1@inf.ed.ac.uk
636691Stjones1@inf.ed.ac.uk// SPR field for mtspr instruction
646691Stjones1@inf.ed.ac.ukdef bitfield SPR           <20:11>;
656691Stjones1@inf.ed.ac.uk
666691Stjones1@inf.ed.ac.uk// FXM field for mtcrf instruction
676691Stjones1@inf.ed.ac.ukdef bitfield FXM           <19:12>;
686691Stjones1@inf.ed.ac.uk
696691Stjones1@inf.ed.ac.uk// Branch fields
706691Stjones1@inf.ed.ac.ukdef bitfield LK            <0>;
716691Stjones1@inf.ed.ac.ukdef bitfield AA            <1>;
726691Stjones1@inf.ed.ac.uk
736691Stjones1@inf.ed.ac.uk// Specifies a CR or FPSCR field
746691Stjones1@inf.ed.ac.ukdef bitfield BF            <25:23>;
756691Stjones1@inf.ed.ac.uk
766691Stjones1@inf.ed.ac.uk// Fields for FPSCR manipulation instructions
776691Stjones1@inf.ed.ac.ukdef bitfield FLM           <24:17>;
786691Stjones1@inf.ed.ac.ukdef bitfield L             <25>;
796691Stjones1@inf.ed.ac.ukdef bitfield W             <16>;
806691Stjones1@inf.ed.ac.uk// Named so to avoid conflicts with range.hh
816691Stjones1@inf.ed.ac.ukdef bitfield U_FIELD       <15:12>;
826691Stjones1@inf.ed.ac.uk
836691Stjones1@inf.ed.ac.uk// Field for specifying a bit in CR or FPSCR
846691Stjones1@inf.ed.ac.ukdef bitfield BT            <25:21>;
85