From 0370f181e4487b4d7e664d775f822fd5b8708d87 Mon Sep 17 00:00:00 2001 From: whh8b <whh8b@git.zephyr-software.com> Date: Fri, 21 Aug 2015 03:08:08 +0000 Subject: [PATCH] Revert "Update Zipr SDK API so plugins can plop insns" This reverts commit d781da1f2ca0b6deb1eb167704458324cf4c81b0. --- .gitattributes | 1 - include/zipr.h | 69 ------------------------------------------- include/zipr_plugin.h | 22 ++------------ include/zipr_sdk.h | 1 - 4 files changed, 2 insertions(+), 91 deletions(-) delete mode 100644 include/zipr.h diff --git a/.gitattributes b/.gitattributes index 14ce7d7..bfd0c26 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,7 +3,6 @@ /SDK_VERSION -text include/memory_space.h -text include/range.h -text -include/zipr.h -text include/zipr_options.h -text include/zipr_plugin.h -text include/zipr_sdk.h -text diff --git a/include/zipr.h b/include/zipr.h deleted file mode 100644 index c8a7e86..0000000 --- a/include/zipr.h +++ /dev/null @@ -1,69 +0,0 @@ -/*************************************************************************** - * Copyright (c) 2014 Zephyr Software LLC. All rights reserved. - * - * This software is furnished under a license and/or other restrictive - * terms and may be used and copied only in accordance with such terms - * and the inclusion of the above copyright notice. This software or - * any other copies thereof may not be provided or otherwise made - * available to any other person without the express written consent - * of an authorized representative of Zephyr Software LCC. Title to, - * ownership of, and all rights in the software is retained by - * Zephyr Software LCC. - * - * Zephyr Software LLC. Proprietary Information - * - * Unless otherwise specified, the information contained in this - * directory, following this legend, and/or referenced herein is - * Zephyr Software LLC. (Zephyr) Proprietary Information. - * - * CONTACT - * - * For technical assistance, contact Zephyr Software LCC. at: - * - * - * Zephyr Software, LLC - * 2040 Tremont Rd - * Charlottesville, VA 22911 - * - * E-mail: jwd@zephyr-software.com - **************************************************************************/ - -#ifndef zipr_h -#define zipr_h - -class Zipr_t -{ - public: - Zipr_t() {}; - - protected: - /* - * Private, but listing them here so that SDK users - * can get a sense of the overall flow of the rewriter. - */ - virtual void FindFreeRanges(const std::string &name) = 0; - virtual void AddPinnedInstructions() = 0; - virtual void ReservePinnedInstructions() = 0; - virtual void PreReserve2ByteJumpTargets() = 0; - virtual void ExpandPinnedInstructions() = 0; - virtual void Fix2BytePinnedInstructions() = 0; - virtual void OptimizePinnedInstructions() = 0; - virtual void OptimizePinnedFallthroughs() = 0; - virtual void AskPluginsAboutPlopping() = 0; - virtual void PlopTheUnpinnedInstructions() = 0; - virtual void UpdateCallbacks() = 0; - virtual void PrintStats() = 0; - virtual void RecordPinnedInsnAddrs() = 0; - - public: - /* - * These are public functions that the SDK user - * way want to use. - */ - virtual int DetermineWorstCaseInsnSize(libIRDB::Instruction_t*) = 0; - virtual Zipr_SDK::RangeAddress_t PlopInstruction(libIRDB::Instruction_t* insn, Zipr_SDK::RangeAddress_t addr) = 0; - virtual Zipr_SDK::RangeAddress_t PlopWithTarget(libIRDB::Instruction_t* insn, Zipr_SDK::RangeAddress_t at) = 0; - virtual Zipr_SDK::RangeAddress_t PlopWithCallback(libIRDB::Instruction_t* insn, Zipr_SDK::RangeAddress_t at) = 0; -}; - -#endif diff --git a/include/zipr_plugin.h b/include/zipr_plugin.h index 1cc84b0..534c7ab 100644 --- a/include/zipr_plugin.h +++ b/include/zipr_plugin.h @@ -1,6 +1,8 @@ + namespace Zipr_SDK { + typedef std::map<libIRDB::Instruction_t*,Zipr_SDK::RangeAddress_t> InstructionLocationMap_t; class ZiprPluginInterface_t @@ -13,26 +15,6 @@ class ZiprPluginInterface_t virtual void CallbackLinkingBegin()=0; virtual void CallbackLinkingEnd()=0; - virtual bool WillPluginPlop(libIRDB::Instruction_t*) - { - return false; - } - virtual int WorstCaseInsnSize(libIRDB::Instruction_t*, Zipr_t *) - { - return 0; - } - virtual RangeAddress_t PlopInstruction(libIRDB::Instruction_t*, - RangeAddress_t, - RangeAddress_t &, - Zipr_t *) - { - return 0; - } - - virtual std::string ToString() - { - return "NamelessPlugin"; - } }; } diff --git a/include/zipr_sdk.h b/include/zipr_sdk.h index e9ca4ca..13944cf 100644 --- a/include/zipr_sdk.h +++ b/include/zipr_sdk.h @@ -48,7 +48,6 @@ // SDK internals #include <range.h> -#include <zipr.h> #include <memory_space.h> #include <zipr_options.h> #include <zipr_plugin.h> -- GitLab