bitfields.isa revision 2754
1848SN/A// -*- mode:c++ -*- 29956SN/A 39956SN/A// Copyright (c) 2006 The Regents of The University of Michigan 49956SN/A// All rights reserved. 59956SN/A// 69956SN/A// Redistribution and use in source and binary forms, with or without 79956SN/A// modification, are permitted provided that the following conditions are 89956SN/A// met: redistributions of source code must retain the above copyright 99956SN/A// notice, this list of conditions and the following disclaimer; 109956SN/A// redistributions in binary form must reproduce the above copyright 119956SN/A// notice, this list of conditions and the following disclaimer in the 129956SN/A// documentation and/or other materials provided with the distribution; 139956SN/A// neither the name of the copyright holders nor the names of its 141762SN/A// contributors may be used to endorse or promote products derived from 15848SN/A// this software without specific prior written permission. 16848SN/A// 17848SN/A// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18848SN/A// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19848SN/A// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20848SN/A// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21848SN/A// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22848SN/A// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23848SN/A// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24848SN/A// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25848SN/A// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26848SN/A// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27848SN/A// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28848SN/A// 29848SN/A// Authors: Korey Sewell 30848SN/A 31848SN/A//////////////////////////////////////////////////////////////////// 32848SN/A// 33848SN/A// Bitfield definitions. 34848SN/A// 35848SN/A 36848SN/Adef bitfield OPCODE <31:26>; 37848SN/Adef bitfield OPCODE_HI <31:29>; 38848SN/Adef bitfield OPCODE_LO <28:26>; 392665SN/A 402665SN/Adef bitfield REGIMM <20:16>; 41848SN/Adef bitfield REGIMM_HI <20:19>; 42848SN/Adef bitfield REGIMM_LO <18:16>; 43848SN/A 44848SN/Adef bitfield FUNCTION < 5: 0>; 45848SN/Adef bitfield FUNCTION_HI < 5: 3>; 46848SN/Adef bitfield FUNCTION_LO < 2: 0>; 4711264Sandreas.sandberg@arm.com 4811264Sandreas.sandberg@arm.comdef bitfield RS <25:21>; 49848SN/Adef bitfield RS_MSB <25:25>; 502275SN/Adef bitfield RS_HI <25:24>; 51848SN/Adef bitfield RS_LO <23:21>; 5211264Sandreas.sandberg@arm.comdef bitfield RS_SRL <25:22>; 5311264Sandreas.sandberg@arm.comdef bitfield RS_RT <25:16>; 5411264Sandreas.sandberg@arm.comdef bitfield RT <20:16>; 5511264Sandreas.sandberg@arm.comdef bitfield RT_HI <20:19>; 568229SN/Adef bitfield RT_LO <18:16>; 57849SN/Adef bitfield RT_RD <20:11>; 58848SN/Adef bitfield RD <15:11>; 593090SN/A 603090SN/Adef bitfield INTIMM <15: 0>; 618522SN/A 62849SN/A// Floating-point operate format 638522SN/Adef bitfield FMT <25:21>; 648522SN/Adef bitfield FR <25:21>; 658522SN/Adef bitfield FT <20:16>; 66849SN/Adef bitfield FS <15:11>; 67849SN/Adef bitfield FD <10:6>; 68849SN/A 69849SN/Adef bitfield ND <17:17>; 70849SN/Adef bitfield TF <16:16>; 71849SN/Adef bitfield MOVCI <16:16>; 72849SN/Adef bitfield MOVCF <16:16>; 73849SN/Adef bitfield SRL <21:21>; 74849SN/Adef bitfield SRLV < 6: 6>; 75849SN/Adef bitfield SA <10: 6>; 76849SN/A 77849SN/A// Floating Point Condition Codes 78849SN/Adef bitfield CC <10:8>; 79849SN/Adef bitfield BRANCH_CC <20:18>; 80849SN/A 81849SN/A// CP0 Register Select 82849SN/Adef bitfield SEL < 2: 0>; 83849SN/A 84849SN/A// Interrupts 85849SN/Adef bitfield SC < 5: 5>; 86896SN/A 87849SN/A// Branch format 888522SN/Adef bitfield OFFSET <15: 0>; // displacement 89849SN/A 90849SN/A// Jmp format 91849SN/Adef bitfield JMPTARG <25: 0>; 92849SN/Adef bitfield HINT <10: 6>; 93849SN/A 94849SN/Adef bitfield SYSCALLCODE <25: 6>; 95849SN/Adef bitfield TRAPCODE <15:13>; 96849SN/A 97849SN/A// EXT/INS instructions 98849SN/Adef bitfield MSB <15:11>; 99849SN/Adef bitfield LSB <10: 6>; 100849SN/A 101849SN/A// M5 instructions 102849SN/Adef bitfield M5FUNC <7:0>; 103849SN/A