2009-04-06 03:53:15 +02:00
|
|
|
// -*- mode:c++ -*-
|
|
|
|
|
2010-06-02 19:58:00 +02:00
|
|
|
// Copyright (c) 2010 ARM Limited
|
|
|
|
// All rights reserved
|
|
|
|
//
|
|
|
|
// The license below extends only to copyright in the software and shall
|
|
|
|
// not be construed as granting a license to any other intellectual
|
|
|
|
// property including but not limited to intellectual property relating
|
|
|
|
// to a hardware implementation of the functionality of the software
|
|
|
|
// licensed hereunder. You may use the software subject to the license
|
|
|
|
// terms below provided that you ensure that this notice is replicated
|
|
|
|
// unmodified and in its entirety in all distributions of the software,
|
|
|
|
// modified or unmodified, in source code or in binary form.
|
|
|
|
//
|
2009-04-06 03:53:15 +02:00
|
|
|
// Copyright (c) 2007-2008 The Florida State University
|
|
|
|
// All rights reserved.
|
|
|
|
//
|
|
|
|
// Redistribution and use in source and binary forms, with or without
|
|
|
|
// modification, are permitted provided that the following conditions are
|
|
|
|
// met: redistributions of source code must retain the above copyright
|
|
|
|
// notice, this list of conditions and the following disclaimer;
|
|
|
|
// redistributions in binary form must reproduce the above copyright
|
|
|
|
// notice, this list of conditions and the following disclaimer in the
|
|
|
|
// documentation and/or other materials provided with the distribution;
|
|
|
|
// neither the name of the copyright holders nor the names of its
|
|
|
|
// contributors may be used to endorse or promote products derived from
|
|
|
|
// this software without specific prior written permission.
|
|
|
|
//
|
|
|
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
//
|
|
|
|
// Authors: Stephen Hines
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Bitfield definitions.
|
|
|
|
//
|
|
|
|
|
|
|
|
// Opcode fields
|
2009-07-02 07:11:39 +02:00
|
|
|
def bitfield ENCODING encoding;
|
2009-06-22 01:41:21 +02:00
|
|
|
def bitfield OPCODE opcode;
|
2009-07-02 07:11:54 +02:00
|
|
|
def bitfield MEDIA_OPCODE mediaOpcode;
|
|
|
|
def bitfield MEDIA_OPCODE2 mediaOpcode2;
|
2009-11-15 04:22:30 +01:00
|
|
|
def bitfield USEIMM useImm;
|
2009-06-22 01:41:21 +02:00
|
|
|
def bitfield OPCODE_24 opcode24;
|
|
|
|
def bitfield OPCODE_23_20 opcode23_20;
|
|
|
|
def bitfield OPCODE_23_21 opcode23_21;
|
|
|
|
def bitfield OPCODE_22 opcode22;
|
2009-11-14 18:25:00 +01:00
|
|
|
def bitfield OPCODE_20 opcode20;
|
2009-06-22 01:41:21 +02:00
|
|
|
def bitfield OPCODE_19 opcode19;
|
2009-11-11 08:44:05 +01:00
|
|
|
def bitfield OPCODE_18 opcode18;
|
2009-06-22 01:41:21 +02:00
|
|
|
def bitfield OPCODE_15_12 opcode15_12;
|
|
|
|
def bitfield OPCODE_15 opcode15;
|
2009-07-02 07:11:39 +02:00
|
|
|
def bitfield MISC_OPCODE miscOpcode;
|
2009-11-18 01:02:09 +01:00
|
|
|
def bitfield OPC2 opc2;
|
2009-06-22 01:41:21 +02:00
|
|
|
def bitfield OPCODE_7 opcode7;
|
|
|
|
def bitfield OPCODE_4 opcode4;
|
2009-04-06 03:53:15 +02:00
|
|
|
|
2009-07-02 07:11:27 +02:00
|
|
|
def bitfield IS_MISC isMisc;
|
|
|
|
def bitfield SEVEN_AND_FOUR sevenAndFour;
|
|
|
|
|
2010-06-02 19:58:00 +02:00
|
|
|
def bitfield THUMB thumb;
|
|
|
|
def bitfield BIGTHUMB bigThumb;
|
|
|
|
|
2009-04-06 03:53:15 +02:00
|
|
|
// Other
|
2009-06-22 01:41:21 +02:00
|
|
|
def bitfield COND_CODE condCode;
|
|
|
|
def bitfield S_FIELD sField;
|
|
|
|
def bitfield RN rn;
|
|
|
|
def bitfield RD rd;
|
|
|
|
def bitfield SHIFT_SIZE shiftSize;
|
|
|
|
def bitfield SHIFT shift;
|
|
|
|
def bitfield RM rm;
|
2009-04-06 03:53:15 +02:00
|
|
|
|
2009-06-22 01:41:21 +02:00
|
|
|
def bitfield RS rs;
|
2009-04-06 03:53:15 +02:00
|
|
|
|
2009-07-02 07:16:51 +02:00
|
|
|
def bitfield PUSWL puswl;
|
|
|
|
def bitfield PREPOST puswl.prepost;
|
|
|
|
def bitfield UP puswl.up;
|
|
|
|
def bitfield PSRUSER puswl.psruser;
|
|
|
|
def bitfield WRITEBACK puswl.writeback;
|
2009-06-22 01:41:21 +02:00
|
|
|
def bitfield LOADOP puswl.loadOp;
|
2009-04-06 03:53:15 +02:00
|
|
|
|
2009-07-02 07:16:51 +02:00
|
|
|
def bitfield PUBWL pubwl;
|
2009-04-06 03:53:15 +02:00
|
|
|
|
2009-07-02 07:16:51 +02:00
|
|
|
def bitfield IMM imm;
|
2009-04-06 03:53:15 +02:00
|
|
|
|
2009-06-22 01:41:21 +02:00
|
|
|
def bitfield IMMED_11_0 immed11_0;
|
2009-04-06 03:53:15 +02:00
|
|
|
|
2009-06-22 01:41:21 +02:00
|
|
|
def bitfield IMMED_HI_11_8 immedHi11_8;
|
|
|
|
def bitfield IMMED_LO_3_0 immedLo3_0;
|
2009-04-06 03:53:15 +02:00
|
|
|
|
2009-06-22 01:41:21 +02:00
|
|
|
def bitfield IMMED_23_0 immed23_0;
|
2009-04-06 03:53:15 +02:00
|
|
|
|
2009-06-22 01:41:21 +02:00
|
|
|
def bitfield CPNUM cpNum;
|
2009-04-06 03:53:15 +02:00
|
|
|
// Note that FP Regs are only 3 bits
|
2009-06-22 01:41:21 +02:00
|
|
|
def bitfield FN fn;
|
|
|
|
def bitfield FD fd;
|
|
|
|
def bitfield FPREGIMM fpRegImm;
|
2009-04-06 03:53:15 +02:00
|
|
|
// We can just use 3:0 for FM since the hard-wired FP regs are handled in
|
|
|
|
// float_regfile.hh
|
2009-06-22 01:41:21 +02:00
|
|
|
def bitfield FM fm;
|
|
|
|
def bitfield FPIMM fpImm;
|
|
|
|
def bitfield PUNWL punwl;
|
2009-04-06 03:53:15 +02:00
|
|
|
|
|
|
|
// M5 instructions
|
2009-06-22 01:41:21 +02:00
|
|
|
def bitfield M5FUNC m5Func;
|
2009-04-06 03:53:15 +02:00
|
|
|
|
2010-06-02 19:58:00 +02:00
|
|
|
// Thumb bitfields
|
|
|
|
def bitfield TOPCODE_15_13 topcode15_13;
|
|
|
|
def bitfield TOPCODE_13_11 topcode13_11;
|
|
|
|
def bitfield TOPCODE_12_11 topcode12_11;
|
|
|
|
def bitfield TOPCODE_12_10 topcode12_10;
|
|
|
|
def bitfield TOPCODE_11_9 topcode11_9;
|
|
|
|
def bitfield TOPCODE_11_8 topcode11_8;
|
|
|
|
def bitfield TOPCODE_10_9 topcode10_9;
|
|
|
|
def bitfield TOPCODE_10_8 topcode10_8;
|
|
|
|
def bitfield TOPCODE_9_6 topcode9_6;
|
|
|
|
def bitfield TOPCODE_7 topcode7;
|
|
|
|
def bitfield TOPCODE_7_6 topcode7_6;
|
|
|
|
def bitfield TOPCODE_7_5 topcode7_5;
|
|
|
|
def bitfield TOPCODE_7_4 topcode7_4;
|
|
|
|
def bitfield TOPCODE_3_0 topcode3_0;
|