Skip to content
Snippets Groups Projects
Commit 0370f181 authored by whh8b's avatar whh8b
Browse files

Revert "Update Zipr SDK API so plugins can plop insns"

This reverts commit d781da1f2ca0b6deb1eb167704458324cf4c81b0.
parent 32cb3f65
No related merge requests found
......@@ -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
/***************************************************************************
* 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
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";
}
};
}
......@@ -48,7 +48,6 @@
// SDK internals
#include <range.h>
#include <zipr.h>
#include <memory_space.h>
#include <zipr_options.h>
#include <zipr_plugin.h>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment