remote_gdb.cc revision 14238
13536SN/A/* 211274Sshingarov@labware.com * Copyright 2015 LabWare 310595Sgabeblack@google.com * Copyright 2014 Google Inc. 414238Sciro.santilli@arm.com * Copyright (c) 2010, 2013, 2016, 2018-2019 ARM Limited 57752SWilliam.Wang@arm.com * All rights reserved 67752SWilliam.Wang@arm.com * 77752SWilliam.Wang@arm.com * The license below extends only to copyright in the software and shall 87752SWilliam.Wang@arm.com * not be construed as granting a license to any other intellectual 97752SWilliam.Wang@arm.com * property including but not limited to intellectual property relating 107752SWilliam.Wang@arm.com * to a hardware implementation of the functionality of the software 117752SWilliam.Wang@arm.com * licensed hereunder. You may use the software subject to the license 127752SWilliam.Wang@arm.com * terms below provided that you ensure that this notice is replicated 137752SWilliam.Wang@arm.com * unmodified and in its entirety in all distributions of the software, 147752SWilliam.Wang@arm.com * modified or unmodified, in source code or in binary form. 157752SWilliam.Wang@arm.com * 163536SN/A * Copyright (c) 2002-2005 The Regents of The University of Michigan 173536SN/A * All rights reserved. 183536SN/A * 193536SN/A * Redistribution and use in source and binary forms, with or without 203536SN/A * modification, are permitted provided that the following conditions are 213536SN/A * met: redistributions of source code must retain the above copyright 223536SN/A * notice, this list of conditions and the following disclaimer; 233536SN/A * redistributions in binary form must reproduce the above copyright 243536SN/A * notice, this list of conditions and the following disclaimer in the 253536SN/A * documentation and/or other materials provided with the distribution; 263536SN/A * neither the name of the copyright holders nor the names of its 273536SN/A * contributors may be used to endorse or promote products derived from 283536SN/A * this software without specific prior written permission. 293536SN/A * 303536SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 313536SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 323536SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 333536SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 343536SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 353536SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 363536SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 373536SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 383536SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 393536SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 403536SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 413536SN/A * 423536SN/A * Authors: Nathan Binkert 437752SWilliam.Wang@arm.com * William Wang 4411274Sshingarov@labware.com * Boris Shingarov 453536SN/A */ 463536SN/A 473536SN/A/* 488332Snate@binkert.org * Copyright (c) 1990, 1993 The Regents of the University of California 498332Snate@binkert.org * All rights reserved 503536SN/A * 513536SN/A * This software was developed by the Computer Systems Engineering group 523536SN/A * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 533536SN/A * contributed to Berkeley. 543536SN/A * 553536SN/A * All advertising materials mentioning features or use of this software 563536SN/A * must display the following acknowledgement: 575543SN/A * This product includes software developed by the University of 585543SN/A * California, Lawrence Berkeley Laboratories. 593536SN/A * 603536SN/A * Redistribution and use in source and binary forms, with or without 613536SN/A * modification, are permitted provided that the following conditions 623536SN/A * are met: 633536SN/A * 1. Redistributions of source code must retain the above copyright 643536SN/A * notice, this list of conditions and the following disclaimer. 653536SN/A * 2. Redistributions in binary form must reproduce the above copyright 663536SN/A * notice, this list of conditions and the following disclaimer in the 673536SN/A * documentation and/or other materials provided with the distribution. 683536SN/A * 3. All advertising materials mentioning features or use of this software 693536SN/A * must display the following acknowledgement: 705543SN/A * This product includes software developed by the University of 715543SN/A * California, Berkeley and its contributors. 723536SN/A * 4. Neither the name of the University nor the names of its contributors 733536SN/A * may be used to endorse or promote products derived from this software 743536SN/A * without specific prior written permission. 753536SN/A * 763536SN/A * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 773536SN/A * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 783536SN/A * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 793536SN/A * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 803536SN/A * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 813536SN/A * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 823536SN/A * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 833536SN/A * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 843536SN/A * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 853536SN/A * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 863536SN/A * SUCH DAMAGE. 873536SN/A * 885543SN/A * @(#)kgdb_stub.c 8.4 (Berkeley) 1/12/94 893536SN/A */ 903536SN/A 913536SN/A/*- 923536SN/A * Copyright (c) 2001 The NetBSD Foundation, Inc. 933536SN/A * All rights reserved. 943536SN/A * 953536SN/A * This code is derived from software contributed to The NetBSD Foundation 963536SN/A * by Jason R. Thorpe. 973536SN/A * 983536SN/A * Redistribution and use in source and binary forms, with or without 993536SN/A * modification, are permitted provided that the following conditions 1003536SN/A * are met: 1013536SN/A * 1. Redistributions of source code must retain the above copyright 1023536SN/A * notice, this list of conditions and the following disclaimer. 1033536SN/A * 2. Redistributions in binary form must reproduce the above copyright 1043536SN/A * notice, this list of conditions and the following disclaimer in the 1053536SN/A * documentation and/or other materials provided with the distribution. 1063536SN/A * 3. All advertising materials mentioning features or use of this software 1073536SN/A * must display the following acknowledgement: 1085543SN/A * This product includes software developed by the NetBSD 1095543SN/A * Foundation, Inc. and its contributors. 1103536SN/A * 4. Neither the name of The NetBSD Foundation nor the names of its 1113536SN/A * contributors may be used to endorse or promote products derived 1123536SN/A * from this software without specific prior written permission. 1133536SN/A * 1143536SN/A * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 1153536SN/A * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 1163536SN/A * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 1173536SN/A * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 1183536SN/A * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 1193536SN/A * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 1203536SN/A * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 1213536SN/A * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 1223536SN/A * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 1233536SN/A * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 1243536SN/A * POSSIBILITY OF SUCH DAMAGE. 1253536SN/A */ 1263536SN/A 1273536SN/A/* 1283536SN/A * $NetBSD: kgdb_stub.c,v 1.8 2001/07/07 22:58:00 wdk Exp $ 1293536SN/A * 1303536SN/A * Taken from NetBSD 1313536SN/A * 1323536SN/A * "Stub" to allow remote cpu to debug over a serial line using gdb. 1333536SN/A */ 1343536SN/A 13511793Sbrandon.potter@amd.com#include "arch/arm/remote_gdb.hh" 13611793Sbrandon.potter@amd.com 1373536SN/A#include <sys/signal.h> 1385569SN/A#include <unistd.h> 1393536SN/A 1403536SN/A#include <string> 1413536SN/A 1429020Sgblack@eecs.umich.edu#include "arch/arm/decoder.hh" 1438229Snate@binkert.org#include "arch/arm/pagetable.hh" 1448229Snate@binkert.org#include "arch/arm/registers.hh" 14510037SARM gem5 Developers#include "arch/arm/system.hh" 1467752SWilliam.Wang@arm.com#include "arch/arm/utility.hh" 1477752SWilliam.Wang@arm.com#include "arch/arm/vtophys.hh" 14810707SAndreas.Sandberg@ARM.com#include "base/chunk_generator.hh" 1493536SN/A#include "base/intmath.hh" 1503536SN/A#include "base/remote_gdb.hh" 1513536SN/A#include "base/socket.hh" 1523536SN/A#include "base/trace.hh" 15313579Sciro.santilli@arm.com#include "blobs/gdb_xml_aarch64_core.hh" 15413579Sciro.santilli@arm.com#include "blobs/gdb_xml_aarch64_fpu.hh" 15513579Sciro.santilli@arm.com#include "blobs/gdb_xml_aarch64_target.hh" 15613579Sciro.santilli@arm.com#include "blobs/gdb_xml_arm_core.hh" 15713579Sciro.santilli@arm.com#include "blobs/gdb_xml_arm_target.hh" 15813579Sciro.santilli@arm.com#include "blobs/gdb_xml_arm_vfpv3.hh" 1598229Snate@binkert.org#include "cpu/static_inst.hh" 1603536SN/A#include "cpu/thread_context.hh" 1617752SWilliam.Wang@arm.com#include "cpu/thread_state.hh" 1628232Snate@binkert.org#include "debug/GDBAcc.hh" 1638232Snate@binkert.org#include "debug/GDBMisc.hh" 1648229Snate@binkert.org#include "mem/page_table.hh" 1653536SN/A#include "mem/physical.hh" 1663536SN/A#include "mem/port.hh" 1678782Sgblack@eecs.umich.edu#include "sim/full_system.hh" 1683536SN/A#include "sim/system.hh" 1693536SN/A 1703536SN/Ausing namespace std; 1717752SWilliam.Wang@arm.comusing namespace ArmISA; 1723536SN/A 17312449Sgabeblack@google.comRemoteGDB::RemoteGDB(System *_system, ThreadContext *tc, int _port) 17412449Sgabeblack@google.com : BaseRemoteGDB(_system, tc, _port), regCache32(this), regCache64(this) 1753536SN/A{ 1763536SN/A} 1773536SN/A 1785569SN/A/* 1795569SN/A * Determine if the mapping at va..(va+len) is valid. 1805569SN/A */ 1813536SN/Abool 1823536SN/ARemoteGDB::acc(Addr va, size_t len) 1833536SN/A{ 1848782Sgblack@eecs.umich.edu if (FullSystem) { 18510707SAndreas.Sandberg@ARM.com for (ChunkGenerator gen(va, len, PageBytes); !gen.done(); gen.next()) { 18612449Sgabeblack@google.com if (!virtvalid(context(), gen.addr())) { 18710707SAndreas.Sandberg@ARM.com DPRINTF(GDBAcc, "acc: %#x mapping is invalid\n", va); 18810707SAndreas.Sandberg@ARM.com return false; 1898782Sgblack@eecs.umich.edu } 19010707SAndreas.Sandberg@ARM.com } 1918782Sgblack@eecs.umich.edu 1928782Sgblack@eecs.umich.edu DPRINTF(GDBAcc, "acc: %#x mapping is valid\n", va); 1938782Sgblack@eecs.umich.edu return true; 1948782Sgblack@eecs.umich.edu } else { 19512455Sgabeblack@google.com // Check to make sure the first byte is mapped into the processes 19612455Sgabeblack@google.com // address space. 19712455Sgabeblack@google.com return context()->getProcessPtr()->pTable->lookup(va) != nullptr; 1988782Sgblack@eecs.umich.edu } 1993536SN/A} 2003536SN/A 2013536SN/Avoid 20211274Sshingarov@labware.comRemoteGDB::AArch64GdbRegCache::getRegs(ThreadContext *context) 2033536SN/A{ 20411274Sshingarov@labware.com DPRINTF(GDBAcc, "getRegs in remotegdb \n"); 2057752SWilliam.Wang@arm.com 20611274Sshingarov@labware.com for (int i = 0; i < 31; ++i) 20711274Sshingarov@labware.com r.x[i] = context->readIntReg(INTREG_X0 + i); 20811274Sshingarov@labware.com r.spx = context->readIntReg(INTREG_SPX); 20911274Sshingarov@labware.com r.pc = context->pcState().pc(); 21011274Sshingarov@labware.com r.cpsr = context->readMiscRegNoEffect(MISCREG_CPSR); 2113536SN/A 21213471Sciro.santilli@arm.com size_t base = 0; 21313471Sciro.santilli@arm.com for (int i = 0; i < NumVecV8ArchRegs; i++) { 21413471Sciro.santilli@arm.com auto v = (context->readVecReg(RegId(VecRegClass, i))).as<VecElem>(); 21514238Sciro.santilli@arm.com for (size_t j = 0; j < NumVecElemPerNeonVecReg; j++) { 21613471Sciro.santilli@arm.com r.v[base] = v[j]; 21713471Sciro.santilli@arm.com base++; 21813471Sciro.santilli@arm.com } 2193536SN/A } 22013579Sciro.santilli@arm.com r.fpsr = context->readMiscRegNoEffect(MISCREG_FPSR); 22113579Sciro.santilli@arm.com r.fpcr = context->readMiscRegNoEffect(MISCREG_FPCR); 2223536SN/A} 2233536SN/A 2243536SN/Avoid 22511274Sshingarov@labware.comRemoteGDB::AArch64GdbRegCache::setRegs(ThreadContext *context) const 2263536SN/A{ 22711274Sshingarov@labware.com DPRINTF(GDBAcc, "setRegs in remotegdb \n"); 2287752SWilliam.Wang@arm.com 22911274Sshingarov@labware.com for (int i = 0; i < 31; ++i) 23011274Sshingarov@labware.com context->setIntReg(INTREG_X0 + i, r.x[i]); 23113469Sciro.santilli@arm.com auto pc_state = context->pcState(); 23213469Sciro.santilli@arm.com pc_state.set(r.pc); 23313469Sciro.santilli@arm.com context->pcState(pc_state); 23411274Sshingarov@labware.com context->setMiscRegNoEffect(MISCREG_CPSR, r.cpsr); 23511274Sshingarov@labware.com // Update the stack pointer. This should be done after 23611274Sshingarov@labware.com // updating CPSR/PSTATE since that might affect how SPX gets 23711274Sshingarov@labware.com // mapped. 23811274Sshingarov@labware.com context->setIntReg(INTREG_SPX, r.spx); 2397752SWilliam.Wang@arm.com 24013471Sciro.santilli@arm.com size_t base = 0; 24113471Sciro.santilli@arm.com for (int i = 0; i < NumVecV8ArchRegs; i++) { 24213471Sciro.santilli@arm.com auto v = (context->getWritableVecReg( 24313471Sciro.santilli@arm.com RegId(VecRegClass, i))).as<VecElem>(); 24414238Sciro.santilli@arm.com for (size_t j = 0; j < NumVecElemPerNeonVecReg; j++) { 24513471Sciro.santilli@arm.com v[j] = r.v[base]; 24613471Sciro.santilli@arm.com base++; 24713471Sciro.santilli@arm.com } 2483536SN/A } 24913579Sciro.santilli@arm.com context->setMiscRegNoEffect(MISCREG_FPSR, r.fpsr); 25013579Sciro.santilli@arm.com context->setMiscRegNoEffect(MISCREG_FPCR, r.fpcr); 2513536SN/A} 2523536SN/A 25311274Sshingarov@labware.comvoid 25411274Sshingarov@labware.comRemoteGDB::AArch32GdbRegCache::getRegs(ThreadContext *context) 2553536SN/A{ 25611274Sshingarov@labware.com DPRINTF(GDBAcc, "getRegs in remotegdb \n"); 25711274Sshingarov@labware.com 25811274Sshingarov@labware.com r.gpr[0] = context->readIntReg(INTREG_R0); 25911274Sshingarov@labware.com r.gpr[1] = context->readIntReg(INTREG_R1); 26011274Sshingarov@labware.com r.gpr[2] = context->readIntReg(INTREG_R2); 26111274Sshingarov@labware.com r.gpr[3] = context->readIntReg(INTREG_R3); 26211274Sshingarov@labware.com r.gpr[4] = context->readIntReg(INTREG_R4); 26311274Sshingarov@labware.com r.gpr[5] = context->readIntReg(INTREG_R5); 26411274Sshingarov@labware.com r.gpr[6] = context->readIntReg(INTREG_R6); 26511274Sshingarov@labware.com r.gpr[7] = context->readIntReg(INTREG_R7); 26611274Sshingarov@labware.com r.gpr[8] = context->readIntReg(INTREG_R8); 26711274Sshingarov@labware.com r.gpr[9] = context->readIntReg(INTREG_R9); 26811274Sshingarov@labware.com r.gpr[10] = context->readIntReg(INTREG_R10); 26911274Sshingarov@labware.com r.gpr[11] = context->readIntReg(INTREG_R11); 27011274Sshingarov@labware.com r.gpr[12] = context->readIntReg(INTREG_R12); 27111274Sshingarov@labware.com r.gpr[13] = context->readIntReg(INTREG_SP); 27211274Sshingarov@labware.com r.gpr[14] = context->readIntReg(INTREG_LR); 27311274Sshingarov@labware.com r.gpr[15] = context->pcState().pc(); 27413579Sciro.santilli@arm.com r.cpsr = context->readMiscRegNoEffect(MISCREG_CPSR); 27511274Sshingarov@labware.com 27611274Sshingarov@labware.com // One day somebody will implement transfer of FPRs correctly. 27713579Sciro.santilli@arm.com for (int i = 0; i < 32; i++) 27813579Sciro.santilli@arm.com r.fpr[i] = 0; 27911274Sshingarov@labware.com 28011274Sshingarov@labware.com r.fpscr = context->readMiscRegNoEffect(MISCREG_FPSCR); 2813536SN/A} 2823536SN/A 28311274Sshingarov@labware.comvoid 28411274Sshingarov@labware.comRemoteGDB::AArch32GdbRegCache::setRegs(ThreadContext *context) const 28511274Sshingarov@labware.com{ 28611274Sshingarov@labware.com DPRINTF(GDBAcc, "setRegs in remotegdb \n"); 28711274Sshingarov@labware.com 28811274Sshingarov@labware.com context->setIntReg(INTREG_R0, r.gpr[0]); 28911274Sshingarov@labware.com context->setIntReg(INTREG_R1, r.gpr[1]); 29011274Sshingarov@labware.com context->setIntReg(INTREG_R2, r.gpr[2]); 29111274Sshingarov@labware.com context->setIntReg(INTREG_R3, r.gpr[3]); 29211274Sshingarov@labware.com context->setIntReg(INTREG_R4, r.gpr[4]); 29311274Sshingarov@labware.com context->setIntReg(INTREG_R5, r.gpr[5]); 29411274Sshingarov@labware.com context->setIntReg(INTREG_R6, r.gpr[6]); 29511274Sshingarov@labware.com context->setIntReg(INTREG_R7, r.gpr[7]); 29611274Sshingarov@labware.com context->setIntReg(INTREG_R8, r.gpr[8]); 29711274Sshingarov@labware.com context->setIntReg(INTREG_R9, r.gpr[9]); 29811274Sshingarov@labware.com context->setIntReg(INTREG_R10, r.gpr[10]); 29911274Sshingarov@labware.com context->setIntReg(INTREG_R11, r.gpr[11]); 30011274Sshingarov@labware.com context->setIntReg(INTREG_R12, r.gpr[12]); 30111274Sshingarov@labware.com context->setIntReg(INTREG_SP, r.gpr[13]); 30211274Sshingarov@labware.com context->setIntReg(INTREG_LR, r.gpr[14]); 30313469Sciro.santilli@arm.com auto pc_state = context->pcState(); 30413469Sciro.santilli@arm.com pc_state.set(r.gpr[15]); 30513469Sciro.santilli@arm.com context->pcState(pc_state); 30611274Sshingarov@labware.com 30711274Sshingarov@labware.com // One day somebody will implement transfer of FPRs correctly. 30811274Sshingarov@labware.com 30911274Sshingarov@labware.com context->setMiscReg(MISCREG_FPSCR, r.fpscr); 31011274Sshingarov@labware.com context->setMiscRegNoEffect(MISCREG_CPSR, r.cpsr); 31111274Sshingarov@labware.com} 31211274Sshingarov@labware.com 31313579Sciro.santilli@arm.combool 31413579Sciro.santilli@arm.comRemoteGDB::getXferFeaturesRead(const std::string &annex, std::string &output) 31513579Sciro.santilli@arm.com{ 31613579Sciro.santilli@arm.com#define GDB_XML(x, s) \ 31713579Sciro.santilli@arm.com { x, std::string(reinterpret_cast<const char *>(Blobs::s), \ 31813579Sciro.santilli@arm.com Blobs::s ## _len) } 31913579Sciro.santilli@arm.com static const std::map<std::string, std::string> annexMap32{ 32013579Sciro.santilli@arm.com GDB_XML("target.xml", gdb_xml_arm_target), 32113579Sciro.santilli@arm.com GDB_XML("arm-core.xml", gdb_xml_arm_core), 32213579Sciro.santilli@arm.com GDB_XML("arm-vfpv3.xml", gdb_xml_arm_vfpv3), 32313579Sciro.santilli@arm.com }; 32413579Sciro.santilli@arm.com static const std::map<std::string, std::string> annexMap64{ 32513579Sciro.santilli@arm.com GDB_XML("target.xml", gdb_xml_aarch64_target), 32613579Sciro.santilli@arm.com GDB_XML("aarch64-core.xml", gdb_xml_aarch64_core), 32713579Sciro.santilli@arm.com GDB_XML("aarch64-fpu.xml", gdb_xml_aarch64_fpu), 32813579Sciro.santilli@arm.com }; 32913579Sciro.santilli@arm.com#undef GDB_XML 33013579Sciro.santilli@arm.com auto& annexMap = inAArch64(context()) ? annexMap64 : annexMap32; 33113579Sciro.santilli@arm.com auto it = annexMap.find(annex); 33213579Sciro.santilli@arm.com if (it == annexMap.end()) 33313579Sciro.santilli@arm.com return false; 33413579Sciro.santilli@arm.com output = it->second; 33513579Sciro.santilli@arm.com return true; 33613579Sciro.santilli@arm.com} 33713579Sciro.santilli@arm.com 33812449Sgabeblack@google.comBaseGdbRegCache* 33911274Sshingarov@labware.comRemoteGDB::gdbRegs() 34011274Sshingarov@labware.com{ 34112449Sgabeblack@google.com if (inAArch64(context())) 34212221Sshingarov@gmail.com return ®Cache64; 34312221Sshingarov@gmail.com else 34412031Sgabeblack@google.com return ®Cache32; 34511274Sshingarov@labware.com} 346