|
|
@@ -1,4 +1,4 @@
|
|
|
-#pragma once
|
|
|
+#pragma once
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
@@ -765,8 +765,8 @@ namespace Framework
|
|
|
FPDataType type,
|
|
|
FPRegisterPart part = Y);
|
|
|
/**
|
|
|
- * subtracts the value of the target register from the value of the
|
|
|
- * source register and stores the result in the target register.
|
|
|
+ * subtracts the value of the source register from the value of the
|
|
|
+ * target register and stores the result in the target register.
|
|
|
* single operation.
|
|
|
*
|
|
|
* \param target the target register
|
|
|
@@ -776,6 +776,26 @@ namespace Framework
|
|
|
DLLEXPORT void addSubtraction(GPRegister target,
|
|
|
GPRegister source,
|
|
|
GPRegisterPart part = FULL64);
|
|
|
+ /**
|
|
|
+ * subtracts the given value from the target register and stores the
|
|
|
+ * result in the target register. single operation.
|
|
|
+ *
|
|
|
+ * \param target the target register
|
|
|
+ * \param value the value to subtract
|
|
|
+ * \param part the register part
|
|
|
+ */
|
|
|
+ DLLEXPORT void addSubtraction(
|
|
|
+ GPRegister target, char value, GPRegisterPart part = LOWER8);
|
|
|
+ /**
|
|
|
+ * subtracts the given value from the target register and stores the
|
|
|
+ * result in the target register. single operation.
|
|
|
+ *
|
|
|
+ * \param target the target register
|
|
|
+ * \param value the value to subtract
|
|
|
+ * \param part the register part
|
|
|
+ */
|
|
|
+ DLLEXPORT void addSubtraction(
|
|
|
+ GPRegister target, int value, GPRegisterPart part = LOWER32);
|
|
|
/**
|
|
|
* subtracts the value of the target register from the value of the
|
|
|
* source register and stores the result in the target register.
|
|
|
@@ -925,35 +945,35 @@ namespace Framework
|
|
|
GPRegister source,
|
|
|
GPRegisterPart part = FULL64);
|
|
|
/**
|
|
|
- * writes the specified valueAddress pointer into a register.
|
|
|
+ * writes the value at the specified valueAddress pointer into a
|
|
|
+ * register.
|
|
|
*
|
|
|
- * \param valueAddress the pointer to the value witch address should
|
|
|
- * be stored
|
|
|
- * \param target the register where the address should be stored
|
|
|
+ * \param valueAddress the pointer to the value
|
|
|
+ * \param target the register where the value should be stored
|
|
|
*/
|
|
|
DLLEXPORT void addLoadValue(char* valueAddress, GPRegister target);
|
|
|
/**
|
|
|
- * writes the specified valueAddress pointer into a register.
|
|
|
+ * writes the value at the specified valueAddress pointer into a
|
|
|
+ * register.
|
|
|
*
|
|
|
- * \param valueAddress the pointer to the value witch address should
|
|
|
- * be stored
|
|
|
- * \param target the register where the address should be stored
|
|
|
+ * \param valueAddress the pointer to the value
|
|
|
+ * \param target the register where the value should be stored
|
|
|
*/
|
|
|
DLLEXPORT void addLoadValue(short* valueAddress, GPRegister target);
|
|
|
/**
|
|
|
- * writes the specified valueAddress pointer into a register.
|
|
|
+ * writes the value at the specified valueAddress pointer into a
|
|
|
+ * register.
|
|
|
*
|
|
|
- * \param valueAddress the pointer to the value witch address should
|
|
|
- * be stored
|
|
|
- * \param target the register where the address should be stored
|
|
|
+ * \param valueAddress the pointer to the value
|
|
|
+ * \param target the register where the value should be stored
|
|
|
*/
|
|
|
DLLEXPORT void addLoadValue(int* valueAddress, GPRegister target);
|
|
|
/**
|
|
|
- * writes the specified valueAddress pointer into a register.
|
|
|
+ * writes the value at the specified valueAddress pointer into a
|
|
|
+ * register.
|
|
|
*
|
|
|
- * \param valueAddress the pointer to the value witch address should
|
|
|
- * be stored
|
|
|
- * \param target the register where the address should be stored
|
|
|
+ * \param valueAddress the pointer to the value
|
|
|
+ * \param target the register where the value should be stored
|
|
|
*/
|
|
|
DLLEXPORT void addLoadValue(
|
|
|
__int64* valueAddress, GPRegister target);
|
|
|
@@ -990,13 +1010,13 @@ namespace Framework
|
|
|
double* valueAddress, FPRegister target, GPRegister temp = RAX);
|
|
|
|
|
|
/**
|
|
|
- * calls a function at a specified memory address.
|
|
|
+ * loads a memory address into a register. Single operation.
|
|
|
*
|
|
|
- * \param functionAddress pointet to the address of the function to
|
|
|
- * call
|
|
|
+ * \param addr the address to load
|
|
|
+ * \param target the register where the address should be stored
|
|
|
*/
|
|
|
template<typename T>
|
|
|
- DLLEXPORT void addLoadAddress(T* addr, GPRegister temp = RAX)
|
|
|
+ DLLEXPORT void addLoadAddress(T* addr, GPRegister target = RAX)
|
|
|
{
|
|
|
instructions.add(new Instruction(MOV,
|
|
|
{new GPRegisterArgument(temp),
|