Addes some stub functions for writing of variables to the stack (code to generate it)
This commit is contained in:
parent
6c1dac5f2a
commit
bef0bced14
|
@ -283,9 +283,17 @@ public final class DCodeEmitter : CodeEmitter
|
|||
/* Recursively descend soon */
|
||||
|
||||
|
||||
/* Find the variable being assigned to */
|
||||
|
||||
/* TODO: */
|
||||
// ulong variableStackOffset =
|
||||
|
||||
/* Calculate the offset to be written to */
|
||||
ulong variableStackOffset = getVariableOffset(varAssInstr.varName);
|
||||
|
||||
/* Find the variable being assigned to (TODO) */
|
||||
// Variable variable =
|
||||
|
||||
/* Calculate the amount to be written to said offset (TODO) */
|
||||
ulong writeSize = 0;
|
||||
|
||||
// writeln("int "~varDecInstr.varName~";");
|
||||
|
||||
|
@ -302,6 +310,26 @@ public final class DCodeEmitter : CodeEmitter
|
|||
closeModule();
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the given `data` of `size` to the addresses of
|
||||
* %rbp-|rbpOffsetMagnitude| at a stride of size
|
||||
*/
|
||||
private void writeStackVar(ulong rbpOffsetMagnitutde, ubyte size, ulong data)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Same as `writeStackVar` but does muiltiple writes given a base address
|
||||
*
|
||||
* This is just to neaten up code (see this as a helper function as that is
|
||||
* all that it really is)
|
||||
*/
|
||||
private void writeStackVarMulti(ulong rbOffsetMagBase, ubyte[] sizes, ulong[] datas)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void emitIninitailModule()
|
||||
{
|
||||
/* TODO: Maybe emit as d name */
|
||||
|
|
Loading…
Reference in New Issue