str.isa revision 8588
17119SN/A// -*- mode:c++ -*-
27119SN/A
37119SN/A// Copyright (c) 2010 ARM Limited
47119SN/A// All rights reserved
57119SN/A//
67119SN/A// The license below extends only to copyright in the software and shall
77119SN/A// not be construed as granting a license to any other intellectual
87119SN/A// property including but not limited to intellectual property relating
97119SN/A// to a hardware implementation of the functionality of the software
107119SN/A// licensed hereunder.  You may use the software subject to the license
117119SN/A// terms below provided that you ensure that this notice is replicated
127119SN/A// unmodified and in its entirety in all distributions of the software,
137119SN/A// modified or unmodified, in source code or in binary form.
147119SN/A//
157119SN/A// Redistribution and use in source and binary forms, with or without
167119SN/A// modification, are permitted provided that the following conditions are
177119SN/A// met: redistributions of source code must retain the above copyright
187119SN/A// notice, this list of conditions and the following disclaimer;
197119SN/A// redistributions in binary form must reproduce the above copyright
207119SN/A// notice, this list of conditions and the following disclaimer in the
217119SN/A// documentation and/or other materials provided with the distribution;
227119SN/A// neither the name of the copyright holders nor the names of its
237119SN/A// contributors may be used to endorse or promote products derived from
247119SN/A// this software without specific prior written permission.
257119SN/A//
267119SN/A// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
277119SN/A// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
287119SN/A// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
297119SN/A// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
307119SN/A// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
317119SN/A// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
327119SN/A// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
337119SN/A// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
347119SN/A// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
357119SN/A// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
367119SN/A// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
377119SN/A//
387119SN/A// Authors: Gabe Black
397119SN/A
407119SN/Alet {{
417119SN/A
427119SN/A    header_output = ""
437119SN/A    decoder_output = ""
447119SN/A    exec_output = ""
457119SN/A
467590Sgblack@eecs.umich.edu    class StoreInst(LoadStoreInst):
477590Sgblack@eecs.umich.edu        execBase = 'Store'
487119SN/A
497590Sgblack@eecs.umich.edu        def __init__(self, mnem, post, add, writeback, size=4,
508069SMatt.Horsnell@arm.com                     sign=False, user=False, flavor="normal",
518069SMatt.Horsnell@arm.com                     instFlags = []):
527590Sgblack@eecs.umich.edu            super(StoreInst, self).__init__()
537590Sgblack@eecs.umich.edu
547590Sgblack@eecs.umich.edu            self.name = mnem
557590Sgblack@eecs.umich.edu            self.post = post
567590Sgblack@eecs.umich.edu            self.add = add
577590Sgblack@eecs.umich.edu            self.writeback = writeback
587590Sgblack@eecs.umich.edu            self.size = size
597590Sgblack@eecs.umich.edu            self.sign = sign
607590Sgblack@eecs.umich.edu            self.user = user
617590Sgblack@eecs.umich.edu            self.flavor = flavor
628069SMatt.Horsnell@arm.com            self.instFlags = instFlags
637590Sgblack@eecs.umich.edu            if self.add:
647590Sgblack@eecs.umich.edu                self.op = " +"
657590Sgblack@eecs.umich.edu            else:
667590Sgblack@eecs.umich.edu                self.op = " -"
677590Sgblack@eecs.umich.edu
687590Sgblack@eecs.umich.edu            self.memFlags = ["ArmISA::TLB::MustBeOne"]
697590Sgblack@eecs.umich.edu            self.codeBlobs = { "postacc_code" : "" }
707590Sgblack@eecs.umich.edu
717646Sgene.wu@arm.com        def emitHelper(self, base = 'Memory', wbDecl = None):
727590Sgblack@eecs.umich.edu
737590Sgblack@eecs.umich.edu            global header_output, decoder_output, exec_output
747590Sgblack@eecs.umich.edu
757590Sgblack@eecs.umich.edu            codeBlobs = self.codeBlobs
767590Sgblack@eecs.umich.edu            codeBlobs["predicate_test"] = pickPredicate(codeBlobs)
777590Sgblack@eecs.umich.edu            (newHeader,
787590Sgblack@eecs.umich.edu             newDecoder,
797590Sgblack@eecs.umich.edu             newExec) = self.fillTemplates(self.name, self.Name, codeBlobs,
808069SMatt.Horsnell@arm.com                                           self.memFlags, self.instFlags, base, wbDecl)
817590Sgblack@eecs.umich.edu
827590Sgblack@eecs.umich.edu            header_output += newHeader
837590Sgblack@eecs.umich.edu            decoder_output += newDecoder
847590Sgblack@eecs.umich.edu            exec_output += newExec
857590Sgblack@eecs.umich.edu
867590Sgblack@eecs.umich.edu    class SrsInst(LoadStoreInst):
877590Sgblack@eecs.umich.edu        execBase = 'Store'
887590Sgblack@eecs.umich.edu        decConstBase = 'Srs'
897590Sgblack@eecs.umich.edu
907590Sgblack@eecs.umich.edu        def __init__(self, mnem, post, add, writeback):
917590Sgblack@eecs.umich.edu            super(SrsInst, self).__init__()
927590Sgblack@eecs.umich.edu            self.name = mnem
937590Sgblack@eecs.umich.edu            self.post = post
947590Sgblack@eecs.umich.edu            self.add = add
957590Sgblack@eecs.umich.edu            self.writeback = writeback
967590Sgblack@eecs.umich.edu
977590Sgblack@eecs.umich.edu            self.Name = "SRS_" + storeImmClassName(post, add, writeback, 8)
987590Sgblack@eecs.umich.edu
997590Sgblack@eecs.umich.edu        def emit(self):
1007590Sgblack@eecs.umich.edu            offset = 0
1017590Sgblack@eecs.umich.edu            if self.post != self.add:
1027590Sgblack@eecs.umich.edu                offset += 4
1037590Sgblack@eecs.umich.edu            if not self.add:
1047590Sgblack@eecs.umich.edu                offset -= 8
1057590Sgblack@eecs.umich.edu
1067590Sgblack@eecs.umich.edu            eaCode = "EA = SpMode + %d;" % offset
1077590Sgblack@eecs.umich.edu
1087590Sgblack@eecs.umich.edu            wbDiff = -8
1097590Sgblack@eecs.umich.edu            if self.add:
1107590Sgblack@eecs.umich.edu                wbDiff = 8
1117590Sgblack@eecs.umich.edu            accCode = '''
1127590Sgblack@eecs.umich.edu            CPSR cpsr = Cpsr;
1138588Sgblack@eecs.umich.edu            Mem_ud = (uint64_t)cSwap(LR_uw, cpsr.e) |
1148588Sgblack@eecs.umich.edu                     ((uint64_t)cSwap(Spsr_uw, cpsr.e) << 32);
1157590Sgblack@eecs.umich.edu            '''
1167590Sgblack@eecs.umich.edu
1177590Sgblack@eecs.umich.edu            global header_output, decoder_output, exec_output
1187590Sgblack@eecs.umich.edu
1197590Sgblack@eecs.umich.edu            codeBlobs = { "ea_code": eaCode,
1207590Sgblack@eecs.umich.edu                          "memacc_code": accCode,
1217590Sgblack@eecs.umich.edu                          "postacc_code": "" }
1227590Sgblack@eecs.umich.edu            codeBlobs["predicate_test"] = pickPredicate(codeBlobs)
1237590Sgblack@eecs.umich.edu
1247746SAli.Saidi@ARM.com            wbDecl = None
1257746SAli.Saidi@ARM.com            if self.writeback:
1267746SAli.Saidi@ARM.com                wbDecl = '''MicroAddiUop(machInst,
1277746SAli.Saidi@ARM.com                              intRegInMode((OperatingMode)regMode, INTREG_SP),
1287746SAli.Saidi@ARM.com                              intRegInMode((OperatingMode)regMode, INTREG_SP),
1297746SAli.Saidi@ARM.com                              %d);''' % wbDiff
1307746SAli.Saidi@ARM.com
1317590Sgblack@eecs.umich.edu            (newHeader,
1327590Sgblack@eecs.umich.edu             newDecoder,
1337590Sgblack@eecs.umich.edu             newExec) = self.fillTemplates(self.name, self.Name, codeBlobs,
1347590Sgblack@eecs.umich.edu                 ["ArmISA::TLB::AlignWord", "ArmISA::TLB::MustBeOne"], [],
1357746SAli.Saidi@ARM.com                 'SrsOp', wbDecl)
1367590Sgblack@eecs.umich.edu
1377590Sgblack@eecs.umich.edu            header_output += newHeader
1387590Sgblack@eecs.umich.edu            decoder_output += newDecoder
1397590Sgblack@eecs.umich.edu            exec_output += newExec
1407590Sgblack@eecs.umich.edu
1417590Sgblack@eecs.umich.edu    class StoreImmInst(StoreInst):
1427590Sgblack@eecs.umich.edu        def __init__(self, *args, **kargs):
1437590Sgblack@eecs.umich.edu            super(StoreImmInst, self).__init__(*args, **kargs)
1447590Sgblack@eecs.umich.edu            self.offset = self.op + " imm"
1457590Sgblack@eecs.umich.edu
1467646Sgene.wu@arm.com            if self.add:
1477646Sgene.wu@arm.com                self.wbDecl = "MicroAddiUop(machInst, base, base, imm);"
1487646Sgene.wu@arm.com            else:
1497646Sgene.wu@arm.com                self.wbDecl = "MicroSubiUop(machInst, base, base, imm);"
1507646Sgene.wu@arm.com
1517590Sgblack@eecs.umich.edu    class StoreRegInst(StoreInst):
1527590Sgblack@eecs.umich.edu        def __init__(self, *args, **kargs):
1537590Sgblack@eecs.umich.edu            super(StoreRegInst, self).__init__(*args, **kargs)
1547590Sgblack@eecs.umich.edu            self.offset = self.op + " shift_rm_imm(Index, shiftAmt," + \
1558304SAli.Saidi@ARM.com                                    " shiftType, OptShiftRmCondCodesC)"
1567646Sgene.wu@arm.com            if self.add:
1577646Sgene.wu@arm.com                 self.wbDecl = '''
1587646Sgene.wu@arm.com                     MicroAddUop(machInst, base, base, index, shiftAmt, shiftType);
1597646Sgene.wu@arm.com                 '''
1607646Sgene.wu@arm.com            else:
1617646Sgene.wu@arm.com                 self.wbDecl = '''
1627646Sgene.wu@arm.com                     MicroSubUop(machInst, base, base, index, shiftAmt, shiftType);
1637646Sgene.wu@arm.com                 '''
1647590Sgblack@eecs.umich.edu
1657590Sgblack@eecs.umich.edu    class StoreSingle(StoreInst):
1667590Sgblack@eecs.umich.edu        def __init__(self, *args, **kargs):
1677590Sgblack@eecs.umich.edu            super(StoreSingle, self).__init__(*args, **kargs)
1687590Sgblack@eecs.umich.edu
1697590Sgblack@eecs.umich.edu            # Build the default class name
1707590Sgblack@eecs.umich.edu            self.Name = self.nameFunc(self.post, self.add, self.writeback,
1717590Sgblack@eecs.umich.edu                                      self.size, self.sign, self.user)
1727590Sgblack@eecs.umich.edu
1737590Sgblack@eecs.umich.edu            # Add memory request flags where necessary
1747590Sgblack@eecs.umich.edu            self.memFlags.append("%d" % (self.size - 1))
1757590Sgblack@eecs.umich.edu            if self.user:
1767590Sgblack@eecs.umich.edu                self.memFlags.append("ArmISA::TLB::UserMode")
1777590Sgblack@eecs.umich.edu
1787590Sgblack@eecs.umich.edu            if self.flavor == "exclusive":
1797590Sgblack@eecs.umich.edu                self.memFlags.append("Request::LLSC")
1807590Sgblack@eecs.umich.edu            elif self.flavor != "fp":
1817590Sgblack@eecs.umich.edu                self.memFlags.append("ArmISA::TLB::AllowUnaligned")
1827590Sgblack@eecs.umich.edu
1837590Sgblack@eecs.umich.edu            # Disambiguate the class name for different flavors of stores
1847590Sgblack@eecs.umich.edu            if self.flavor != "normal":
1857590Sgblack@eecs.umich.edu                self.Name = "%s_%s" % (self.name.upper(), self.Name)
1867590Sgblack@eecs.umich.edu
1877590Sgblack@eecs.umich.edu        def emit(self):
1887590Sgblack@eecs.umich.edu            # Address computation
1897590Sgblack@eecs.umich.edu            eaCode = "EA = Base"
1907590Sgblack@eecs.umich.edu            if not self.post:
1917590Sgblack@eecs.umich.edu                eaCode += self.offset
1927590Sgblack@eecs.umich.edu            eaCode += ";"
1937644Sali.saidi@arm.com
1947644Sali.saidi@arm.com            if self.flavor == "fp":
1957644Sali.saidi@arm.com                eaCode += vfpEnabledCheckCode
1967644Sali.saidi@arm.com
1977590Sgblack@eecs.umich.edu            self.codeBlobs["ea_code"] = eaCode
1987590Sgblack@eecs.umich.edu
1997590Sgblack@eecs.umich.edu            # Code that actually handles the access
2007590Sgblack@eecs.umich.edu            if self.flavor == "fp":
2018588Sgblack@eecs.umich.edu                accCode = 'Mem%(suffix)s = cSwap(FpDest_uw, ((CPSR)Cpsr).e);'
2027590Sgblack@eecs.umich.edu            else:
2037590Sgblack@eecs.umich.edu                accCode = \
2047590Sgblack@eecs.umich.edu                    'Mem%(suffix)s = cSwap(Dest%(suffix)s, ((CPSR)Cpsr).e);'
2057590Sgblack@eecs.umich.edu            accCode = accCode % \
2067590Sgblack@eecs.umich.edu                { "suffix" : buildMemSuffix(self.sign, self.size) }
2077590Sgblack@eecs.umich.edu
2087590Sgblack@eecs.umich.edu            self.codeBlobs["memacc_code"] = accCode
2097590Sgblack@eecs.umich.edu
2107590Sgblack@eecs.umich.edu            # Push it out to the output files
2117590Sgblack@eecs.umich.edu            base = buildMemBase(self.basePrefix, self.post, self.writeback)
2127646Sgene.wu@arm.com            wbDecl = None
2137646Sgene.wu@arm.com            if self.writeback:
2147646Sgene.wu@arm.com                wbDecl = self.wbDecl
2157646Sgene.wu@arm.com            self.emitHelper(base, wbDecl)
2167590Sgblack@eecs.umich.edu
2177590Sgblack@eecs.umich.edu    def storeImmClassName(post, add, writeback, size=4, sign=False, user=False):
2187590Sgblack@eecs.umich.edu        return memClassName("STORE_IMM", post, add, writeback, size, sign, user)
2197590Sgblack@eecs.umich.edu
2207590Sgblack@eecs.umich.edu    class StoreImmEx(StoreImmInst, StoreSingle):
2217590Sgblack@eecs.umich.edu        execBase = 'StoreEx'
2227590Sgblack@eecs.umich.edu        decConstBase = 'StoreExImm'
2237590Sgblack@eecs.umich.edu        basePrefix = 'MemoryExImm'
2247590Sgblack@eecs.umich.edu        nameFunc = staticmethod(storeImmClassName)
2257590Sgblack@eecs.umich.edu
2267590Sgblack@eecs.umich.edu        def __init__(self, *args, **kargs):
2277590Sgblack@eecs.umich.edu            super(StoreImmEx, self).__init__(*args, **kargs)
2287590Sgblack@eecs.umich.edu            self.codeBlobs["postacc_code"] = "Result = !writeResult;"
2297590Sgblack@eecs.umich.edu
2307590Sgblack@eecs.umich.edu    class StoreImm(StoreImmInst, StoreSingle):
2317590Sgblack@eecs.umich.edu        decConstBase = 'LoadStoreImm'
2327590Sgblack@eecs.umich.edu        basePrefix = 'MemoryImm'
2337590Sgblack@eecs.umich.edu        nameFunc = staticmethod(storeImmClassName)
2347590Sgblack@eecs.umich.edu
2357590Sgblack@eecs.umich.edu    def storeRegClassName(post, add, writeback, size=4, sign=False, user=False):
2367590Sgblack@eecs.umich.edu        return memClassName("STORE_REG", post, add, writeback, size, sign, user)
2377590Sgblack@eecs.umich.edu
2387590Sgblack@eecs.umich.edu    class StoreReg(StoreRegInst, StoreSingle):
2397646Sgene.wu@arm.com        decConstBase = 'StoreReg'
2407590Sgblack@eecs.umich.edu        basePrefix = 'MemoryReg'
2417590Sgblack@eecs.umich.edu        nameFunc = staticmethod(storeRegClassName)
2427590Sgblack@eecs.umich.edu
2437590Sgblack@eecs.umich.edu    class StoreDouble(StoreInst):
2447590Sgblack@eecs.umich.edu        def __init__(self, *args, **kargs):
2457590Sgblack@eecs.umich.edu            super(StoreDouble, self).__init__(*args, **kargs)
2467590Sgblack@eecs.umich.edu
2477590Sgblack@eecs.umich.edu            # Build the default class name
2487590Sgblack@eecs.umich.edu            self.Name = self.nameFunc(self.post, self.add, self.writeback)
2497590Sgblack@eecs.umich.edu
2507590Sgblack@eecs.umich.edu            # Add memory request flags where necessary
2517590Sgblack@eecs.umich.edu            if self.flavor == "exclusive":
2527590Sgblack@eecs.umich.edu                self.memFlags.append("Request::LLSC")
2537593SAli.Saidi@arm.com                self.memFlags.append("ArmISA::TLB::AlignDoubleWord")
2547593SAli.Saidi@arm.com            else:
2557593SAli.Saidi@arm.com                self.memFlags.append("ArmISA::TLB::AlignWord")
2567590Sgblack@eecs.umich.edu
2577590Sgblack@eecs.umich.edu            # Disambiguate the class name for different flavors of stores
2587590Sgblack@eecs.umich.edu            if self.flavor != "normal":
2597590Sgblack@eecs.umich.edu                self.Name = "%s_%s" % (self.name.upper(), self.Name)
2607590Sgblack@eecs.umich.edu
2617590Sgblack@eecs.umich.edu        def emit(self):
2627590Sgblack@eecs.umich.edu            # Address computation code
2637590Sgblack@eecs.umich.edu            eaCode = "EA = Base"
2647590Sgblack@eecs.umich.edu            if not self.post:
2657590Sgblack@eecs.umich.edu                eaCode += self.offset
2667590Sgblack@eecs.umich.edu            eaCode += ";"
2677644Sali.saidi@arm.com
2687644Sali.saidi@arm.com            if self.flavor == "fp":
2697644Sali.saidi@arm.com                eaCode += vfpEnabledCheckCode
2707644Sali.saidi@arm.com
2717590Sgblack@eecs.umich.edu            self.codeBlobs["ea_code"] = eaCode
2727590Sgblack@eecs.umich.edu
2737590Sgblack@eecs.umich.edu            # Code that actually handles the access
2747590Sgblack@eecs.umich.edu            if self.flavor == "fp":
2757590Sgblack@eecs.umich.edu                accCode = '''
2768588Sgblack@eecs.umich.edu                uint64_t swappedMem  = (uint64_t)FpDest_uw |
2778588Sgblack@eecs.umich.edu                                       ((uint64_t)FpDest2_uw << 32);
2788588Sgblack@eecs.umich.edu                Mem_ud = cSwap(swappedMem, ((CPSR)Cpsr).e);
2797590Sgblack@eecs.umich.edu                '''
2807590Sgblack@eecs.umich.edu            else:
2817590Sgblack@eecs.umich.edu                accCode = '''
2827590Sgblack@eecs.umich.edu                CPSR cpsr = Cpsr;
2838588Sgblack@eecs.umich.edu                Mem_ud = (uint64_t)cSwap(Dest_uw, cpsr.e) |
2848588Sgblack@eecs.umich.edu                         ((uint64_t)cSwap(Dest2_uw, cpsr.e) << 32);
2857590Sgblack@eecs.umich.edu                '''
2867590Sgblack@eecs.umich.edu
2877590Sgblack@eecs.umich.edu            self.codeBlobs["memacc_code"] = accCode
2887590Sgblack@eecs.umich.edu
2897590Sgblack@eecs.umich.edu            # Push it out to the output files
2907590Sgblack@eecs.umich.edu            base = buildMemBase(self.basePrefix, self.post, self.writeback)
2917646Sgene.wu@arm.com            wbDecl = None
2927646Sgene.wu@arm.com            if self.writeback:
2937646Sgene.wu@arm.com                wbDecl = self.wbDecl
2947646Sgene.wu@arm.com            self.emitHelper(base, wbDecl)
2957119SN/A
2967128Sgblack@eecs.umich.edu    def storeDoubleImmClassName(post, add, writeback):
2977590Sgblack@eecs.umich.edu        return memClassName("STORE_IMMD", post, add, writeback, 4, False, False)
2987590Sgblack@eecs.umich.edu
2997590Sgblack@eecs.umich.edu    class StoreDoubleImmEx(StoreImmInst, StoreDouble):
3007590Sgblack@eecs.umich.edu        execBase = 'StoreEx'
3017590Sgblack@eecs.umich.edu        decConstBase = 'StoreExDImm'
3027590Sgblack@eecs.umich.edu        basePrefix = 'MemoryExDImm'
3037590Sgblack@eecs.umich.edu        nameFunc = staticmethod(storeDoubleImmClassName)
3047590Sgblack@eecs.umich.edu
3057590Sgblack@eecs.umich.edu        def __init__(self, *args, **kargs):
3067590Sgblack@eecs.umich.edu            super(StoreDoubleImmEx, self).__init__(*args, **kargs)
3077590Sgblack@eecs.umich.edu            self.codeBlobs["postacc_code"] = "Result = !writeResult;"
3087590Sgblack@eecs.umich.edu
3097590Sgblack@eecs.umich.edu    class StoreDoubleImm(StoreImmInst, StoreDouble):
3107590Sgblack@eecs.umich.edu        decConstBase = 'LoadStoreDImm'
3117590Sgblack@eecs.umich.edu        basePrefix = 'MemoryDImm'
3127590Sgblack@eecs.umich.edu        nameFunc = staticmethod(storeDoubleImmClassName)
3137128Sgblack@eecs.umich.edu
3147128Sgblack@eecs.umich.edu    def storeDoubleRegClassName(post, add, writeback):
3157590Sgblack@eecs.umich.edu        return memClassName("STORE_REGD", post, add, writeback, 4, False, False)
3167128Sgblack@eecs.umich.edu
3177590Sgblack@eecs.umich.edu    class StoreDoubleReg(StoreRegInst, StoreDouble):
3187646Sgene.wu@arm.com        decConstBase = 'StoreDReg'
3197590Sgblack@eecs.umich.edu        basePrefix = 'MemoryDReg'
3207590Sgblack@eecs.umich.edu        nameFunc = staticmethod(storeDoubleRegClassName)
3217128Sgblack@eecs.umich.edu
3227120Sgblack@eecs.umich.edu    def buildStores(mnem, size=4, sign=False, user=False):
3237590Sgblack@eecs.umich.edu        StoreImm(mnem, True, True, True, size, sign, user).emit()
3247590Sgblack@eecs.umich.edu        StoreReg(mnem, True, True, True, size, sign, user).emit()
3257590Sgblack@eecs.umich.edu        StoreImm(mnem, True, False, True, size, sign, user).emit()
3267590Sgblack@eecs.umich.edu        StoreReg(mnem, True, False, True, size, sign, user).emit()
3277590Sgblack@eecs.umich.edu        StoreImm(mnem, False, True, True, size, sign, user).emit()
3287590Sgblack@eecs.umich.edu        StoreReg(mnem, False, True, True, size, sign, user).emit()
3297590Sgblack@eecs.umich.edu        StoreImm(mnem, False, False, True, size, sign, user).emit()
3307590Sgblack@eecs.umich.edu        StoreReg(mnem, False, False, True, size, sign, user).emit()
3317590Sgblack@eecs.umich.edu        StoreImm(mnem, False, True, False, size, sign, user).emit()
3327590Sgblack@eecs.umich.edu        StoreReg(mnem, False, True, False, size, sign, user).emit()
3337590Sgblack@eecs.umich.edu        StoreImm(mnem, False, False, False, size, sign, user).emit()
3347590Sgblack@eecs.umich.edu        StoreReg(mnem, False, False, False, size, sign, user).emit()
3357119SN/A
3367128Sgblack@eecs.umich.edu    def buildDoubleStores(mnem):
3377590Sgblack@eecs.umich.edu        StoreDoubleImm(mnem, True, True, True).emit()
3387590Sgblack@eecs.umich.edu        StoreDoubleReg(mnem, True, True, True).emit()
3397590Sgblack@eecs.umich.edu        StoreDoubleImm(mnem, True, False, True).emit()
3407590Sgblack@eecs.umich.edu        StoreDoubleReg(mnem, True, False, True).emit()
3417590Sgblack@eecs.umich.edu        StoreDoubleImm(mnem, False, True, True).emit()
3427590Sgblack@eecs.umich.edu        StoreDoubleReg(mnem, False, True, True).emit()
3437590Sgblack@eecs.umich.edu        StoreDoubleImm(mnem, False, False, True).emit()
3447590Sgblack@eecs.umich.edu        StoreDoubleReg(mnem, False, False, True).emit()
3457590Sgblack@eecs.umich.edu        StoreDoubleImm(mnem, False, True, False).emit()
3467590Sgblack@eecs.umich.edu        StoreDoubleReg(mnem, False, True, False).emit()
3477590Sgblack@eecs.umich.edu        StoreDoubleImm(mnem, False, False, False).emit()
3487590Sgblack@eecs.umich.edu        StoreDoubleReg(mnem, False, False, False).emit()
3497128Sgblack@eecs.umich.edu
3507313Sgblack@eecs.umich.edu    def buildSrsStores(mnem):
3517590Sgblack@eecs.umich.edu        SrsInst(mnem, True, True, True).emit()
3527590Sgblack@eecs.umich.edu        SrsInst(mnem, True, True, False).emit()
3537590Sgblack@eecs.umich.edu        SrsInst(mnem, True, False, True).emit()
3547590Sgblack@eecs.umich.edu        SrsInst(mnem, True, False, False).emit()
3557590Sgblack@eecs.umich.edu        SrsInst(mnem, False, True, True).emit()
3567590Sgblack@eecs.umich.edu        SrsInst(mnem, False, True, False).emit()
3577590Sgblack@eecs.umich.edu        SrsInst(mnem, False, False, True).emit()
3587590Sgblack@eecs.umich.edu        SrsInst(mnem, False, False, False).emit()
3597313Sgblack@eecs.umich.edu
3607120Sgblack@eecs.umich.edu    buildStores("str")
3617120Sgblack@eecs.umich.edu    buildStores("strt", user=True)
3627120Sgblack@eecs.umich.edu    buildStores("strb", size=1)
3637120Sgblack@eecs.umich.edu    buildStores("strbt", size=1, user=True)
3647120Sgblack@eecs.umich.edu    buildStores("strh", size=2)
3657120Sgblack@eecs.umich.edu    buildStores("strht", size=2, user=True)
3667128Sgblack@eecs.umich.edu
3677313Sgblack@eecs.umich.edu    buildSrsStores("srs")
3687313Sgblack@eecs.umich.edu
3697128Sgblack@eecs.umich.edu    buildDoubleStores("strd")
3707303Sgblack@eecs.umich.edu
3718136SAli.Saidi@ARM.com    StoreImmEx("strex", False, True, False, size=4, flavor="exclusive",
3728136SAli.Saidi@ARM.com               instFlags = ['IsStoreConditional']).emit()
3738136SAli.Saidi@ARM.com    StoreImmEx("strexh", False, True, False, size=2, flavor="exclusive",
3748136SAli.Saidi@ARM.com               instFlags = ['IsStoreConditional']).emit()
3758136SAli.Saidi@ARM.com    StoreImmEx("strexb", False, True, False, size=1, flavor="exclusive",
3768136SAli.Saidi@ARM.com               instFlags = ['IsStoreConditional']).emit()
3778136SAli.Saidi@ARM.com    StoreDoubleImmEx("strexd", False, True, False, flavor="exclusive",
3788136SAli.Saidi@ARM.com               instFlags = ['IsStoreConditional']).emit()
3797345Sgblack@eecs.umich.edu
3807590Sgblack@eecs.umich.edu    StoreImm("vstr", False, True, False, size=4, flavor="fp").emit()
3817590Sgblack@eecs.umich.edu    StoreImm("vstr", False, False, False, size=4, flavor="fp").emit()
3827590Sgblack@eecs.umich.edu    StoreDoubleImm("vstr", False, True, False, flavor="fp").emit()
3837590Sgblack@eecs.umich.edu    StoreDoubleImm("vstr", False, False, False, flavor="fp").emit()
3847119SN/A}};
385