summaryrefslogtreecommitdiff
path: root/compiler/cgutils.pas
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2011-08-20 07:37:26 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2011-08-20 07:37:26 +0000
commit2ef6340c77dce1d2d18c288a8da87392550701cd (patch)
tree464ed6ae0249f8800c929e9a78c0138f4e807419 /compiler/cgutils.pas
parent05c6f669000b2f2215b598d5bbf8a233ff1d5428 (diff)
downloadfpc-2ef6340c77dce1d2d18c288a8da87392550701cd.tar.gz
+ first (partial) implementation of thlcg for the jvm
+ added arrayreftype field to treference for the jvm, because array loads have to be performed using special instructions, so this information has to be passed on to the code generator. This information will have to be added in t(cg)vecnode. * moved concatenating the generated code for a procedure to the al_procedures list to thlcg.record_generated_code_for_procdef(), which is overridden by jvm/hlcgcpu to attach that code to the procdef it belongs with. The reason is that a Java class file can only contain code for one class, so we have to write out the assembler grouped per class instead of in the order the routines appear in the source code * also committed forgotten changes in psub after moving the register allocator initialisation to hlcgobj git-svn-id: http://svn.freepascal.org/svn/fpc/branches/jvmbackend@18308 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/cgutils.pas')
-rw-r--r--compiler/cgutils.pas9
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/cgutils.pas b/compiler/cgutils.pas
index 5426f7b3c6..5b4c50c22c 100644
--- a/compiler/cgutils.pas
+++ b/compiler/cgutils.pas
@@ -33,6 +33,9 @@ unit cgutils;
cpubase,cgbase;
type
+{$ifdef jvm}
+ tarrayreftype = (art_none,art_indexreg,art_indexref);
+{$endif jvm}
{ reference record, reordered for best alignment }
preference = ^treference;
treference = record
@@ -61,6 +64,12 @@ unit cgutils;
{ (An)+ and -(An) }
direction : tdirection;
{$endif m68k}
+{$ifdef jvm}
+ arrayreftype: tarrayreftype;
+ indexbase: tregister;
+ indexsymbol: tasmsymbol;
+ indexoffset: aint;
+{$endif jvm}
alignment : byte;
end;