bitfields.isa revision 7161
1360SN/A// -*- mode:c++ -*-
210850SGiacomo.Gabrielli@arm.com
310796Sbrandon.potter@amd.com// Copyright (c) 2010 ARM Limited
410027SChris.Adeniyi-Jones@arm.com// All rights reserved
510027SChris.Adeniyi-Jones@arm.com//
610027SChris.Adeniyi-Jones@arm.com// The license below extends only to copyright in the software and shall
710027SChris.Adeniyi-Jones@arm.com// not be construed as granting a license to any other intellectual
810027SChris.Adeniyi-Jones@arm.com// property including but not limited to intellectual property relating
910027SChris.Adeniyi-Jones@arm.com// to a hardware implementation of the functionality of the software
1010027SChris.Adeniyi-Jones@arm.com// licensed hereunder.  You may use the software subject to the license
1110027SChris.Adeniyi-Jones@arm.com// terms below provided that you ensure that this notice is replicated
1210027SChris.Adeniyi-Jones@arm.com// unmodified and in its entirety in all distributions of the software,
1310027SChris.Adeniyi-Jones@arm.com// modified or unmodified, in source code or in binary form.
1410027SChris.Adeniyi-Jones@arm.com//
151458SN/A// Copyright (c) 2007-2008 The Florida State University
16360SN/A// All rights reserved.
17360SN/A//
18360SN/A// Redistribution and use in source and binary forms, with or without
19360SN/A// modification, are permitted provided that the following conditions are
20360SN/A// met: redistributions of source code must retain the above copyright
21360SN/A// notice, this list of conditions and the following disclaimer;
22360SN/A// redistributions in binary form must reproduce the above copyright
23360SN/A// notice, this list of conditions and the following disclaimer in the
24360SN/A// documentation and/or other materials provided with the distribution;
25360SN/A// neither the name of the copyright holders nor the names of its
26360SN/A// contributors may be used to endorse or promote products derived from
27360SN/A// this software without specific prior written permission.
28360SN/A//
29360SN/A// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30360SN/A// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31360SN/A// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
32360SN/A// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
33360SN/A// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
34360SN/A// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
35360SN/A// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36360SN/A// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37360SN/A// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
38360SN/A// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
39360SN/A// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
402665Ssaidi@eecs.umich.edu//
412665Ssaidi@eecs.umich.edu// Authors: Stephen Hines
422665Ssaidi@eecs.umich.edu
43360SN/A////////////////////////////////////////////////////////////////////
44360SN/A//
451354SN/A// Bitfield definitions.
461354SN/A//
47360SN/A
4812018Sandreas.sandberg@arm.com// Opcode fields
4912018Sandreas.sandberg@arm.comdef bitfield ENCODING      encoding;
5012018Sandreas.sandberg@arm.comdef bitfield OPCODE        opcode;
5112018Sandreas.sandberg@arm.comdef bitfield MEDIA_OPCODE  mediaOpcode;
5212018Sandreas.sandberg@arm.comdef bitfield MEDIA_OPCODE2 mediaOpcode2;
5312018Sandreas.sandberg@arm.comdef bitfield USEIMM        useImm;
5412018Sandreas.sandberg@arm.comdef bitfield OPCODE_24     opcode24;
552064SN/Adef bitfield OPCODE_24_23  opcode24_23;
56360SN/Adef bitfield OPCODE_23_20  opcode23_20;
57360SN/Adef bitfield OPCODE_23_21  opcode23_21;
58360SN/Adef bitfield OPCODE_22     opcode22;
59360SN/Adef bitfield OPCODE_20     opcode20;
60360SN/Adef bitfield OPCODE_19_16  opcode19_16;
61360SN/Adef bitfield OPCODE_19     opcode19;
6213936SAndrea.Mondelli@ucf.edudef bitfield OPCODE_18     opcode18;
6313933Sbrandon.potter@amd.comdef bitfield OPCODE_15_12  opcode15_12;
6413933Sbrandon.potter@amd.comdef bitfield OPCODE_15     opcode15;
6513933Sbrandon.potter@amd.comdef bitfield MISC_OPCODE   miscOpcode;
6613936SAndrea.Mondelli@ucf.edudef bitfield OPC2          opc2; 
6713936SAndrea.Mondelli@ucf.edudef bitfield OPCODE_7      opcode7;
6813936SAndrea.Mondelli@ucf.edudef bitfield OPCODE_6      opcode6;
6913933Sbrandon.potter@amd.comdef bitfield OPCODE_4      opcode4;
7013933Sbrandon.potter@amd.com
711809SN/Adef bitfield IS_MISC       isMisc;
7211800Sbrandon.potter@amd.comdef bitfield SEVEN_AND_FOUR sevenAndFour;
7311392Sbrandon.potter@amd.com
741809SN/Adef bitfield THUMB         thumb;
7511392Sbrandon.potter@amd.comdef bitfield BIGTHUMB      bigThumb;
7613902Sbrandon.potter@amd.com
7713570Sbrandon.potter@amd.com// Other
7813902Sbrandon.potter@amd.comdef bitfield COND_CODE     condCode;
7911383Sbrandon.potter@amd.comdef bitfield S_FIELD       sField;
8013568Sbrandon.potter@amd.comdef bitfield RN            rn;
813113Sgblack@eecs.umich.edudef bitfield RD            rd;
828229Snate@binkert.orgdef bitfield RT            rt;
8313570Sbrandon.potter@amd.comdef bitfield SHIFT_SIZE    shiftSize;
848229Snate@binkert.orgdef bitfield SHIFT         shift;
8511594Santhony.gutierrez@amd.comdef bitfield RM            rm;
867075Snate@binkert.org
878229Snate@binkert.orgdef bitfield RS            rs;
8811856Sbrandon.potter@amd.com
897075Snate@binkert.orgdef bitfield PUSWL         puswl;
90360SN/Adef bitfield PREPOST       puswl.prepost;
9112461Sgabeblack@google.comdef bitfield UP               puswl.up;
9211886Sbrandon.potter@amd.comdef bitfield PSRUSER       puswl.psruser;
9311800Sbrandon.potter@amd.comdef bitfield WRITEBACK     puswl.writeback;
9411392Sbrandon.potter@amd.comdef bitfield LOADOP        puswl.loadOp;
9512334Sgabeblack@google.com
961354SN/Adef bitfield PUBWL         pubwl;
976216Snate@binkert.org
986658Snate@binkert.orgdef bitfield IMM           imm;
992474SN/A
1002680Sktlim@umich.edudef bitfield IMMED_11_0    immed11_0;
1018229Snate@binkert.orgdef bitfield IMMED_7_0     immed7_0;
10211886Sbrandon.potter@amd.com
10310496Ssteve.reinhardt@amd.comdef bitfield IMMED_HI_11_8 immedHi11_8;
10411911SBrandon.Potter@amd.comdef bitfield IMMED_LO_3_0  immedLo3_0;
1058229Snate@binkert.org
10611794Sbrandon.potter@amd.comdef bitfield IMMED_23_0    immed23_0;
10711886Sbrandon.potter@amd.com
10810497Ssteve.reinhardt@amd.comdef bitfield CPNUM         cpNum;
10911794Sbrandon.potter@amd.com// Note that FP Regs are only 3 bits
110360SN/Adef bitfield FN            fn;
11113629SAndrea.Mondelli@ucf.edudef bitfield FD            fd;
11213629SAndrea.Mondelli@ucf.edudef bitfield FPREGIMM      fpRegImm;
11313629SAndrea.Mondelli@ucf.edu// We can just use 3:0 for FM since the hard-wired FP regs are handled in
11413629SAndrea.Mondelli@ucf.edu// float_regfile.hh
115360SN/Adef bitfield FM            fm;
116360SN/Adef bitfield FPIMM         fpImm;
117360SN/Adef bitfield PUNWL         punwl;
118360SN/A
119360SN/A// M5 instructions
120360SN/Adef bitfield M5FUNC        m5Func;
121360SN/A
122360SN/A// 16 bit thumb bitfields
12313933Sbrandon.potter@amd.comdef bitfield TOPCODE_15_13  topcode15_13;
124360SN/Adef bitfield TOPCODE_13_11  topcode13_11;
125378SN/Adef bitfield TOPCODE_12_11  topcode12_11;
12613995Sbrandon.potter@amd.comdef bitfield TOPCODE_12_10  topcode12_10;
127378SN/Adef bitfield TOPCODE_11_9   topcode11_9;
128378SN/Adef bitfield TOPCODE_11_8   topcode11_8;
129378SN/Adef bitfield TOPCODE_10_9   topcode10_9;
130378SN/Adef bitfield TOPCODE_10_8   topcode10_8;
131378SN/Adef bitfield TOPCODE_9_6    topcode9_6;
13213995Sbrandon.potter@amd.comdef bitfield TOPCODE_7      topcode7;
133360SN/Adef bitfield TOPCODE_7_6    topcode7_6;
13411760Sbrandon.potter@amd.comdef bitfield TOPCODE_7_5    topcode7_5;
13513995Sbrandon.potter@amd.comdef bitfield TOPCODE_7_4    topcode7_4;
13611760Sbrandon.potter@amd.comdef bitfield TOPCODE_3_0    topcode3_0;
1376109Ssanchezd@stanford.edu
13813995Sbrandon.potter@amd.com// 32 bit thumb bitfields
139378SN/Adef bitfield HTOPCODE_12_11 htopcode12_11;
1406109Ssanchezd@stanford.edudef bitfield HTOPCODE_10_9  htopcode10_9;
14113995Sbrandon.potter@amd.comdef bitfield HTOPCODE_9     htopcode9;
1426109Ssanchezd@stanford.edudef bitfield HTOPCODE_9_8   htopcode9_8;
14311886Sbrandon.potter@amd.comdef bitfield HTOPCODE_9_5   htopcode9_5;
14413995Sbrandon.potter@amd.comdef bitfield HTOPCODE_9_4   htopcode9_4;
14511886Sbrandon.potter@amd.comdef bitfield HTOPCODE_8     htopcode8;
146378SN/Adef bitfield HTOPCODE_8_7   htopcode8_7;
14713995Sbrandon.potter@amd.comdef bitfield HTOPCODE_8_6   htopcode8_6;
148378SN/Adef bitfield HTOPCODE_8_5   htopcode8_5;
1495748SSteve.Reinhardt@amd.comdef bitfield HTOPCODE_7     htopcode7;
15013995Sbrandon.potter@amd.comdef bitfield HTOPCODE_7_5   htopcode7_5;
151378SN/Adef bitfield HTOPCODE_6_5   htopcode6_5;
152378SN/Adef bitfield HTOPCODE_5_4   htopcode5_4;
15313995Sbrandon.potter@amd.comdef bitfield HTOPCODE_4     htopcode4;
154378SN/A
155378SN/Adef bitfield HTRN           htrn;
15613995Sbrandon.potter@amd.comdef bitfield HTS            hts;
157378SN/A
1584118Sgblack@eecs.umich.edudef bitfield LTOPCODE_15    ltopcode15;
15913995Sbrandon.potter@amd.comdef bitfield LTOPCODE_11_8  ltopcode11_8;
1604118Sgblack@eecs.umich.edudef bitfield LTOPCODE_7_6   ltopcode7_6;
161378SN/Adef bitfield LTOPCODE_7_4   ltopcode7_4;
16213995Sbrandon.potter@amd.comdef bitfield LTOPCODE_4     ltopcode4;
163378SN/A
16413568Sbrandon.potter@amd.comdef bitfield LTRD           ltrd;
16513995Sbrandon.potter@amd.comdef bitfield LTCOPROC       ltcoproc;
16613568Sbrandon.potter@amd.com