bitfields.isa revision 10037
12221SN/A// -*- mode:c++ -*- 22221SN/A 32221SN/A// Copyright (c) 2010, 2011 ARM Limited 42221SN/A// All rights reserved 52221SN/A// 62221SN/A// The license below extends only to copyright in the software and shall 72221SN/A// not be construed as granting a license to any other intellectual 82221SN/A// property including but not limited to intellectual property relating 92221SN/A// to a hardware implementation of the functionality of the software 102221SN/A// licensed hereunder. You may use the software subject to the license 112221SN/A// terms below provided that you ensure that this notice is replicated 122221SN/A// unmodified and in its entirety in all distributions of the software, 132221SN/A// modified or unmodified, in source code or in binary form. 142221SN/A// 152221SN/A// Copyright (c) 2007-2008 The Florida State University 162221SN/A// All rights reserved. 172221SN/A// 182221SN/A// Redistribution and use in source and binary forms, with or without 192221SN/A// modification, are permitted provided that the following conditions are 202221SN/A// met: redistributions of source code must retain the above copyright 212221SN/A// notice, this list of conditions and the following disclaimer; 222221SN/A// redistributions in binary form must reproduce the above copyright 232221SN/A// notice, this list of conditions and the following disclaimer in the 242221SN/A// documentation and/or other materials provided with the distribution; 252221SN/A// neither the name of the copyright holders nor the names of its 262221SN/A// contributors may be used to endorse or promote products derived from 272665Ssaidi@eecs.umich.edu// this software without specific prior written permission. 282665Ssaidi@eecs.umich.edu// 292665Ssaidi@eecs.umich.edu// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 302221SN/A// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 312221SN/A// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 3211793Sbrandon.potter@amd.com// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 3311793Sbrandon.potter@amd.com// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 343415Sgblack@eecs.umich.edu// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 353415Sgblack@eecs.umich.edu// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 363415Sgblack@eecs.umich.edu// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 378778Sgblack@eecs.umich.edu// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 383578Sgblack@eecs.umich.edu// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 393415Sgblack@eecs.umich.edu// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 403415Sgblack@eecs.umich.edu// 413415Sgblack@eecs.umich.edu// Authors: Stephen Hines 422680Sktlim@umich.edu 433415Sgblack@eecs.umich.edu//////////////////////////////////////////////////////////////////// 4411793Sbrandon.potter@amd.com// 452800Ssaidi@eecs.umich.edu// Bitfield definitions. 462221SN/A// 473415Sgblack@eecs.umich.edu 483415Sgblack@eecs.umich.edu// Opcode fields 492223SN/Adef bitfield ENCODING encoding; 502221SN/Adef bitfield OPCODE opcode; 512221SN/Adef bitfield MEDIA_OPCODE mediaOpcode; 523573Sgblack@eecs.umich.edudef bitfield MEDIA_OPCODE2 mediaOpcode2; 533576Sgblack@eecs.umich.edudef bitfield USEIMM useImm; 549551Sandreas.hansson@arm.comdef bitfield OPCODE_24 opcode24; 552221SN/Adef bitfield OPCODE_24_23 opcode24_23; 563573Sgblack@eecs.umich.edudef bitfield OPCODE_23_20 opcode23_20; 573576Sgblack@eecs.umich.edudef bitfield OPCODE_23_21 opcode23_21; 589551Sandreas.hansson@arm.comdef bitfield OPCODE_22 opcode22; 592221SN/Adef bitfield OPCODE_20 opcode20; 603573Sgblack@eecs.umich.edudef bitfield OPCODE_19_16 opcode19_16; 613576Sgblack@eecs.umich.edudef bitfield OPCODE_19 opcode19; 629551Sandreas.hansson@arm.comdef bitfield OPCODE_18 opcode18; 632221SN/Adef bitfield OPCODE_15_12 opcode15_12; 643573Sgblack@eecs.umich.edudef bitfield OPCODE_15 opcode15; 653576Sgblack@eecs.umich.edudef bitfield MISC_OPCODE miscOpcode; 669551Sandreas.hansson@arm.comdef bitfield OPC2 opc2; 672221SN/Adef bitfield OPCODE_7 opcode7; 683573Sgblack@eecs.umich.edudef bitfield OPCODE_6 opcode6; 693576Sgblack@eecs.umich.edudef bitfield OPCODE_4 opcode4; 709551Sandreas.hansson@arm.com 712221SN/Adef bitfield IS_MISC isMisc; 723573Sgblack@eecs.umich.edudef bitfield SEVEN_AND_FOUR sevenAndFour; 733576Sgblack@eecs.umich.edu 749551Sandreas.hansson@arm.comdef bitfield THUMB thumb; 752221SN/Adef bitfield BIGTHUMB bigThumb; 763573Sgblack@eecs.umich.edudef bitfield AARCH64 aarch64; 773576Sgblack@eecs.umich.edu 789551Sandreas.hansson@arm.com// Other 793576Sgblack@eecs.umich.edudef bitfield COND_CODE condCode; 803576Sgblack@eecs.umich.edudef bitfield S_FIELD sField; 813576Sgblack@eecs.umich.edudef bitfield RN rn; 823576Sgblack@eecs.umich.edudef bitfield RD rd; 833576Sgblack@eecs.umich.edudef bitfield RT rt; 842221SN/Adef bitfield SHIFT_SIZE shiftSize; 853573Sgblack@eecs.umich.edudef bitfield SHIFT shift; 863576Sgblack@eecs.umich.edudef bitfield RM rm; 879551Sandreas.hansson@arm.com 882221SN/Adef bitfield RS rs; 893573Sgblack@eecs.umich.edu 903576Sgblack@eecs.umich.edudef bitfield PUSWL puswl; 919551Sandreas.hansson@arm.comdef bitfield PREPOST puswl.prepost; 922221SN/Adef bitfield UP puswl.up; 933573Sgblack@eecs.umich.edudef bitfield PSRUSER puswl.psruser; 943576Sgblack@eecs.umich.edudef bitfield WRITEBACK puswl.writeback; 959551Sandreas.hansson@arm.comdef bitfield LOADOP puswl.loadOp; 963576Sgblack@eecs.umich.edu 973576Sgblack@eecs.umich.edudef bitfield PUBWL pubwl; 983576Sgblack@eecs.umich.edu 993576Sgblack@eecs.umich.edudef bitfield IMM imm; 1003576Sgblack@eecs.umich.edu 1013576Sgblack@eecs.umich.edudef bitfield IMMED_11_0 immed11_0; 1023576Sgblack@eecs.umich.edudef bitfield IMMED_7_0 immed7_0; 1033576Sgblack@eecs.umich.edu 1043576Sgblack@eecs.umich.edudef bitfield IMMED_HI_11_8 immedHi11_8; 1053576Sgblack@eecs.umich.edudef bitfield IMMED_LO_3_0 immedLo3_0; 1062221SN/A 1073573Sgblack@eecs.umich.edudef bitfield IMMED_23_0 immed23_0; 1083576Sgblack@eecs.umich.edu 1099551Sandreas.hansson@arm.comdef bitfield CPNUM cpNum; 1102221SN/A// Note that FP Regs are only 3 bits 11112110SRekai.GonzalezAlberquilla@arm.comdef bitfield FN fn; 11212110SRekai.GonzalezAlberquilla@arm.comdef bitfield FD fd; 11312110SRekai.GonzalezAlberquilla@arm.comdef bitfield FPREGIMM fpRegImm; 11412110SRekai.GonzalezAlberquilla@arm.com// We can just use 3:0 for FM since the hard-wired FP regs are handled in 11512110SRekai.GonzalezAlberquilla@arm.com// float_regfile.hh 11612110SRekai.GonzalezAlberquilla@arm.comdef bitfield FM fm; 1173573Sgblack@eecs.umich.edudef bitfield FPIMM fpImm; 1183576Sgblack@eecs.umich.edudef bitfield PUNWL punwl; 1199551Sandreas.hansson@arm.com 1202221SN/A// M5 instructions 1213573Sgblack@eecs.umich.edudef bitfield M5FUNC m5Func; 1223576Sgblack@eecs.umich.edu 1239551Sandreas.hansson@arm.com// 16 bit thumb bitfields 1242221SN/Adef bitfield TOPCODE_15_13 topcode15_13; 1253573Sgblack@eecs.umich.edudef bitfield TOPCODE_13_11 topcode13_11; 1263576Sgblack@eecs.umich.edudef bitfield TOPCODE_12_11 topcode12_11; 1279551Sandreas.hansson@arm.comdef bitfield TOPCODE_12_10 topcode12_10; 1282221SN/Adef bitfield TOPCODE_11_9 topcode11_9; 1293573Sgblack@eecs.umich.edudef bitfield TOPCODE_11_8 topcode11_8; 1303576Sgblack@eecs.umich.edudef bitfield TOPCODE_10_9 topcode10_9; 1319551Sandreas.hansson@arm.comdef bitfield TOPCODE_10_8 topcode10_8; 1322221SN/Adef bitfield TOPCODE_9_6 topcode9_6; 1333573Sgblack@eecs.umich.edudef bitfield TOPCODE_7 topcode7; 1343576Sgblack@eecs.umich.edudef bitfield TOPCODE_7_6 topcode7_6; 1359551Sandreas.hansson@arm.comdef bitfield TOPCODE_7_5 topcode7_5; 1362223SN/Adef bitfield TOPCODE_7_4 topcode7_4; 1373573Sgblack@eecs.umich.edudef bitfield TOPCODE_3_0 topcode3_0; 1383576Sgblack@eecs.umich.edu 1399551Sandreas.hansson@arm.com// 32 bit thumb bitfields 1402223SN/Adef bitfield HTOPCODE_12_11 htopcode12_11; 1413573Sgblack@eecs.umich.edudef bitfield HTOPCODE_10_9 htopcode10_9; 1423576Sgblack@eecs.umich.edudef bitfield HTOPCODE_9 htopcode9; 1439551Sandreas.hansson@arm.comdef bitfield HTOPCODE_9_8 htopcode9_8; 1442223SN/Adef bitfield HTOPCODE_9_5 htopcode9_5; 1453573Sgblack@eecs.umich.edudef bitfield HTOPCODE_9_4 htopcode9_4; 1463576Sgblack@eecs.umich.edudef bitfield HTOPCODE_8 htopcode8; 1479551Sandreas.hansson@arm.comdef bitfield HTOPCODE_8_7 htopcode8_7; 1482223SN/Adef bitfield HTOPCODE_8_6 htopcode8_6; 1493573Sgblack@eecs.umich.edudef bitfield HTOPCODE_8_5 htopcode8_5; 1503576Sgblack@eecs.umich.edudef bitfield HTOPCODE_7 htopcode7; 1519551Sandreas.hansson@arm.comdef bitfield HTOPCODE_7_5 htopcode7_5; 1523576Sgblack@eecs.umich.edudef bitfield HTOPCODE_6 htopcode6; 1533576Sgblack@eecs.umich.edudef bitfield HTOPCODE_6_5 htopcode6_5; 1543576Sgblack@eecs.umich.edudef bitfield HTOPCODE_5_4 htopcode5_4; 1553576Sgblack@eecs.umich.edudef bitfield HTOPCODE_4 htopcode4; 1563576Sgblack@eecs.umich.edu 1572223SN/Adef bitfield HTRN htrn; 1583573Sgblack@eecs.umich.edudef bitfield HTS hts; 1593576Sgblack@eecs.umich.edu 1609551Sandreas.hansson@arm.comdef bitfield LTOPCODE_15 ltopcode15; 1612223SN/Adef bitfield LTOPCODE_11_8 ltopcode11_8; 1623573Sgblack@eecs.umich.edudef bitfield LTOPCODE_7_6 ltopcode7_6; 1633576Sgblack@eecs.umich.edudef bitfield LTOPCODE_7_4 ltopcode7_4; 1649551Sandreas.hansson@arm.comdef bitfield LTOPCODE_4 ltopcode4; 1652223SN/A 1663573Sgblack@eecs.umich.edudef bitfield LTRD ltrd; 1673576Sgblack@eecs.umich.edudef bitfield LTCOPROC ltcoproc; 1689551Sandreas.hansson@arm.com