Skip to content
Snippets Groups Projects
Commit 7e44c673 authored by Jason Hiser's avatar Jason Hiser :tractor:
Browse files

minor tweaks in formattinng.

parent de097c4b
No related branches found
No related tags found
No related merge requests found
File moved
......@@ -12,33 +12,33 @@ namespace Zipr_SDK
public:
// range operatations
virtual void splitFreeRange(RangeAddress_t addr)=0;
virtual void splitFreeRange(Range_t range)=0;
virtual void mergeFreeRange(RangeAddress_t addr)=0;
virtual void mergeFreeRange(Range_t range)=0;
virtual void splitFreeRange(RangeAddress_t addr) = 0;
virtual void splitFreeRange(Range_t range) = 0;
virtual void mergeFreeRange(RangeAddress_t addr) = 0;
virtual void mergeFreeRange(Range_t range) = 0;
virtual RangeSet_t::iterator
findFreeRange(RangeAddress_t addr)=0;
virtual Range_t getFreeRange(int size)=0;
virtual Range_t getInfiniteFreeRange()=0;
virtual list<Range_t> getFreeRanges(size_t size = 0) = 0;
findFreeRange(RangeAddress_t addr) = 0;
virtual Range_t getFreeRange(int size) = 0;
virtual Range_t getInfiniteFreeRange() = 0;
virtual list<Range_t> getFreeRanges(size_t size = 0) = 0;
virtual RangeSetBounds_t
getNearbyFreeRanges(const RangeAddress_t hint, size_t count = 0) = 0;
virtual void addFreeRange(Range_t newRange)=0;
virtual void removeFreeRange(Range_t newRange)=0;
virtual Range_t getLargeRange(void)=0;
virtual void addFreeRange(Range_t newRange) = 0;
virtual void removeFreeRange(Range_t newRange) = 0;
virtual Range_t getLargeRange(void) = 0;
// queries about free areas.
virtual bool areBytesFree(RangeAddress_t addr, int num_bytes)=0;
virtual bool isByteFree(RangeAddress_t addr)=0;
virtual bool isValidRange(RangeSet_t::iterator it)=0;
virtual int getRangeCount()=0;
virtual void printMemorySpace(ostream &out)=0;
virtual bool isByteFree(RangeAddress_t addr) = 0;
virtual bool isValidRange(RangeSet_t::iterator it) = 0;
virtual int getRangeCount() = 0;
virtual void printMemorySpace(ostream &out) = 0;
virtual void plopBytes(RangeAddress_t addr, const char the_byte[], int num)=0;
virtual void plopByte(RangeAddress_t addr, char the_byte)=0;
virtual void plopJump(RangeAddress_t addr)=0;
virtual RangeAddress_t getMinPlopped() const =0;
virtual RangeAddress_t getMaxPlopped() const =0;
virtual void plopJump(RangeAddress_t addr) = 0;
virtual RangeAddress_t getMinPlopped() const = 0;
virtual RangeAddress_t getMaxPlopped() const = 0;
};
......
......@@ -15,39 +15,22 @@ namespace Zipr_SDK
class ZiprPluginInterface_t
{
public:
virtual void doPinningBegin()
{
}
virtual void doPinningEnd()
{
}
virtual void doDollopBegin()
{
}
virtual void doDollopEnd()
{
}
virtual void doCallbackLinkingBegin()
{
}
virtual void doCallbackLinkingEnd()
{
}
virtual void doPinningBegin() { }
virtual void doPinningEnd() { }
virtual void doDollopBegin() { }
virtual void doDollopEnd() { }
virtual void doCallbackLinkingBegin() { }
virtual void doCallbackLinkingEnd() { }
virtual ZiprPreference addressDollop(const Dollop_t *dollop, const RangeAddress_t &source, Range_t &place, bool &coalesce, bool &fallthrough_ok)
{
return None;
}
virtual bool willPluginPlop(Instruction_t*)
{
return false;
}
virtual size_t getInsnSize(Instruction_t*, bool)
{
return 0;
}
{ return None; }
virtual bool willPluginPlop(Instruction_t*)
{ return false; }
virtual size_t getInsnSize(Instruction_t*, bool)
{ return 0; }
/*
* DollopEntryOpeningSize()
* DollopEntryClosingSize()
......@@ -57,14 +40,8 @@ namespace Zipr_SDK
* should return the size of that padding in
* these functions.
*/
virtual size_t getDollopEntryOpeningSize(DollopEntry_t*)
{
return 0;
}
virtual size_t getDollopEntryClosingSize(DollopEntry_t*)
{
return 0;
}
virtual size_t getDollopEntryOpeningSize(DollopEntry_t*) { return 0; }
virtual size_t getDollopEntryClosingSize(DollopEntry_t*) { return 0; }
/*
* PlopDollopEntry()
......@@ -102,35 +79,26 @@ namespace Zipr_SDK
RangeAddress_t &instruction_address,
RangeAddress_t &target_address,
size_t instruction_size,
bool &placed_instruction)
{
return 0;
}
virtual string toString()
{
return "NamelessPlugin";
}
bool &placed_instruction)
{ return 0; }
virtual string toString()
{ return "NamelessPlugin"; }
virtual ZiprOptionsNamespace_t *registerOptions(ZiprOptionsNamespace_t *)
{
return new ZiprOptionsNamespace_t("");
}
{ return new ZiprOptionsNamespace_t(""); }
virtual ZiprPreference retargetPin(const RangeAddress_t &, const Dollop_t *, RangeAddress_t &)
{
return None;
}
{ return None; }
virtual ZiprPreference retargetCallback(const RangeAddress_t &, const DollopEntry_t *, RangeAddress_t &)
{
return None;
}
{ return None; }
virtual RangeAddress_t doPlaceScoopsBegin(const RangeAddress_t max_addr)
{
return max_addr;
}
{ return max_addr; }
virtual RangeAddress_t doPlaceScoopsEnd(const RangeAddress_t max_addr)
{
return max_addr;
}
{ return max_addr; }
};
......
/***************************************************************************
* 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_SDK_H
#define ZIPR_SDK_H
// std:: includes.
#include <stdint.h>
#include <set>
// IRDB includes
#include <irdb-core>
......@@ -55,8 +21,9 @@
#include <private-include/zipr_plugin.h>
#include <private-include/zipr.h>
extern "C"
Zipr_SDK::ZiprPluginInterface_t* GetPluginInterface(Zipr_SDK::Zipr_t* zipr_main_object);
//
// You must build a shared library that implements this method:
//
// extern "C" Zipr_SDK::ZiprPluginInterface_t* getPluginInterface(Zipr_SDK::Zipr_t* p_zipr_main_object);
#endif
Index: include/memory_space.h
===================================================================
--- include/memory_space.h (revision 21014)
+++ include/memory_space.h (working copy)
@@ -46,6 +46,7 @@
virtual void SplitFreeRange(RangeAddress_t addr)=0;
virtual void SplitFreeRange(Range_t range)=0;
virtual void MergeFreeRange(RangeAddress_t addr)=0;
+ virtual void MergeFreeRange(Range_t range)=0;
virtual RangeSet_t::iterator FindFreeRange(RangeAddress_t addr)=0;
virtual Range_t GetFreeRange(int size)=0;
virtual std::list<Range_t> GetFreeRanges(size_t size = 0) = 0;
Index: include/zipr_constants.h
===================================================================
--- include/zipr_constants.h (revision 0)
+++ include/zipr_constants.h (working copy)
@@ -0,0 +1,42 @@
+/***************************************************************************
+ * 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_CONSTANTS_H
+#define ZIPR_CONSTANTS_H
+
+namespace Zipr_SDK {
+ enum {
+ DEFAULT_TRAMPOLINE_SIZE=5
+ };
+};
+
+#endif
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