str.isa revision 7644
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,
507590Sgblack@eecs.umich.edu                     sign=False, user=False, flavor="normal"):
517590Sgblack@eecs.umich.edu            super(StoreInst, self).__init__()
527590Sgblack@eecs.umich.edu
537590Sgblack@eecs.umich.edu            self.name = mnem
547590Sgblack@eecs.umich.edu            self.post = post
557590Sgblack@eecs.umich.edu            self.add = add
567590Sgblack@eecs.umich.edu            self.writeback = writeback
577590Sgblack@eecs.umich.edu            self.size = size
587590Sgblack@eecs.umich.edu            self.sign = sign
597590Sgblack@eecs.umich.edu            self.user = user
607590Sgblack@eecs.umich.edu            self.flavor = flavor
617590Sgblack@eecs.umich.edu
627590Sgblack@eecs.umich.edu            if self.add:
637590Sgblack@eecs.umich.edu                self.op = " +"
647590Sgblack@eecs.umich.edu            else:
657590Sgblack@eecs.umich.edu                self.op = " -"
667590Sgblack@eecs.umich.edu
677590Sgblack@eecs.umich.edu            self.memFlags = ["ArmISA::TLB::MustBeOne"]
687590Sgblack@eecs.umich.edu            self.codeBlobs = { "postacc_code" : "" }
697590Sgblack@eecs.umich.edu
707590Sgblack@eecs.umich.edu        def emitHelper(self, base = 'Memory'):
717590Sgblack@eecs.umich.edu
727590Sgblack@eecs.umich.edu            global header_output, decoder_output, exec_output
737590Sgblack@eecs.umich.edu
747590Sgblack@eecs.umich.edu            codeBlobs = self.codeBlobs
757590Sgblack@eecs.umich.edu            codeBlobs["predicate_test"] = pickPredicate(codeBlobs)
767590Sgblack@eecs.umich.edu            (newHeader,
777590Sgblack@eecs.umich.edu             newDecoder,
787590Sgblack@eecs.umich.edu             newExec) = self.fillTemplates(self.name, self.Name, codeBlobs,
797590Sgblack@eecs.umich.edu                                           self.memFlags, [], base)
807590Sgblack@eecs.umich.edu
817590Sgblack@eecs.umich.edu            header_output += newHeader
827590Sgblack@eecs.umich.edu            decoder_output += newDecoder
837590Sgblack@eecs.umich.edu            exec_output += newExec
847590Sgblack@eecs.umich.edu
857590Sgblack@eecs.umich.edu    class SrsInst(LoadStoreInst):
867590Sgblack@eecs.umich.edu        execBase = 'Store'
877590Sgblack@eecs.umich.edu        decConstBase = 'Srs'
887590Sgblack@eecs.umich.edu
897590Sgblack@eecs.umich.edu        def __init__(self, mnem, post, add, writeback):
907590Sgblack@eecs.umich.edu            super(SrsInst, self).__init__()
917590Sgblack@eecs.umich.edu            self.name = mnem
927590Sgblack@eecs.umich.edu            self.post = post
937590Sgblack@eecs.umich.edu            self.add = add
947590Sgblack@eecs.umich.edu            self.writeback = writeback
957590Sgblack@eecs.umich.edu
967590Sgblack@eecs.umich.edu            self.Name = "SRS_" + storeImmClassName(post, add, writeback, 8)
977590Sgblack@eecs.umich.edu
987590Sgblack@eecs.umich.edu        def emit(self):
997590Sgblack@eecs.umich.edu            offset = 0
1007590Sgblack@eecs.umich.edu            if self.post != self.add:
1017590Sgblack@eecs.umich.edu                offset += 4
1027590Sgblack@eecs.umich.edu            if not self.add:
1037590Sgblack@eecs.umich.edu                offset -= 8
1047590Sgblack@eecs.umich.edu
1057590Sgblack@eecs.umich.edu            eaCode = "EA = SpMode + %d;" % offset
1067590Sgblack@eecs.umich.edu
1077590Sgblack@eecs.umich.edu            wbDiff = -8
1087590Sgblack@eecs.umich.edu            if self.add:
1097590Sgblack@eecs.umich.edu                wbDiff = 8
1107590Sgblack@eecs.umich.edu            accCode = '''
1117590Sgblack@eecs.umich.edu            CPSR cpsr = Cpsr;
1127590Sgblack@eecs.umich.edu            Mem.ud = (uint64_t)cSwap(LR.uw, cpsr.e) |
1137590Sgblack@eecs.umich.edu                     ((uint64_t)cSwap(Spsr.uw, cpsr.e) << 32);
1147590Sgblack@eecs.umich.edu            '''
1157590Sgblack@eecs.umich.edu            if self.writeback:
1167590Sgblack@eecs.umich.edu                accCode += "SpMode = SpMode + %s;\n" % wbDiff
1177590Sgblack@eecs.umich.edu
1187590Sgblack@eecs.umich.edu            global header_output, decoder_output, exec_output
1197590Sgblack@eecs.umich.edu
1207590Sgblack@eecs.umich.edu            codeBlobs = { "ea_code": eaCode,
1217590Sgblack@eecs.umich.edu                          "memacc_code": accCode,
1227590Sgblack@eecs.umich.edu                          "postacc_code": "" }
1237590Sgblack@eecs.umich.edu            codeBlobs["predicate_test"] = pickPredicate(codeBlobs)
1247590Sgblack@eecs.umich.edu
1257590Sgblack@eecs.umich.edu            (newHeader,
1267590Sgblack@eecs.umich.edu             newDecoder,
1277590Sgblack@eecs.umich.edu             newExec) = self.fillTemplates(self.name, self.Name, codeBlobs,
1287590Sgblack@eecs.umich.edu                 ["ArmISA::TLB::AlignWord", "ArmISA::TLB::MustBeOne"], [],
1297590Sgblack@eecs.umich.edu                 base = 'SrsOp')
1307590Sgblack@eecs.umich.edu
1317590Sgblack@eecs.umich.edu            header_output += newHeader
1327590Sgblack@eecs.umich.edu            decoder_output += newDecoder
1337590Sgblack@eecs.umich.edu            exec_output += newExec
1347590Sgblack@eecs.umich.edu
1357590Sgblack@eecs.umich.edu    class StoreImmInst(StoreInst):
1367590Sgblack@eecs.umich.edu        def __init__(self, *args, **kargs):
1377590Sgblack@eecs.umich.edu            super(StoreImmInst, self).__init__(*args, **kargs)
1387590Sgblack@eecs.umich.edu            self.offset = self.op + " imm"
1397590Sgblack@eecs.umich.edu
1407590Sgblack@eecs.umich.edu    class StoreRegInst(StoreInst):
1417590Sgblack@eecs.umich.edu        def __init__(self, *args, **kargs):
1427590Sgblack@eecs.umich.edu            super(StoreRegInst, self).__init__(*args, **kargs)
1437590Sgblack@eecs.umich.edu            self.offset = self.op + " shift_rm_imm(Index, shiftAmt," + \
1447590Sgblack@eecs.umich.edu                                    " shiftType, CondCodes<29:>)"
1457590Sgblack@eecs.umich.edu
1467590Sgblack@eecs.umich.edu    class StoreSingle(StoreInst):
1477590Sgblack@eecs.umich.edu        def __init__(self, *args, **kargs):
1487590Sgblack@eecs.umich.edu            super(StoreSingle, self).__init__(*args, **kargs)
1497590Sgblack@eecs.umich.edu
1507590Sgblack@eecs.umich.edu            # Build the default class name
1517590Sgblack@eecs.umich.edu            self.Name = self.nameFunc(self.post, self.add, self.writeback,
1527590Sgblack@eecs.umich.edu                                      self.size, self.sign, self.user)
1537590Sgblack@eecs.umich.edu
1547590Sgblack@eecs.umich.edu            # Add memory request flags where necessary
1557590Sgblack@eecs.umich.edu            self.memFlags.append("%d" % (self.size - 1))
1567590Sgblack@eecs.umich.edu            if self.user:
1577590Sgblack@eecs.umich.edu                self.memFlags.append("ArmISA::TLB::UserMode")
1587590Sgblack@eecs.umich.edu
1597590Sgblack@eecs.umich.edu            if self.flavor == "exclusive":
1607590Sgblack@eecs.umich.edu                self.memFlags.append("Request::LLSC")
1617590Sgblack@eecs.umich.edu            elif self.flavor != "fp":
1627590Sgblack@eecs.umich.edu                self.memFlags.append("ArmISA::TLB::AllowUnaligned")
1637590Sgblack@eecs.umich.edu
1647590Sgblack@eecs.umich.edu            # Disambiguate the class name for different flavors of stores
1657590Sgblack@eecs.umich.edu            if self.flavor != "normal":
1667590Sgblack@eecs.umich.edu                self.Name = "%s_%s" % (self.name.upper(), self.Name)
1677590Sgblack@eecs.umich.edu
1687590Sgblack@eecs.umich.edu        def emit(self):
1697590Sgblack@eecs.umich.edu            # Address computation
1707590Sgblack@eecs.umich.edu            eaCode = "EA = Base"
1717590Sgblack@eecs.umich.edu            if not self.post:
1727590Sgblack@eecs.umich.edu                eaCode += self.offset
1737590Sgblack@eecs.umich.edu            eaCode += ";"
1747644Sali.saidi@arm.com
1757644Sali.saidi@arm.com            if self.flavor == "fp":
1767644Sali.saidi@arm.com                eaCode += vfpEnabledCheckCode
1777644Sali.saidi@arm.com
1787590Sgblack@eecs.umich.edu            self.codeBlobs["ea_code"] = eaCode
1797590Sgblack@eecs.umich.edu
1807590Sgblack@eecs.umich.edu            # Code that actually handles the access
1817590Sgblack@eecs.umich.edu            if self.flavor == "fp":
1827590Sgblack@eecs.umich.edu                accCode = 'Mem%(suffix)s = cSwap(FpDest.uw, ((CPSR)Cpsr).e);'
1837590Sgblack@eecs.umich.edu            else:
1847590Sgblack@eecs.umich.edu                accCode = \
1857590Sgblack@eecs.umich.edu                    'Mem%(suffix)s = cSwap(Dest%(suffix)s, ((CPSR)Cpsr).e);'
1867590Sgblack@eecs.umich.edu            accCode = accCode % \
1877590Sgblack@eecs.umich.edu                { "suffix" : buildMemSuffix(self.sign, self.size) }
1887590Sgblack@eecs.umich.edu
1897590Sgblack@eecs.umich.edu            if self.writeback:
1907590Sgblack@eecs.umich.edu                accCode += "Base = Base %s;\n" % self.offset
1917590Sgblack@eecs.umich.edu
1927590Sgblack@eecs.umich.edu            self.codeBlobs["memacc_code"] = accCode
1937590Sgblack@eecs.umich.edu
1947590Sgblack@eecs.umich.edu            # Push it out to the output files
1957590Sgblack@eecs.umich.edu            base = buildMemBase(self.basePrefix, self.post, self.writeback)
1967590Sgblack@eecs.umich.edu            self.emitHelper(base)
1977590Sgblack@eecs.umich.edu
1987590Sgblack@eecs.umich.edu    def storeImmClassName(post, add, writeback, size=4, sign=False, user=False):
1997590Sgblack@eecs.umich.edu        return memClassName("STORE_IMM", post, add, writeback, size, sign, user)
2007590Sgblack@eecs.umich.edu
2017590Sgblack@eecs.umich.edu    class StoreImmEx(StoreImmInst, StoreSingle):
2027590Sgblack@eecs.umich.edu        execBase = 'StoreEx'
2037590Sgblack@eecs.umich.edu        decConstBase = 'StoreExImm'
2047590Sgblack@eecs.umich.edu        basePrefix = 'MemoryExImm'
2057590Sgblack@eecs.umich.edu        nameFunc = staticmethod(storeImmClassName)
2067590Sgblack@eecs.umich.edu
2077590Sgblack@eecs.umich.edu        def __init__(self, *args, **kargs):
2087590Sgblack@eecs.umich.edu            super(StoreImmEx, self).__init__(*args, **kargs)
2097590Sgblack@eecs.umich.edu            self.codeBlobs["postacc_code"] = "Result = !writeResult;"
2107590Sgblack@eecs.umich.edu
2117590Sgblack@eecs.umich.edu    class StoreImm(StoreImmInst, StoreSingle):
2127590Sgblack@eecs.umich.edu        decConstBase = 'LoadStoreImm'
2137590Sgblack@eecs.umich.edu        basePrefix = 'MemoryImm'
2147590Sgblack@eecs.umich.edu        nameFunc = staticmethod(storeImmClassName)
2157590Sgblack@eecs.umich.edu
2167590Sgblack@eecs.umich.edu    def storeRegClassName(post, add, writeback, size=4, sign=False, user=False):
2177590Sgblack@eecs.umich.edu        return memClassName("STORE_REG", post, add, writeback, size, sign, user)
2187590Sgblack@eecs.umich.edu
2197590Sgblack@eecs.umich.edu    class StoreReg(StoreRegInst, StoreSingle):
2207590Sgblack@eecs.umich.edu        decConstBase = 'LoadStoreReg'
2217590Sgblack@eecs.umich.edu        basePrefix = 'MemoryReg'
2227590Sgblack@eecs.umich.edu        nameFunc = staticmethod(storeRegClassName)
2237590Sgblack@eecs.umich.edu
2247590Sgblack@eecs.umich.edu    class StoreDouble(StoreInst):
2257590Sgblack@eecs.umich.edu        def __init__(self, *args, **kargs):
2267590Sgblack@eecs.umich.edu            super(StoreDouble, self).__init__(*args, **kargs)
2277590Sgblack@eecs.umich.edu
2287590Sgblack@eecs.umich.edu            # Build the default class name
2297590Sgblack@eecs.umich.edu            self.Name = self.nameFunc(self.post, self.add, self.writeback)
2307590Sgblack@eecs.umich.edu
2317590Sgblack@eecs.umich.edu            # Add memory request flags where necessary
2327590Sgblack@eecs.umich.edu            if self.flavor == "exclusive":
2337590Sgblack@eecs.umich.edu                self.memFlags.append("Request::LLSC")
2347593SAli.Saidi@arm.com                self.memFlags.append("ArmISA::TLB::AlignDoubleWord")
2357593SAli.Saidi@arm.com            else:
2367593SAli.Saidi@arm.com                self.memFlags.append("ArmISA::TLB::AlignWord")
2377590Sgblack@eecs.umich.edu
2387590Sgblack@eecs.umich.edu            # Disambiguate the class name for different flavors of stores
2397590Sgblack@eecs.umich.edu            if self.flavor != "normal":
2407590Sgblack@eecs.umich.edu                self.Name = "%s_%s" % (self.name.upper(), self.Name)
2417590Sgblack@eecs.umich.edu
2427590Sgblack@eecs.umich.edu        def emit(self):
2437590Sgblack@eecs.umich.edu            # Address computation code
2447590Sgblack@eecs.umich.edu            eaCode = "EA = Base"
2457590Sgblack@eecs.umich.edu            if not self.post:
2467590Sgblack@eecs.umich.edu                eaCode += self.offset
2477590Sgblack@eecs.umich.edu            eaCode += ";"
2487644Sali.saidi@arm.com
2497644Sali.saidi@arm.com            if self.flavor == "fp":
2507644Sali.saidi@arm.com                eaCode += vfpEnabledCheckCode
2517644Sali.saidi@arm.com
2527590Sgblack@eecs.umich.edu            self.codeBlobs["ea_code"] = eaCode
2537590Sgblack@eecs.umich.edu
2547590Sgblack@eecs.umich.edu            # Code that actually handles the access
2557590Sgblack@eecs.umich.edu            if self.flavor == "fp":
2567590Sgblack@eecs.umich.edu                accCode = '''
2577590Sgblack@eecs.umich.edu                uint64_t swappedMem  = (uint64_t)FpDest.uw |
2587590Sgblack@eecs.umich.edu                                       ((uint64_t)FpDest2.uw << 32);
2597590Sgblack@eecs.umich.edu                Mem.ud = cSwap(swappedMem, ((CPSR)Cpsr).e);
2607590Sgblack@eecs.umich.edu                '''
2617590Sgblack@eecs.umich.edu            else:
2627590Sgblack@eecs.umich.edu                accCode = '''
2637590Sgblack@eecs.umich.edu                CPSR cpsr = Cpsr;
2647590Sgblack@eecs.umich.edu                Mem.ud = (uint64_t)cSwap(Dest.uw, cpsr.e) |
2657590Sgblack@eecs.umich.edu                         ((uint64_t)cSwap(Dest2.uw, cpsr.e) << 32);
2667590Sgblack@eecs.umich.edu                '''
2677590Sgblack@eecs.umich.edu
2687590Sgblack@eecs.umich.edu            if self.writeback:
2697590Sgblack@eecs.umich.edu                accCode += "Base = Base %s;\n" % self.offset
2707590Sgblack@eecs.umich.edu
2717590Sgblack@eecs.umich.edu            self.codeBlobs["memacc_code"] = accCode
2727590Sgblack@eecs.umich.edu
2737590Sgblack@eecs.umich.edu            # Push it out to the output files
2747590Sgblack@eecs.umich.edu            base = buildMemBase(self.basePrefix, self.post, self.writeback)
2757590Sgblack@eecs.umich.edu            self.emitHelper(base)
2767119SN/A
2777128Sgblack@eecs.umich.edu    def storeDoubleImmClassName(post, add, writeback):
2787590Sgblack@eecs.umich.edu        return memClassName("STORE_IMMD", post, add, writeback, 4, False, False)
2797590Sgblack@eecs.umich.edu
2807590Sgblack@eecs.umich.edu    class StoreDoubleImmEx(StoreImmInst, StoreDouble):
2817590Sgblack@eecs.umich.edu        execBase = 'StoreEx'
2827590Sgblack@eecs.umich.edu        decConstBase = 'StoreExDImm'
2837590Sgblack@eecs.umich.edu        basePrefix = 'MemoryExDImm'
2847590Sgblack@eecs.umich.edu        nameFunc = staticmethod(storeDoubleImmClassName)
2857590Sgblack@eecs.umich.edu
2867590Sgblack@eecs.umich.edu        def __init__(self, *args, **kargs):
2877590Sgblack@eecs.umich.edu            super(StoreDoubleImmEx, self).__init__(*args, **kargs)
2887590Sgblack@eecs.umich.edu            self.codeBlobs["postacc_code"] = "Result = !writeResult;"
2897590Sgblack@eecs.umich.edu
2907590Sgblack@eecs.umich.edu    class StoreDoubleImm(StoreImmInst, StoreDouble):
2917590Sgblack@eecs.umich.edu        decConstBase = 'LoadStoreDImm'
2927590Sgblack@eecs.umich.edu        basePrefix = 'MemoryDImm'
2937590Sgblack@eecs.umich.edu        nameFunc = staticmethod(storeDoubleImmClassName)
2947128Sgblack@eecs.umich.edu
2957128Sgblack@eecs.umich.edu    def storeDoubleRegClassName(post, add, writeback):
2967590Sgblack@eecs.umich.edu        return memClassName("STORE_REGD", post, add, writeback, 4, False, False)
2977128Sgblack@eecs.umich.edu
2987590Sgblack@eecs.umich.edu    class StoreDoubleReg(StoreRegInst, StoreDouble):
2997590Sgblack@eecs.umich.edu        decConstBase = 'LoadStoreDReg'
3007590Sgblack@eecs.umich.edu        basePrefix = 'MemoryDReg'
3017590Sgblack@eecs.umich.edu        nameFunc = staticmethod(storeDoubleRegClassName)
3027128Sgblack@eecs.umich.edu
3037120Sgblack@eecs.umich.edu    def buildStores(mnem, size=4, sign=False, user=False):
3047590Sgblack@eecs.umich.edu        StoreImm(mnem, True, True, True, size, sign, user).emit()
3057590Sgblack@eecs.umich.edu        StoreReg(mnem, True, True, True, size, sign, user).emit()
3067590Sgblack@eecs.umich.edu        StoreImm(mnem, True, False, True, size, sign, user).emit()
3077590Sgblack@eecs.umich.edu        StoreReg(mnem, True, False, True, size, sign, user).emit()
3087590Sgblack@eecs.umich.edu        StoreImm(mnem, False, True, True, size, sign, user).emit()
3097590Sgblack@eecs.umich.edu        StoreReg(mnem, False, True, True, size, sign, user).emit()
3107590Sgblack@eecs.umich.edu        StoreImm(mnem, False, False, True, size, sign, user).emit()
3117590Sgblack@eecs.umich.edu        StoreReg(mnem, False, False, True, size, sign, user).emit()
3127590Sgblack@eecs.umich.edu        StoreImm(mnem, False, True, False, size, sign, user).emit()
3137590Sgblack@eecs.umich.edu        StoreReg(mnem, False, True, False, size, sign, user).emit()
3147590Sgblack@eecs.umich.edu        StoreImm(mnem, False, False, False, size, sign, user).emit()
3157590Sgblack@eecs.umich.edu        StoreReg(mnem, False, False, False, size, sign, user).emit()
3167119SN/A
3177128Sgblack@eecs.umich.edu    def buildDoubleStores(mnem):
3187590Sgblack@eecs.umich.edu        StoreDoubleImm(mnem, True, True, True).emit()
3197590Sgblack@eecs.umich.edu        StoreDoubleReg(mnem, True, True, True).emit()
3207590Sgblack@eecs.umich.edu        StoreDoubleImm(mnem, True, False, True).emit()
3217590Sgblack@eecs.umich.edu        StoreDoubleReg(mnem, True, False, True).emit()
3227590Sgblack@eecs.umich.edu        StoreDoubleImm(mnem, False, True, True).emit()
3237590Sgblack@eecs.umich.edu        StoreDoubleReg(mnem, False, True, True).emit()
3247590Sgblack@eecs.umich.edu        StoreDoubleImm(mnem, False, False, True).emit()
3257590Sgblack@eecs.umich.edu        StoreDoubleReg(mnem, False, False, True).emit()
3267590Sgblack@eecs.umich.edu        StoreDoubleImm(mnem, False, True, False).emit()
3277590Sgblack@eecs.umich.edu        StoreDoubleReg(mnem, False, True, False).emit()
3287590Sgblack@eecs.umich.edu        StoreDoubleImm(mnem, False, False, False).emit()
3297590Sgblack@eecs.umich.edu        StoreDoubleReg(mnem, False, False, False).emit()
3307128Sgblack@eecs.umich.edu
3317313Sgblack@eecs.umich.edu    def buildSrsStores(mnem):
3327590Sgblack@eecs.umich.edu        SrsInst(mnem, True, True, True).emit()
3337590Sgblack@eecs.umich.edu        SrsInst(mnem, True, True, False).emit()
3347590Sgblack@eecs.umich.edu        SrsInst(mnem, True, False, True).emit()
3357590Sgblack@eecs.umich.edu        SrsInst(mnem, True, False, False).emit()
3367590Sgblack@eecs.umich.edu        SrsInst(mnem, False, True, True).emit()
3377590Sgblack@eecs.umich.edu        SrsInst(mnem, False, True, False).emit()
3387590Sgblack@eecs.umich.edu        SrsInst(mnem, False, False, True).emit()
3397590Sgblack@eecs.umich.edu        SrsInst(mnem, False, False, False).emit()
3407313Sgblack@eecs.umich.edu
3417120Sgblack@eecs.umich.edu    buildStores("str")
3427120Sgblack@eecs.umich.edu    buildStores("strt", user=True)
3437120Sgblack@eecs.umich.edu    buildStores("strb", size=1)
3447120Sgblack@eecs.umich.edu    buildStores("strbt", size=1, user=True)
3457120Sgblack@eecs.umich.edu    buildStores("strh", size=2)
3467120Sgblack@eecs.umich.edu    buildStores("strht", size=2, user=True)
3477128Sgblack@eecs.umich.edu
3487313Sgblack@eecs.umich.edu    buildSrsStores("srs")
3497313Sgblack@eecs.umich.edu
3507128Sgblack@eecs.umich.edu    buildDoubleStores("strd")
3517303Sgblack@eecs.umich.edu
3527590Sgblack@eecs.umich.edu    StoreImmEx("strex", False, True, False, size=4, flavor="exclusive").emit()
3537590Sgblack@eecs.umich.edu    StoreImmEx("strexh", False, True, False, size=2, flavor="exclusive").emit()
3547590Sgblack@eecs.umich.edu    StoreImmEx("strexb", False, True, False, size=1, flavor="exclusive").emit()
3557590Sgblack@eecs.umich.edu    StoreDoubleImmEx("strexd", False, True, False, flavor="exclusive").emit()
3567345Sgblack@eecs.umich.edu
3577590Sgblack@eecs.umich.edu    StoreImm("vstr", False, True, False, size=4, flavor="fp").emit()
3587590Sgblack@eecs.umich.edu    StoreImm("vstr", False, False, False, size=4, flavor="fp").emit()
3597590Sgblack@eecs.umich.edu    StoreDoubleImm("vstr", False, True, False, flavor="fp").emit()
3607590Sgblack@eecs.umich.edu    StoreDoubleImm("vstr", False, False, False, flavor="fp").emit()
3617119SN/A}};
362