* src/vm/jit/intrp/intrp.h (ffi.h): Removed, not required in this
authortwisti <none@none>
Fri, 20 Jan 2006 13:40:25 +0000 (13:40 +0000)
committertwisti <none@none>
Fri, 20 Jan 2006 13:40:25 +0000 (13:40 +0000)
file.
* src/vm/jit/intrp/codegen.c (nativecall): Removed unused big-endian
code.
* src/vm/jit/intrp/asmpart.c (asm_calljavafunction_intern): Renamed to
intrp_asm_calljavafunction_intern, just to be sure.

src/vm/jit/intrp/asmpart.c
src/vm/jit/intrp/codegen.c
src/vm/jit/intrp/intrp.h

index 612b3124764fd6f19bbd8349b5eef7c72e3db1d1..59a35fa18a17ee2e0fd8d6fe39eed7840aef46ee 100644 (file)
@@ -29,7 +29,7 @@
 
    Changes:
 
-   $Id: asmpart.c 4164 2006-01-12 21:38:11Z twisti $
+   $Id: asmpart.c 4329 2006-01-20 13:40:25Z twisti $
 
 */
 
@@ -53,8 +53,9 @@
 
 /* true on success, false on exception */
 
-static bool asm_calljavafunction_intern(methodinfo *m, void *arg1, void *arg2,
-                                                                               void *arg3, void *arg4)
+static bool intrp_asm_calljavafunction_intern(methodinfo *m,
+                                                                                         void *arg1, void *arg2,
+                                                                                         void *arg3, void *arg4)
 {
        java_objectheader *retval;
        Cell *sp = global_sp;
@@ -99,7 +100,7 @@ java_objectheader *intrp_asm_calljavafunction(methodinfo *m,
                                                                                          void *arg1, void *arg2,
                                                                                          void *arg3, void *arg4)
 {
-       if (asm_calljavafunction_intern(m, arg1, arg2, arg3, arg4)) {
+       if (intrp_asm_calljavafunction_intern(m, arg1, arg2, arg3, arg4)) {
                if (m->parseddesc->returntype.type == TYPE_ADR)
                        return (java_objectheader *)(*global_sp++);
                else {
@@ -116,7 +117,7 @@ s4 intrp_asm_calljavafunction_int(methodinfo *m, void *arg1, void *arg2,
 {
        assert(m->parseddesc->returntype.type == TYPE_INT);
 
-       if (asm_calljavafunction_intern(m, arg1, arg2, arg3, arg4))
+       if (intrp_asm_calljavafunction_intern(m, arg1, arg2, arg3, arg4))
                return (s4) (*global_sp++);
        else
                return 0;
index 772b439bbf465afe8b7d8be2ecaec1a2d77433ae..c482b5a96859df830c4d6a5a5840821ab370c292 100644 (file)
@@ -30,7 +30,7 @@
    Changes: Christian Thalinger
             Anton Ertl
 
-   $Id: codegen.c 4307 2006-01-19 20:56:03Z twisti $
+   $Id: codegen.c 4329 2006-01-20 13:40:25Z twisti $
 
 */
 
@@ -1841,6 +1841,29 @@ u1 *intrp_createcompilerstub(methodinfo *m)
 }
 
 
+#if defined(WITH_FFI)
+static ffi_type *cacaotype2ffitype(s4 cacaotype)
+{
+       switch (cacaotype) {
+       case TYPE_INT:
+               return &ffi_type_slong;
+       case TYPE_LNG:
+               return &ffi_type_sint64;
+       case TYPE_FLT:
+               return &ffi_type_float;
+       case TYPE_DBL:
+               return &ffi_type_double;
+       case TYPE_ADR:
+               return &ffi_type_pointer;
+       case TYPE_VOID:
+               return &ffi_type_void;
+       default:
+               assert(false);
+       }
+}
+#endif
+
+
 /* native stub:
 +---------+
 |NATIVECALL|
@@ -1940,29 +1963,6 @@ u1 *intrp_createnativestub(functionptr f, methodinfo *m, codegendata *cd,
 }
 
 
-#if defined(WITH_FFI)
-ffi_type *cacaotype2ffitype(s4 cacaotype)
-{
-       switch (cacaotype) {
-       case TYPE_INT:
-               return &ffi_type_slong;
-       case TYPE_LNG:
-               return &ffi_type_sint64;
-       case TYPE_FLT:
-               return &ffi_type_float;
-       case TYPE_DBL:
-               return &ffi_type_double;
-       case TYPE_ADR:
-               return &ffi_type_pointer;
-       case TYPE_VOID:
-               return &ffi_type_void;
-       default:
-               assert(false);
-       }
-}
-#endif
-
-
 /* call jni function */
 Cell *nativecall(functionptr f, methodinfo *m, Cell *sp, Inst *ra, Cell *fp, u1 *addrcif)
 {
@@ -1991,11 +1991,7 @@ Cell *nativecall(functionptr f, methodinfo *m, Cell *sp, Inst *ra, Cell *fp, u1
                break;
        case TYPE_FLT:
                endsp = sp - 1 + md->paramslots;
-#if WORDS_BIGENDIAN == 1 && SIZEOF_VOID_P == 8 && 0
-               av_start_float(alist, f, ((float *) endsp) + 1);
-#else
                av_start_float(alist, f, endsp);
-#endif
                break;
        case TYPE_DBL:
                endsp = sp - 2 + md->paramslots;
@@ -2030,11 +2026,7 @@ Cell *nativecall(functionptr f, methodinfo *m, Cell *sp, Inst *ra, Cell *fp, u1
                        break;
                case TYPE_FLT:
                        p -= 1;
-#if WORDS_BIGENDIAN == 1 && SIZEOF_VOID_P == 8 && 0
-                       av_float(alist, *(((float *) p) + 1));
-#else
                        av_float(alist, *((float *) p));
-#endif
                        break;
                case TYPE_DBL:
                        p -= 2;
@@ -2087,9 +2079,8 @@ Cell *nativecall(functionptr f, methodinfo *m, Cell *sp, Inst *ra, Cell *fp, u1
 
        /* for static methods, pass class pointer */
 
-       if (m->flags & ACC_STATIC) {
+       if (m->flags & ACC_STATIC)
                *pvalues++ = &m->class;
-       }
 
        /* pass parameter to native function */
 
@@ -2099,12 +2090,7 @@ Cell *nativecall(functionptr f, methodinfo *m, Cell *sp, Inst *ra, Cell *fp, u1
                else
                        p--;
 
-#if WORDS_BIGENDIAN == 1 && SIZEOF_VOID_P == 8 && 0
-               if (md->paramtypes[i].type == TYPE_FLT)
-                       *pvalues++ = (void *)(((float *)p)+1);
-               else
-#endif
-                       *pvalues++ = p;
+               *pvalues++ = p;
        }
 
        /* calculate position of return value */
@@ -2121,12 +2107,7 @@ Cell *nativecall(functionptr f, methodinfo *m, Cell *sp, Inst *ra, Cell *fp, u1
        codegen_start_native_call((u1 *) (&s + sizeof(s)), m->entrypoint,
                                                          (u1 *) fp, (u1 *) ra);
 
-#if WORDS_BIGENDIAN == 1 && SIZEOF_VOID_P == 8 && 0
-       if (md->returntype.type == TYPE_FLT)
-               ffi_call(pcif, FFI_FN(f), ((float *) endsp) + 1, values);
-       else
-#endif
-               ffi_call(pcif, FFI_FN(f), endsp, values);
+       ffi_call(pcif, FFI_FN(f), endsp, values);
 
        codegen_finish_native_call((u1 *) (&s + sizeof(s)));
 
index b7062b8369ff3976196968e18e4f1179222be37c..50d55038b39279c004ae7fbd1c93f0d08d4e6519 100644 (file)
@@ -29,7 +29,7 @@
 
    Changes:
 
-   $Id: intrp.h 4184 2006-01-12 23:21:11Z twisti $
+   $Id: intrp.h 4329 2006-01-20 13:40:25Z twisti $
 
 */
 
 #include "vm/references.h"
 #include "vm/resolve.h"
 
-#if defined(WITH_FFI)
-# include <ffi.h>
-#endif
-
 
 typedef void *Label;
 typedef void *Inst;
@@ -218,10 +214,6 @@ Inst *vm_disassemble_inst(Inst *ip, Inst vm_prim[]);
 
 java_objectheader *engine(Inst *ip0, Cell * sp, Cell * fp);
 
-#if defined(WITH_FFI)
-ffi_type *cacaotype2ffitype(s4 cacaotype);
-#endif
-
 
 /* print types for disassembler and tracer */
 void printarg_ui      (u4                 ui      );