operands.isa revision 2706
12686Sksewell@umich.edu// -*- mode:c++ -*-
22686Sksewell@umich.edu
32706Sksewell@umich.edu// Copyright (c) 2003-2006 The Regents of The University of Michigan
42706Sksewell@umich.edu// All rights reserved.
52706Sksewell@umich.edu//
62706Sksewell@umich.edu// Redistribution and use in source and binary forms, with or without
72706Sksewell@umich.edu// modification, are permitted provided that the following conditions are
82706Sksewell@umich.edu// met: redistributions of source code must retain the above copyright
92706Sksewell@umich.edu// notice, this list of conditions and the following disclaimer;
102706Sksewell@umich.edu// redistributions in binary form must reproduce the above copyright
112706Sksewell@umich.edu// notice, this list of conditions and the following disclaimer in the
122706Sksewell@umich.edu// documentation and/or other materials provided with the distribution;
132706Sksewell@umich.edu// neither the name of the copyright holders nor the names of its
142706Sksewell@umich.edu// contributors may be used to endorse or promote products derived from
152706Sksewell@umich.edu// this software without specific prior written permission.
162706Sksewell@umich.edu//
172706Sksewell@umich.edu// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
182706Sksewell@umich.edu// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
192706Sksewell@umich.edu// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
202706Sksewell@umich.edu// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
212706Sksewell@umich.edu// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
222706Sksewell@umich.edu// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
232706Sksewell@umich.edu// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
242706Sksewell@umich.edu// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
252706Sksewell@umich.edu// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
262706Sksewell@umich.edu// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
272706Sksewell@umich.edu// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
282706Sksewell@umich.edu//
292706Sksewell@umich.edu// Authors: Korey Sewell
302706Sksewell@umich.edu
312023SN/Adef operand_types {{
322023SN/A    'sb' : ('signed int', 8),
332023SN/A    'ub' : ('unsigned int', 8),
342124SN/A    'sh' : ('signed int', 16),
352124SN/A    'uh' : ('unsigned int', 16),
362023SN/A    'sw' : ('signed int', 32),
372023SN/A    'uw' : ('unsigned int', 32),
382084SN/A    'sd' : ('signed int', 64),
392084SN/A    'ud' : ('unsigned int', 64),
402023SN/A    'sf' : ('float', 32),
412023SN/A    'df' : ('float', 64),
422023SN/A    'qf' : ('float', 128)
432023SN/A}};
442023SN/A
452023SN/Adef operands {{
462616SN/A    #General Purpose Integer Reg Operands
472077SN/A    'Rd': ('IntReg', 'uw', 'RD', 'IsInteger', 1),
482077SN/A    'Rs': ('IntReg', 'uw', 'RS', 'IsInteger', 2),
492077SN/A    'Rt': ('IntReg', 'uw', 'RT', 'IsInteger', 3),
502616SN/A
512616SN/A    #Operands used for Link or Syscall Insts
522616SN/A    'R31': ('IntReg', 'uw','31','IsInteger', 4),
532562SN/A    'R2':  ('IntReg', 'uw','2', 'IsInteger', 5),
542041SN/A
552616SN/A    #Special Integer Reg operands
562616SN/A    'HI':  ('IntReg', 'uw','32', 'IsInteger', 6),
572616SN/A    'LO':  ('IntReg', 'uw','33', 'IsInteger', 7),
582616SN/A
592616SN/A    #Immediate Value operand
602077SN/A    'IntImm': ('IntReg', 'uw', 'INTIMM', 'IsInteger', 3),
612041SN/A
622616SN/A    #Floating Point Reg Operands
632077SN/A    'Fd': ('FloatReg', 'sf', 'FD', 'IsFloating', 1),
642077SN/A    'Fs': ('FloatReg', 'sf', 'FS', 'IsFloating', 2),
652077SN/A    'Ft': ('FloatReg', 'sf', 'FT', 'IsFloating', 3),
662239SN/A    'Fr': ('FloatReg', 'sf', 'FR', 'IsFloating', 3),
672041SN/A
682616SN/A    #Special Floating Point Control Reg Operands
692616SN/A    'FIR':  ('FloatReg', 'uw', '32', 'IsFloating', 1),
702616SN/A    'FCCR': ('FloatReg', 'uw', '33', 'IsFloating', 2),
712616SN/A    'FEXR': ('FloatReg', 'uw', '34', 'IsFloating', 3),
722616SN/A    'FENR': ('FloatReg', 'uw', '35', 'IsFloating', 3),
732616SN/A    'FCSR': ('FloatReg', 'uw', '36', 'IsFloating', 3),
742616SN/A
752607SN/A     #Operands For Paired Singles FP Operations
762607SN/A    'Fd1': ('FloatReg', 'sf', 'FD', 'IsFloating', 4),
772607SN/A    'Fd2': ('FloatReg', 'sf', 'FD+1', 'IsFloating', 4),
782607SN/A    'Fs1': ('FloatReg', 'sf', 'FS', 'IsFloating', 5),
792607SN/A    'Fs2': ('FloatReg', 'sf', 'FS+1', 'IsFloating', 5),
802607SN/A    'Ft1': ('FloatReg', 'sf', 'FT', 'IsFloating', 6),
812607SN/A    'Ft2': ('FloatReg', 'sf', 'FT+1', 'IsFloating', 6),
822607SN/A    'Fr1': ('FloatReg', 'sf', 'FR', 'IsFloating', 7),
832607SN/A    'Fr2': ('FloatReg', 'sf', 'FR+1', 'IsFloating', 7),
842607SN/A
852616SN/A    #Memory Operand
862495SN/A    'Mem': ('Mem', 'uw', None, ('IsMemRef', 'IsLoad', 'IsStore'), 4),
872041SN/A
882616SN/A    #Program Counter Operands
892104SN/A    'NPC': ('NPC', 'uw', None, ( None, None, 'IsControl' ), 4),
902239SN/A    'NNPC':('NNPC', 'uw', None, ( None, None, 'IsControl' ), 4)
912023SN/A}};
92