diff options
-rw-r--r-- | packages/cacao/cacao_0.99.2.bb | 11 | ||||
-rw-r--r-- | packages/cacao/files/cacao-codegen-arm1.patch | 49 | ||||
-rw-r--r-- | packages/cacao/files/cacao-codegen-arm2.patch | 66 |
3 files changed, 118 insertions, 8 deletions
diff --git a/packages/cacao/cacao_0.99.2.bb b/packages/cacao/cacao_0.99.2.bb index 57ee1027a9..e9a80781bc 100644 --- a/packages/cacao/cacao_0.99.2.bb +++ b/packages/cacao/cacao_0.99.2.bb @@ -1,13 +1,8 @@ require cacao.inc -PR = "r0" +PR = "r1" SRC_URI = "http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-${PV}/cacao-${PV}.tar.bz2;md5sum=912e353a26c88ba5f5f59ebb9f688e2f \ + file://cacao-codegen-arm1.patch;patch=1 \ + file://cacao-codegen-arm2.patch;patch=1 \ " - -# Quirks for Nokia N800: -# - with mfloat-abi=softfp the runtime fails to run anything -# - without --enable-softfloat it cannot find files within Jars -TARGET_CC_ARCH_nokia800 = "-march=armv6j -mtune=arm1136jf-s -mfpu=vfp -mfloat-abi=soft" - -EXTRA_OECONF_append_nokia800 = "--enable-softfloat" diff --git a/packages/cacao/files/cacao-codegen-arm1.patch b/packages/cacao/files/cacao-codegen-arm1.patch new file mode 100644 index 0000000000..b4d9db8eb1 --- /dev/null +++ b/packages/cacao/files/cacao-codegen-arm1.patch @@ -0,0 +1,49 @@ + +# HG changeset patch +# User Christian Thalinger <twisti@complang.tuwien.ac.at> +# Date 1221466650 -7200 +# Node ID d88bf99453b644bd2cc5c0dc5f8038f3151d897a +# Parent b567fffd0ff7b8330b172a3f12325c731bee67bb +* src/vm/jit/arm/codegen.h [__VFP_FP__] (M_CVTFI, M_CVTDI): Use signed +conversion functions. + +--- a/src/vm/jit/arm/codegen.h Sat Sep 13 15:00:00 2008 +0200 ++++ b/src/vm/jit/arm/codegen.h Mon Sep 15 10:17:30 2008 +0200 +@@ -643,6 +643,7 @@ + #if !defined(ENABLE_SOFTFLOAT) + + #if defined(__VFP_FP__) ++ + #define M_FADD(a,b,d) M_CPDP(UNCOND,0,1,1,0,10,0,0,0,d,a,b)/* d = a + b */ + #define M_FSUB(a,b,d) M_CPDP(UNCOND,0,1,1,1,10,0,0,0,d,a,b)/* d = a - b */ + #define M_FMUL(a,b,d) M_CPDP(UNCOND,0,1,0,0,10,0,0,0,d,a,b)/* d = a * b */ +@@ -664,8 +665,8 @@ + #define M_CVTFD(a,d) M_CPDP(UNCOND,1,1,1,1,10,0,1,0,d,0x7,a) + #define M_CVTIF(a,d) M_CPDP(UNCOND,1,1,1,1,10,0,1,0,d,0x8,a) + #define M_CVTID(a,d) M_CPDP(UNCOND,1,1,1,1,11,0,1,0,d,0x8,a) +-#define M_CVTFI(a,d) M_CPDP(UNCOND,1,1,1,1,10,0,1,0,d,0xc,a) +-#define M_CVTDI(a,d) M_CPDP(UNCOND,1,1,1,1,11,0,1,0,d,0xc,a) ++#define M_CVTFI(a,d) M_CPDP(UNCOND,1,1,1,1,10,0,1,0,d,0xd,a) // ftosis ++#define M_CVTDI(a,d) M_CPDP(UNCOND,1,1,1,1,11,0,1,0,d,0xd,a) // ftosid + + #define M_FMSTAT M_CPRT(UNCOND,0x07,1,10,0,0x1,0xf) + +@@ -675,7 +676,9 @@ + #define M_FMRDL(Fa,b) M_CPRT(UNCOND,0x00,1,11,0,Fa,b) + #define M_FMDHR(a,Fb) M_CPRT(UNCOND,0x01,0,11,0,Fb,a) + #define M_FMRDH(Fa,b) M_CPRT(UNCOND,0x01,1,11,0,Fa,b) ++ + #else ++ + #define M_FADD(a,b,d) M_CPDOS(UNCOND,0x00,0,d,a,b) /* d = a + b */ + #define M_FSUB(a,b,d) M_CPDOS(UNCOND,0x02,0,d,a,b) /* d = a - b */ + #define M_FMUL(a,b,d) M_CPDOS(UNCOND,0x01,0,d,a,b) /* d = a * b */ +@@ -701,6 +704,7 @@ + #define M_CVTID(a,d) M_CPRTD(UNCOND,0,a,d,0) /* d = (float) a */ + #define M_CVTFI(a,d) M_CPRTI(UNCOND,1,d,0,a) /* d = (int) a */ + #define M_CVTDI(a,d) M_CPRTI(UNCOND,1,d,0,a) /* d = (int) a */ ++ + #endif + + + diff --git a/packages/cacao/files/cacao-codegen-arm2.patch b/packages/cacao/files/cacao-codegen-arm2.patch new file mode 100644 index 0000000000..710f284345 --- /dev/null +++ b/packages/cacao/files/cacao-codegen-arm2.patch @@ -0,0 +1,66 @@ + +# HG changeset patch +# User Christian Thalinger <twisti@complang.tuwien.ac.at> +# Date 1221467463 -7200 +# Node ID a67fe1cb2b81b7cbfc9d824f17b440e50c7697ef +# Parent d88bf99453b644bd2cc5c0dc5f8038f3151d897a +* src/vm/jit/arm/codegen.c (codegen_emit) [__VFP_FP__]: Implemented +I2F, I2D, F2I, and D2I correctly. + +--- a/src/vm/jit/arm/codegen.c Mon Sep 15 10:17:30 2008 +0200 ++++ b/src/vm/jit/arm/codegen.c Mon Sep 15 10:31:03 2008 +0200 +@@ -1013,7 +1013,12 @@ + + s1 = emit_load_s1(jd, iptr, REG_ITMP1); + d = codegen_reg_of_dst(jd, iptr, REG_FTMP1); ++#if defined(__VFP_FP__) ++ M_FMSR(s1, d); ++ M_CVTIF(d, d); ++#else + M_CVTIF(s1, d); ++#endif + emit_store_dst(jd, iptr, d); + break; + +@@ -1021,7 +1026,12 @@ + + s1 = emit_load_s1(jd, iptr, REG_ITMP1); + d = codegen_reg_of_dst(jd, iptr, REG_FTMP1); ++#if defined(__VFP_FP__) ++ M_FMSR(s1, d); ++ M_CVTID(d, d); ++#else + M_CVTID(s1, d); ++#endif + emit_store_dst(jd, iptr, d); + break; + +@@ -1029,9 +1039,12 @@ + + s1 = emit_load_s1(jd, iptr, REG_FTMP1); + d = codegen_reg_of_dst(jd, iptr, REG_ITMP1); ++#if defined(__VFP_FP__) ++ M_CVTFI(s1, REG_FTMP2); ++ M_FMRS(REG_FTMP2, d); ++#else + /* this uses round towards zero, as Java likes it */ + M_CVTFI(s1, d); +-#if !defined(__VFP_FP__) + /* this checks for NaN; to return zero as Java likes it */ + M_FCMP(s1, 0x8); + M_MOVVS_IMM(0, d); +@@ -1043,9 +1056,12 @@ + + s1 = emit_load_s1(jd, iptr, REG_FTMP1); + d = codegen_reg_of_dst(jd, iptr, REG_ITMP1); ++#if defined(__VFP_FP__) ++ M_CVTDI(s1, REG_FTMP2); ++ M_FMRS(REG_FTMP2, d); ++#else + /* this uses round towards zero, as Java likes it */ + M_CVTDI(s1, d); +-#if !defined(__VFP_FP__) + /* this checks for NaN; to return zero as Java likes it */ + M_DCMP(s1, 0x8); + M_MOVVS_IMM(0, d); + |