[gem5-dev] Change in gem5/gem5[develop]: arch-x86: Use the new op bases for memory microops.
Gabe Black has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/42346 ) Change subject: arch-x86: Use the new op bases for memory microops. .. arch-x86: Use the new op bases for memory microops. Change-Id: I73538b547093e6f872e085686ea164ef89527321 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42346 Reviewed-by: Gabe Black Maintainer: Gabe Black Tested-by: kokoro --- M src/arch/x86/SConscript D src/arch/x86/insts/microldstop.cc M src/arch/x86/insts/microldstop.hh M src/arch/x86/insts/microop_args.hh M src/arch/x86/isa/insts/general_purpose/cache_and_memory_management.py M src/arch/x86/isa/microops/ldstop.isa M src/arch/x86/isa/operands.isa 7 files changed, 327 insertions(+), 298 deletions(-) Approvals: Gabe Black: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/src/arch/x86/SConscript b/src/arch/x86/SConscript index 9b16fad..b0f908b 100644 --- a/src/arch/x86/SConscript +++ b/src/arch/x86/SConscript @@ -51,7 +51,6 @@ Source('fs_workload.cc') Source('insts/badmicroop.cc') Source('insts/microfpop.cc') -Source('insts/microldstop.cc') Source('insts/micromediaop.cc') Source('insts/microop.cc') Source('insts/microregop.cc') diff --git a/src/arch/x86/insts/microldstop.cc b/src/arch/x86/insts/microldstop.cc deleted file mode 100644 index 1debacc..000 --- a/src/arch/x86/insts/microldstop.cc +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2007 The Hewlett-Packard Development Company - * Copyright (c) 2015 Advanced Micro Devices, Inc. - * All rights reserved. - * - * The license below extends only to copyright in the software and shall - * not be construed as granting a license to any other intellectual - * property including but not limited to intellectual property relating - * to a hardware implementation of the functionality of the software - * licensed hereunder. You may use the software subject to the license - * terms below provided that you ensure that this notice is replicated - * unmodified and in its entirety in all distributions of the software, - * modified or unmodified, in source code or in binary form. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer; - * redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution; - * neither the name of the copyright holders nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "arch/x86/insts/microldstop.hh" - -#include - -namespace X86ISA -{ - -std::string -LdStOp::generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const -{ -std::stringstream response; - -printMnemonic(response, instMnem, mnemonic); -if (flags[IsLoad]) -printDestReg(response, 0, dataSize); -else -printSrcReg(response, 2, dataSize); -response << ", "; -printMem(response, segment, scale, index, base, disp, addressSize, false); -return response.str(); -} - -std::string -LdStSplitOp::generateDisassembly( -Addr pc, const Loader::SymbolTable *symtab) const -{ -std::stringstream response; - -printMnemonic(response, instMnem, mnemonic); -int baseRegIdx = flags[IsLoad] ? 0 : 2; -response << "["; -printDestReg(response, baseRegIdx, dataSize); -response << ", "; -printDestReg(response, baseRegIdx+1, dataSize); -response << "], "; -printMem(response, segment, scale, index, base, disp, addressSize, false); -return response.str(); -} - -} diff --git a/src/arch/x86/insts/microldstop.hh b/src/arch/x86/insts/microldstop.hh index 2611095..1272cb0 100644 --- a/src/arch/x86/insts/microldstop.hh +++ b/src/arch/x86/insts/microld
[gem5-dev] Change in gem5/gem5[develop]: arch-x86: Use the new op bases for memory microops.
Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/42346 ) Change subject: arch-x86: Use the new op bases for memory microops. .. arch-x86: Use the new op bases for memory microops. Change-Id: I73538b547093e6f872e085686ea164ef89527321 --- M src/arch/x86/SConscript D src/arch/x86/insts/microldstop.cc M src/arch/x86/insts/microldstop.hh M src/arch/x86/insts/microop_args.hh M src/arch/x86/isa/microops/ldstop.isa M src/arch/x86/isa/operands.isa 6 files changed, 248 insertions(+), 249 deletions(-) diff --git a/src/arch/x86/SConscript b/src/arch/x86/SConscript index f790ec1..af53022 100644 --- a/src/arch/x86/SConscript +++ b/src/arch/x86/SConscript @@ -51,7 +51,6 @@ Source('fs_workload.cc') Source('insts/badmicroop.cc') Source('insts/microfpop.cc') -Source('insts/microldstop.cc') Source('insts/micromediaop.cc') Source('insts/microop.cc') Source('insts/microregop.cc') diff --git a/src/arch/x86/insts/microldstop.cc b/src/arch/x86/insts/microldstop.cc deleted file mode 100644 index 1debacc..000 --- a/src/arch/x86/insts/microldstop.cc +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2007 The Hewlett-Packard Development Company - * Copyright (c) 2015 Advanced Micro Devices, Inc. - * All rights reserved. - * - * The license below extends only to copyright in the software and shall - * not be construed as granting a license to any other intellectual - * property including but not limited to intellectual property relating - * to a hardware implementation of the functionality of the software - * licensed hereunder. You may use the software subject to the license - * terms below provided that you ensure that this notice is replicated - * unmodified and in its entirety in all distributions of the software, - * modified or unmodified, in source code or in binary form. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer; - * redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution; - * neither the name of the copyright holders nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "arch/x86/insts/microldstop.hh" - -#include - -namespace X86ISA -{ - -std::string -LdStOp::generateDisassembly(Addr pc, const Loader::SymbolTable *symtab) const -{ -std::stringstream response; - -printMnemonic(response, instMnem, mnemonic); -if (flags[IsLoad]) -printDestReg(response, 0, dataSize); -else -printSrcReg(response, 2, dataSize); -response << ", "; -printMem(response, segment, scale, index, base, disp, addressSize, false); -return response.str(); -} - -std::string -LdStSplitOp::generateDisassembly( -Addr pc, const Loader::SymbolTable *symtab) const -{ -std::stringstream response; - -printMnemonic(response, instMnem, mnemonic); -int baseRegIdx = flags[IsLoad] ? 0 : 2; -response << "["; -printDestReg(response, baseRegIdx, dataSize); -response << ", "; -printDestReg(response, baseRegIdx+1, dataSize); -response << "], "; -printMem(response, segment, scale, index, base, disp, addressSize, false); -return response.str(); -} - -} diff --git a/src/arch/x86/insts/microldstop.hh b/src/arch/x86/insts/microldstop.hh index 2611095..f17b52f 100644 --- a/src/arch/x86/insts/microldstop.hh +++ b/src/arch/x86/insts/microldstop.hh @@ -40,6 +40,7 @@ #define __ARCH_X86_INSTS_MICROLDSTOP_HH__ #include "arch/x86/insts/microop.hh" +#include "arch/x86/insts/microop_args.hh" #include "arch/x86/ldstflags.hh" #include "mem/packet.hh" #include "mem/request.hh" @@ -54,65 +55,62 @@ class MemOp : public X86MicroopBase { protecte