str.isa revision 12219
17119SN/A// -*- mode:c++ -*-
27119SN/A
312219Snikos.nikoleris@arm.com// Copyright (c) 2010-2011,2017 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 {{
4110037SARM gem5 Developers    import math
427119SN/A
437119SN/A    header_output = ""
447119SN/A    decoder_output = ""
457119SN/A    exec_output = ""
467119SN/A
477590Sgblack@eecs.umich.edu    class StoreInst(LoadStoreInst):
487590Sgblack@eecs.umich.edu        execBase = 'Store'
497119SN/A
507590Sgblack@eecs.umich.edu        def __init__(self, mnem, post, add, writeback, size=4,
518069SMatt.Horsnell@arm.com                     sign=False, user=False, flavor="normal",
528069SMatt.Horsnell@arm.com                     instFlags = []):
537590Sgblack@eecs.umich.edu            super(StoreInst, self).__init__()
547590Sgblack@eecs.umich.edu
557590Sgblack@eecs.umich.edu            self.name = mnem
567590Sgblack@eecs.umich.edu            self.post = post
577590Sgblack@eecs.umich.edu            self.add = add
587590Sgblack@eecs.umich.edu            self.writeback = writeback
597590Sgblack@eecs.umich.edu            self.size = size
607590Sgblack@eecs.umich.edu            self.sign = sign
617590Sgblack@eecs.umich.edu            self.user = user
627590Sgblack@eecs.umich.edu            self.flavor = flavor
638069SMatt.Horsnell@arm.com            self.instFlags = instFlags
647590Sgblack@eecs.umich.edu            if self.add:
657590Sgblack@eecs.umich.edu                self.op = " +"
667590Sgblack@eecs.umich.edu            else:
677590Sgblack@eecs.umich.edu                self.op = " -"
687590Sgblack@eecs.umich.edu
697590Sgblack@eecs.umich.edu            self.memFlags = ["ArmISA::TLB::MustBeOne"]
707590Sgblack@eecs.umich.edu            self.codeBlobs = { "postacc_code" : "" }
717590Sgblack@eecs.umich.edu
727646Sgene.wu@arm.com        def emitHelper(self, base = 'Memory', wbDecl = None):
737590Sgblack@eecs.umich.edu
747590Sgblack@eecs.umich.edu            global header_output, decoder_output, exec_output
757590Sgblack@eecs.umich.edu
767590Sgblack@eecs.umich.edu            codeBlobs = self.codeBlobs
777590Sgblack@eecs.umich.edu            codeBlobs["predicate_test"] = pickPredicate(codeBlobs)
787590Sgblack@eecs.umich.edu            (newHeader,
797590Sgblack@eecs.umich.edu             newDecoder,
807590Sgblack@eecs.umich.edu             newExec) = self.fillTemplates(self.name, self.Name, codeBlobs,
8110037SARM gem5 Developers                                           self.memFlags, self.instFlags,
8210037SARM gem5 Developers                                           base, wbDecl, None, False,
8310037SARM gem5 Developers                                           self.size, self.sign)
847590Sgblack@eecs.umich.edu
857590Sgblack@eecs.umich.edu            header_output += newHeader
867590Sgblack@eecs.umich.edu            decoder_output += newDecoder
877590Sgblack@eecs.umich.edu            exec_output += newExec
887590Sgblack@eecs.umich.edu
897590Sgblack@eecs.umich.edu    class SrsInst(LoadStoreInst):
907590Sgblack@eecs.umich.edu        execBase = 'Store'
917590Sgblack@eecs.umich.edu        decConstBase = 'Srs'
927590Sgblack@eecs.umich.edu
937590Sgblack@eecs.umich.edu        def __init__(self, mnem, post, add, writeback):
947590Sgblack@eecs.umich.edu            super(SrsInst, self).__init__()
957590Sgblack@eecs.umich.edu            self.name = mnem
967590Sgblack@eecs.umich.edu            self.post = post
977590Sgblack@eecs.umich.edu            self.add = add
987590Sgblack@eecs.umich.edu            self.writeback = writeback
997590Sgblack@eecs.umich.edu
1007590Sgblack@eecs.umich.edu            self.Name = "SRS_" + storeImmClassName(post, add, writeback, 8)
1017590Sgblack@eecs.umich.edu
1027590Sgblack@eecs.umich.edu        def emit(self):
1037590Sgblack@eecs.umich.edu            offset = 0
1047590Sgblack@eecs.umich.edu            if self.post != self.add:
1057590Sgblack@eecs.umich.edu                offset += 4
1067590Sgblack@eecs.umich.edu            if not self.add:
1077590Sgblack@eecs.umich.edu                offset -= 8
1087590Sgblack@eecs.umich.edu
1097590Sgblack@eecs.umich.edu            eaCode = "EA = SpMode + %d;" % offset
1107590Sgblack@eecs.umich.edu
1117590Sgblack@eecs.umich.edu            wbDiff = -8
1127590Sgblack@eecs.umich.edu            if self.add:
1137590Sgblack@eecs.umich.edu                wbDiff = 8
1147590Sgblack@eecs.umich.edu            accCode = '''
1157590Sgblack@eecs.umich.edu            CPSR cpsr = Cpsr;
1168588Sgblack@eecs.umich.edu            Mem_ud = (uint64_t)cSwap(LR_uw, cpsr.e) |
1178588Sgblack@eecs.umich.edu                     ((uint64_t)cSwap(Spsr_uw, cpsr.e) << 32);
1187590Sgblack@eecs.umich.edu            '''
1197590Sgblack@eecs.umich.edu
1207590Sgblack@eecs.umich.edu            global header_output, decoder_output, exec_output
1217590Sgblack@eecs.umich.edu
1227590Sgblack@eecs.umich.edu            codeBlobs = { "ea_code": eaCode,
1237590Sgblack@eecs.umich.edu                          "memacc_code": accCode,
1247590Sgblack@eecs.umich.edu                          "postacc_code": "" }
1257590Sgblack@eecs.umich.edu            codeBlobs["predicate_test"] = pickPredicate(codeBlobs)
1267590Sgblack@eecs.umich.edu
1277746SAli.Saidi@ARM.com            wbDecl = None
1287746SAli.Saidi@ARM.com            if self.writeback:
1297746SAli.Saidi@ARM.com                wbDecl = '''MicroAddiUop(machInst,
1307746SAli.Saidi@ARM.com                              intRegInMode((OperatingMode)regMode, INTREG_SP),
1317746SAli.Saidi@ARM.com                              intRegInMode((OperatingMode)regMode, INTREG_SP),
1327746SAli.Saidi@ARM.com                              %d);''' % wbDiff
1337746SAli.Saidi@ARM.com
1347590Sgblack@eecs.umich.edu            (newHeader,
1357590Sgblack@eecs.umich.edu             newDecoder,
1367590Sgblack@eecs.umich.edu             newExec) = self.fillTemplates(self.name, self.Name, codeBlobs,
1377590Sgblack@eecs.umich.edu                 ["ArmISA::TLB::AlignWord", "ArmISA::TLB::MustBeOne"], [],
1387746SAli.Saidi@ARM.com                 'SrsOp', wbDecl)
1397590Sgblack@eecs.umich.edu
1407590Sgblack@eecs.umich.edu            header_output += newHeader
1417590Sgblack@eecs.umich.edu            decoder_output += newDecoder
1427590Sgblack@eecs.umich.edu            exec_output += newExec
1437590Sgblack@eecs.umich.edu
1447590Sgblack@eecs.umich.edu    class StoreImmInst(StoreInst):
1457590Sgblack@eecs.umich.edu        def __init__(self, *args, **kargs):
1467590Sgblack@eecs.umich.edu            super(StoreImmInst, self).__init__(*args, **kargs)
1477590Sgblack@eecs.umich.edu            self.offset = self.op + " imm"
1487590Sgblack@eecs.umich.edu
1497646Sgene.wu@arm.com            if self.add:
1507646Sgene.wu@arm.com                self.wbDecl = "MicroAddiUop(machInst, base, base, imm);"
1517646Sgene.wu@arm.com            else:
1527646Sgene.wu@arm.com                self.wbDecl = "MicroSubiUop(machInst, base, base, imm);"
1537646Sgene.wu@arm.com
1547590Sgblack@eecs.umich.edu    class StoreRegInst(StoreInst):
1557590Sgblack@eecs.umich.edu        def __init__(self, *args, **kargs):
1567590Sgblack@eecs.umich.edu            super(StoreRegInst, self).__init__(*args, **kargs)
1577590Sgblack@eecs.umich.edu            self.offset = self.op + " shift_rm_imm(Index, shiftAmt," + \
1588304SAli.Saidi@ARM.com                                    " shiftType, OptShiftRmCondCodesC)"
1597646Sgene.wu@arm.com            if self.add:
1607646Sgene.wu@arm.com                 self.wbDecl = '''
1617646Sgene.wu@arm.com                     MicroAddUop(machInst, base, base, index, shiftAmt, shiftType);
1627646Sgene.wu@arm.com                 '''
1637646Sgene.wu@arm.com            else:
1647646Sgene.wu@arm.com                 self.wbDecl = '''
1657646Sgene.wu@arm.com                     MicroSubUop(machInst, base, base, index, shiftAmt, shiftType);
1667646Sgene.wu@arm.com                 '''
1677590Sgblack@eecs.umich.edu
1687590Sgblack@eecs.umich.edu    class StoreSingle(StoreInst):
1697590Sgblack@eecs.umich.edu        def __init__(self, *args, **kargs):
1707590Sgblack@eecs.umich.edu            super(StoreSingle, self).__init__(*args, **kargs)
1717590Sgblack@eecs.umich.edu
1727590Sgblack@eecs.umich.edu            # Build the default class name
1737590Sgblack@eecs.umich.edu            self.Name = self.nameFunc(self.post, self.add, self.writeback,
1747590Sgblack@eecs.umich.edu                                      self.size, self.sign, self.user)
1757590Sgblack@eecs.umich.edu
1767590Sgblack@eecs.umich.edu            # Add memory request flags where necessary
17710037SARM gem5 Developers            self.memFlags.append("%d" % int(math.log(self.size, 2)))
1787590Sgblack@eecs.umich.edu            if self.user:
1797590Sgblack@eecs.umich.edu                self.memFlags.append("ArmISA::TLB::UserMode")
1807590Sgblack@eecs.umich.edu
1817590Sgblack@eecs.umich.edu            if self.flavor == "exclusive":
1827590Sgblack@eecs.umich.edu                self.memFlags.append("Request::LLSC")
1837590Sgblack@eecs.umich.edu            elif self.flavor != "fp":
1847590Sgblack@eecs.umich.edu                self.memFlags.append("ArmISA::TLB::AllowUnaligned")
1857590Sgblack@eecs.umich.edu
1867590Sgblack@eecs.umich.edu            # Disambiguate the class name for different flavors of stores
1877590Sgblack@eecs.umich.edu            if self.flavor != "normal":
1887590Sgblack@eecs.umich.edu                self.Name = "%s_%s" % (self.name.upper(), self.Name)
1897590Sgblack@eecs.umich.edu
1907590Sgblack@eecs.umich.edu        def emit(self):
1917590Sgblack@eecs.umich.edu            # Address computation
1927590Sgblack@eecs.umich.edu            eaCode = "EA = Base"
1937590Sgblack@eecs.umich.edu            if not self.post:
1947590Sgblack@eecs.umich.edu                eaCode += self.offset
1957590Sgblack@eecs.umich.edu            eaCode += ";"
1967644Sali.saidi@arm.com
1977644Sali.saidi@arm.com            if self.flavor == "fp":
1987644Sali.saidi@arm.com                eaCode += vfpEnabledCheckCode
1997644Sali.saidi@arm.com
2007590Sgblack@eecs.umich.edu            self.codeBlobs["ea_code"] = eaCode
2017590Sgblack@eecs.umich.edu
2027590Sgblack@eecs.umich.edu            # Code that actually handles the access
2037590Sgblack@eecs.umich.edu            if self.flavor == "fp":
2048588Sgblack@eecs.umich.edu                accCode = 'Mem%(suffix)s = cSwap(FpDest_uw, ((CPSR)Cpsr).e);'
2057590Sgblack@eecs.umich.edu            else:
2067590Sgblack@eecs.umich.edu                accCode = \
2077590Sgblack@eecs.umich.edu                    'Mem%(suffix)s = cSwap(Dest%(suffix)s, ((CPSR)Cpsr).e);'
2087590Sgblack@eecs.umich.edu            accCode = accCode % \
2097590Sgblack@eecs.umich.edu                { "suffix" : buildMemSuffix(self.sign, self.size) }
2107590Sgblack@eecs.umich.edu
2117590Sgblack@eecs.umich.edu            self.codeBlobs["memacc_code"] = accCode
2127590Sgblack@eecs.umich.edu
2137590Sgblack@eecs.umich.edu            # Push it out to the output files
2147590Sgblack@eecs.umich.edu            base = buildMemBase(self.basePrefix, self.post, self.writeback)
2157646Sgene.wu@arm.com            wbDecl = None
2167646Sgene.wu@arm.com            if self.writeback:
2177646Sgene.wu@arm.com                wbDecl = self.wbDecl
2187646Sgene.wu@arm.com            self.emitHelper(base, wbDecl)
2197590Sgblack@eecs.umich.edu
2207590Sgblack@eecs.umich.edu    def storeImmClassName(post, add, writeback, size=4, sign=False, user=False):
2217590Sgblack@eecs.umich.edu        return memClassName("STORE_IMM", post, add, writeback, size, sign, user)
2227590Sgblack@eecs.umich.edu
2237590Sgblack@eecs.umich.edu    class StoreImmEx(StoreImmInst, StoreSingle):
2247590Sgblack@eecs.umich.edu        execBase = 'StoreEx'
2257590Sgblack@eecs.umich.edu        decConstBase = 'StoreExImm'
2267590Sgblack@eecs.umich.edu        basePrefix = 'MemoryExImm'
2277590Sgblack@eecs.umich.edu        nameFunc = staticmethod(storeImmClassName)
2287590Sgblack@eecs.umich.edu
2297590Sgblack@eecs.umich.edu        def __init__(self, *args, **kargs):
2307590Sgblack@eecs.umich.edu            super(StoreImmEx, self).__init__(*args, **kargs)
23112219Snikos.nikoleris@arm.com            self.codeBlobs["postacc_code"] = \
23212219Snikos.nikoleris@arm.com                  "Result = !writeResult; SevMailbox = 1; LLSCLock = 0;"
2337590Sgblack@eecs.umich.edu
2347590Sgblack@eecs.umich.edu    class StoreImm(StoreImmInst, StoreSingle):
2357590Sgblack@eecs.umich.edu        decConstBase = 'LoadStoreImm'
2367590Sgblack@eecs.umich.edu        basePrefix = 'MemoryImm'
2377590Sgblack@eecs.umich.edu        nameFunc = staticmethod(storeImmClassName)
2387590Sgblack@eecs.umich.edu
2397590Sgblack@eecs.umich.edu    def storeRegClassName(post, add, writeback, size=4, sign=False, user=False):
2407590Sgblack@eecs.umich.edu        return memClassName("STORE_REG", post, add, writeback, size, sign, user)
2417590Sgblack@eecs.umich.edu
2427590Sgblack@eecs.umich.edu    class StoreReg(StoreRegInst, StoreSingle):
2437646Sgene.wu@arm.com        decConstBase = 'StoreReg'
2447590Sgblack@eecs.umich.edu        basePrefix = 'MemoryReg'
2457590Sgblack@eecs.umich.edu        nameFunc = staticmethod(storeRegClassName)
2467590Sgblack@eecs.umich.edu
2477590Sgblack@eecs.umich.edu    class StoreDouble(StoreInst):
2487590Sgblack@eecs.umich.edu        def __init__(self, *args, **kargs):
2497590Sgblack@eecs.umich.edu            super(StoreDouble, self).__init__(*args, **kargs)
2507590Sgblack@eecs.umich.edu
2517590Sgblack@eecs.umich.edu            # Build the default class name
2527590Sgblack@eecs.umich.edu            self.Name = self.nameFunc(self.post, self.add, self.writeback)
2537590Sgblack@eecs.umich.edu
2547590Sgblack@eecs.umich.edu            # Add memory request flags where necessary
2557590Sgblack@eecs.umich.edu            if self.flavor == "exclusive":
2567590Sgblack@eecs.umich.edu                self.memFlags.append("Request::LLSC")
2577593SAli.Saidi@arm.com                self.memFlags.append("ArmISA::TLB::AlignDoubleWord")
2587593SAli.Saidi@arm.com            else:
2597593SAli.Saidi@arm.com                self.memFlags.append("ArmISA::TLB::AlignWord")
2607590Sgblack@eecs.umich.edu
2617590Sgblack@eecs.umich.edu            # Disambiguate the class name for different flavors of stores
2627590Sgblack@eecs.umich.edu            if self.flavor != "normal":
2637590Sgblack@eecs.umich.edu                self.Name = "%s_%s" % (self.name.upper(), self.Name)
2647590Sgblack@eecs.umich.edu
2657590Sgblack@eecs.umich.edu        def emit(self):
2667590Sgblack@eecs.umich.edu            # Address computation code
2677590Sgblack@eecs.umich.edu            eaCode = "EA = Base"
2687590Sgblack@eecs.umich.edu            if not self.post:
2697590Sgblack@eecs.umich.edu                eaCode += self.offset
2707590Sgblack@eecs.umich.edu            eaCode += ";"
2717644Sali.saidi@arm.com
2727644Sali.saidi@arm.com            if self.flavor == "fp":
2737644Sali.saidi@arm.com                eaCode += vfpEnabledCheckCode
2747644Sali.saidi@arm.com
2757590Sgblack@eecs.umich.edu            self.codeBlobs["ea_code"] = eaCode
2767590Sgblack@eecs.umich.edu
2777590Sgblack@eecs.umich.edu            # Code that actually handles the access
2787590Sgblack@eecs.umich.edu            if self.flavor == "fp":
2797590Sgblack@eecs.umich.edu                accCode = '''
2808588Sgblack@eecs.umich.edu                uint64_t swappedMem  = (uint64_t)FpDest_uw |
2818588Sgblack@eecs.umich.edu                                       ((uint64_t)FpDest2_uw << 32);
2828588Sgblack@eecs.umich.edu                Mem_ud = cSwap(swappedMem, ((CPSR)Cpsr).e);
2837590Sgblack@eecs.umich.edu                '''
2847590Sgblack@eecs.umich.edu            else:
2857590Sgblack@eecs.umich.edu                accCode = '''
2867590Sgblack@eecs.umich.edu                CPSR cpsr = Cpsr;
2878588Sgblack@eecs.umich.edu                Mem_ud = (uint64_t)cSwap(Dest_uw, cpsr.e) |
2888588Sgblack@eecs.umich.edu                         ((uint64_t)cSwap(Dest2_uw, cpsr.e) << 32);
2897590Sgblack@eecs.umich.edu                '''
2907590Sgblack@eecs.umich.edu
2917590Sgblack@eecs.umich.edu            self.codeBlobs["memacc_code"] = accCode
2927590Sgblack@eecs.umich.edu
2937590Sgblack@eecs.umich.edu            # Push it out to the output files
2947590Sgblack@eecs.umich.edu            base = buildMemBase(self.basePrefix, self.post, self.writeback)
2957646Sgene.wu@arm.com            wbDecl = None
2967646Sgene.wu@arm.com            if self.writeback:
2977646Sgene.wu@arm.com                wbDecl = self.wbDecl
2987646Sgene.wu@arm.com            self.emitHelper(base, wbDecl)
2997119SN/A
3007128Sgblack@eecs.umich.edu    def storeDoubleImmClassName(post, add, writeback):
3017590Sgblack@eecs.umich.edu        return memClassName("STORE_IMMD", post, add, writeback, 4, False, False)
3027590Sgblack@eecs.umich.edu
3037590Sgblack@eecs.umich.edu    class StoreDoubleImmEx(StoreImmInst, StoreDouble):
3047590Sgblack@eecs.umich.edu        execBase = 'StoreEx'
3057590Sgblack@eecs.umich.edu        decConstBase = 'StoreExDImm'
3067590Sgblack@eecs.umich.edu        basePrefix = 'MemoryExDImm'
3077590Sgblack@eecs.umich.edu        nameFunc = staticmethod(storeDoubleImmClassName)
3087590Sgblack@eecs.umich.edu
3097590Sgblack@eecs.umich.edu        def __init__(self, *args, **kargs):
3107590Sgblack@eecs.umich.edu            super(StoreDoubleImmEx, self).__init__(*args, **kargs)
31112219Snikos.nikoleris@arm.com            self.codeBlobs["postacc_code"] = \
31212219Snikos.nikoleris@arm.com                  "Result = !writeResult; SevMailbox = 1; LLSCLock = 0;"
3137590Sgblack@eecs.umich.edu
3147590Sgblack@eecs.umich.edu    class StoreDoubleImm(StoreImmInst, StoreDouble):
3157590Sgblack@eecs.umich.edu        decConstBase = 'LoadStoreDImm'
3167590Sgblack@eecs.umich.edu        basePrefix = 'MemoryDImm'
3177590Sgblack@eecs.umich.edu        nameFunc = staticmethod(storeDoubleImmClassName)
3187128Sgblack@eecs.umich.edu
3197128Sgblack@eecs.umich.edu    def storeDoubleRegClassName(post, add, writeback):
3207590Sgblack@eecs.umich.edu        return memClassName("STORE_REGD", post, add, writeback, 4, False, False)
3217128Sgblack@eecs.umich.edu
3227590Sgblack@eecs.umich.edu    class StoreDoubleReg(StoreRegInst, StoreDouble):
3237646Sgene.wu@arm.com        decConstBase = 'StoreDReg'
3247590Sgblack@eecs.umich.edu        basePrefix = 'MemoryDReg'
3257590Sgblack@eecs.umich.edu        nameFunc = staticmethod(storeDoubleRegClassName)
3267128Sgblack@eecs.umich.edu
3277120Sgblack@eecs.umich.edu    def buildStores(mnem, size=4, sign=False, user=False):
3287590Sgblack@eecs.umich.edu        StoreImm(mnem, True, True, True, size, sign, user).emit()
3297590Sgblack@eecs.umich.edu        StoreReg(mnem, True, True, True, size, sign, user).emit()
3307590Sgblack@eecs.umich.edu        StoreImm(mnem, True, False, True, size, sign, user).emit()
3317590Sgblack@eecs.umich.edu        StoreReg(mnem, True, False, True, size, sign, user).emit()
3327590Sgblack@eecs.umich.edu        StoreImm(mnem, False, True, True, size, sign, user).emit()
3337590Sgblack@eecs.umich.edu        StoreReg(mnem, False, True, True, size, sign, user).emit()
3347590Sgblack@eecs.umich.edu        StoreImm(mnem, False, False, True, size, sign, user).emit()
3357590Sgblack@eecs.umich.edu        StoreReg(mnem, False, False, True, size, sign, user).emit()
3367590Sgblack@eecs.umich.edu        StoreImm(mnem, False, True, False, size, sign, user).emit()
3377590Sgblack@eecs.umich.edu        StoreReg(mnem, False, True, False, size, sign, user).emit()
3387590Sgblack@eecs.umich.edu        StoreImm(mnem, False, False, False, size, sign, user).emit()
3397590Sgblack@eecs.umich.edu        StoreReg(mnem, False, False, False, size, sign, user).emit()
3407119SN/A
3417128Sgblack@eecs.umich.edu    def buildDoubleStores(mnem):
3427590Sgblack@eecs.umich.edu        StoreDoubleImm(mnem, True, True, True).emit()
3437590Sgblack@eecs.umich.edu        StoreDoubleReg(mnem, True, True, True).emit()
3447590Sgblack@eecs.umich.edu        StoreDoubleImm(mnem, True, False, True).emit()
3457590Sgblack@eecs.umich.edu        StoreDoubleReg(mnem, True, False, True).emit()
3467590Sgblack@eecs.umich.edu        StoreDoubleImm(mnem, False, True, True).emit()
3477590Sgblack@eecs.umich.edu        StoreDoubleReg(mnem, False, True, True).emit()
3487590Sgblack@eecs.umich.edu        StoreDoubleImm(mnem, False, False, True).emit()
3497590Sgblack@eecs.umich.edu        StoreDoubleReg(mnem, False, False, True).emit()
3507590Sgblack@eecs.umich.edu        StoreDoubleImm(mnem, False, True, False).emit()
3517590Sgblack@eecs.umich.edu        StoreDoubleReg(mnem, False, True, False).emit()
3527590Sgblack@eecs.umich.edu        StoreDoubleImm(mnem, False, False, False).emit()
3537590Sgblack@eecs.umich.edu        StoreDoubleReg(mnem, False, False, False).emit()
3547128Sgblack@eecs.umich.edu
3557313Sgblack@eecs.umich.edu    def buildSrsStores(mnem):
3567590Sgblack@eecs.umich.edu        SrsInst(mnem, True, True, True).emit()
3577590Sgblack@eecs.umich.edu        SrsInst(mnem, True, True, False).emit()
3587590Sgblack@eecs.umich.edu        SrsInst(mnem, True, False, True).emit()
3597590Sgblack@eecs.umich.edu        SrsInst(mnem, True, False, False).emit()
3607590Sgblack@eecs.umich.edu        SrsInst(mnem, False, True, True).emit()
3617590Sgblack@eecs.umich.edu        SrsInst(mnem, False, True, False).emit()
3627590Sgblack@eecs.umich.edu        SrsInst(mnem, False, False, True).emit()
3637590Sgblack@eecs.umich.edu        SrsInst(mnem, False, False, False).emit()
3647313Sgblack@eecs.umich.edu
3657120Sgblack@eecs.umich.edu    buildStores("str")
3667120Sgblack@eecs.umich.edu    buildStores("strt", user=True)
3677120Sgblack@eecs.umich.edu    buildStores("strb", size=1)
3687120Sgblack@eecs.umich.edu    buildStores("strbt", size=1, user=True)
3697120Sgblack@eecs.umich.edu    buildStores("strh", size=2)
3707120Sgblack@eecs.umich.edu    buildStores("strht", size=2, user=True)
3717128Sgblack@eecs.umich.edu
3727313Sgblack@eecs.umich.edu    buildSrsStores("srs")
3737313Sgblack@eecs.umich.edu
3747128Sgblack@eecs.umich.edu    buildDoubleStores("strd")
3757303Sgblack@eecs.umich.edu
3768136SAli.Saidi@ARM.com    StoreImmEx("strex", False, True, False, size=4, flavor="exclusive",
3778136SAli.Saidi@ARM.com               instFlags = ['IsStoreConditional']).emit()
3788136SAli.Saidi@ARM.com    StoreImmEx("strexh", False, True, False, size=2, flavor="exclusive",
3798136SAli.Saidi@ARM.com               instFlags = ['IsStoreConditional']).emit()
3808136SAli.Saidi@ARM.com    StoreImmEx("strexb", False, True, False, size=1, flavor="exclusive",
3818136SAli.Saidi@ARM.com               instFlags = ['IsStoreConditional']).emit()
3828136SAli.Saidi@ARM.com    StoreDoubleImmEx("strexd", False, True, False, flavor="exclusive",
3838136SAli.Saidi@ARM.com               instFlags = ['IsStoreConditional']).emit()
3847345Sgblack@eecs.umich.edu
3857590Sgblack@eecs.umich.edu    StoreImm("vstr", False, True, False, size=4, flavor="fp").emit()
3867590Sgblack@eecs.umich.edu    StoreImm("vstr", False, False, False, size=4, flavor="fp").emit()
3877590Sgblack@eecs.umich.edu    StoreDoubleImm("vstr", False, True, False, flavor="fp").emit()
3887590Sgblack@eecs.umich.edu    StoreDoubleImm("vstr", False, False, False, flavor="fp").emit()
3897119SN/A}};
390