abstract methods in AbstractAssembler
thomas.wuerthinger at oracle.com
Fri Feb 8 15:25:19 PST 2013
Thanks for pointing out the missing abstractions. The assembler is currently only abstracted for general-purpose processors and is not suitable for generating GPU code.
From the methods below, we can immediately remove "bangStack(int)", it should not be in the platform-independent part.
The other methods are currently used when emitting code for LIR blocks. So, in what way do you want to use the LIR? Will there be no control flow in the LIR and all instructions be in one LIR block?
Also, do you want to reuse Buffer object in the assembler base class? Or do you need your own data structure for emitting the assembly code?
On Feb 7, 2013, at 7:30 PM, Christian Thalinger <christian.thalinger at oracle.com> wrote:
> Currently I'm adding other architectures to Graal. In order to ease that task I have a tool which generates the Assembler from an ISA description file.
> Now I have problems with these methods in AbstractAssembler:
> public abstract void align(int modulus);
> public abstract void jmp(Label l);
> protected abstract void patchJumpTarget(int branch, int jumpTarget);
> public abstract void bangStack(int disp);
> Two problems actually:
> 1) I could generate these methods but they are not part of an ISA; I'd like to keep it abstracted and not add anything that doesn't belong into an assembler.
> 2) Not all architectures require what the methods above try to do. This means that LabelOp, JumpOp, Label.patchInstruction and Backend.emitStackOverflowCheck need to be either moved somewhere else or need more abstraction.
> Any ideas?
> -- Chris
More information about the graal-dev