* define cpu32bit for the JVM target (used by psystem to initialise

default integer types)
  * define CPUDEFINED in pp.pas if JVM is defined
  * initialise the fpu types and currency in psystem for the JVM target

  * set uinttype/sinttype to 32 bit types also for all cpu32bitaddr cpus
    by default (required for JVM, which has a 64 bit alu but 32 bit
    "addresses" -- an address takes up 1 stack slot, a 64 bit int two;
    also, array indices are limited to 32 bit)

git-svn-id: branches/jvmbackend@18296 -
This commit is contained in:
Jonas Maebe 2011-08-20 07:36:08 +00:00
parent a19220f106
commit dc8df7fe79
3 changed files with 13 additions and 0 deletions

View File

@ -153,6 +153,7 @@
{$endif mips}
{$ifdef jvm}
{$define cpu32bit}
{$define cpu64bitalu}
{$define cpu32bitaddr}
{$define cpuhighleveltarget}

View File

@ -135,6 +135,12 @@ program pp;
{$endif CPUDEFINED}
{$define CPUDEFINED}
{$endif AVR}
{$ifdef JVM}
{$ifdef CPUDEFINED}
{$fatal ONLY one of the switches for the CPU type must be defined}
{$endif CPUDEFINED}
{$define CPUDEFINED}
{$endif}
{$ifndef CPUDEFINED}
{$fatal A CPU type switch must be defined}
{$endif CPUDEFINED}

View File

@ -214,6 +214,10 @@ implementation
sc80floattype:=tfloatdef.create(sc80real);
s64currencytype:=torddef.create(scurrency,low(int64),high(int64));
{$endif avr}
{$ifdef jvm}
create_fpu_types;
s64currencytype:=torddef.create(scurrency,low(int64),high(int64));
{$endif POWERPC64}
{$ifdef cpu64bitaddr}
uinttype:=u64inttype;
sinttype:=s64inttype;
@ -221,6 +225,8 @@ implementation
ptrsinttype:=s64inttype;
{$endif cpu64bitaddr}
{$ifdef cpu32bitaddr}
uinttype:=u32inttype;
sinttype:=s32inttype;
ptruinttype:=u32inttype;
ptrsinttype:=s32inttype;
{$endif cpu32bitaddr}