LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Cvs-checkins > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: cvs at opencores.org<cvs@o...>
    Date: Sun Nov 5 00:28:01 CET 2006
    Subject: [cvs-checkins] MODIFIED: jop ...
    Top
    Date: 00/06/11 05:00:28

    Modified: jop/asm/src jvm.asm jvm_call.inc jvm_long.inc
    Log:
    Moved mtab pointer and array length from the object/array to the handle


    Revision Changes Path
    1.35 jop/asm/src/jvm.asm

    http://www.opencores.org/cvsweb.shtml/jop/asm/src/jvm.asm.diff?r1=1.34&r2=1.35

    (In the diff below, changes in quantity of whitespace are not shown.)

    Index: jvm.asm
    ===================================================================
    RCS file: /cvsroot/martin/jop/asm/src/jvm.asm,v
    retrieving revision 1.34
    retrieving revision 1.35
    diff -u -b -r1.34 -r1.35
    --- jvm.asm 15 Jun 2006 17:59:02 -0000 1.34
    +++ jvm.asm 4 Nov 2006 23:28:01 -0000 1.35
    @@ -79,17 +79,18 @@
    // 2006-01-22 add type info for newarray (for long)
    // 2006-01-23 use offset instead of cp index for get/putfield
    // 2006-06-15 enhanced memory/cache interface (less cycles)
    +// 2006-11-04 move mtab pointer and array length to the handle
    +// little optimization in array load/store
    //
    // idiv, irem WRONG when one operand is 0x80000000
    // but is now in JVM.java

    -#define HANDLE 1
    //
    // 'special' constant for a version number
    // gets written in RAM at position 64
    // update it when changing .asm, .inc or .vhdl files
    //
    -version = 20060615
    +version = 20061104

    //
    // io address are negativ memory addresses
    @@ -822,10 +823,6 @@

    getstatic_ref:
    getstatic:
    - // int idx = readOpd16u();
    - // int addr = readMem(cp+idx); // not now
    - // stack[++sp] = readMem(addr);
    -
    ldm cp opd
    nop opd
    ld_opd_16u
    @@ -845,10 +842,6 @@

    putstatic_ref:
    putstatic:
    - // int idx = readOpd16u();
    - // int addr = readMem(cp+idx); // not now
    - // writeMem(addr, stack[sp--]);
    -
    ldm cp opd
    nop opd
    ld_opd_16u
    @@ -885,12 +878,11 @@
    nop
    nop

    -#ifdef HANDLE
    stmra // read handle indirection
    wait // for the GC
    wait
    ldmrd
    -#endif
    +
    // TODO: why does flag opd has to be immediatley
    // before usage by ld_opd?
    // We cannot optimize this instruction as far as
    @@ -926,12 +918,11 @@
    nop
    nop

    -#ifdef HANDLE
    stmra // read handle indirection
    wait // for the GC
    wait
    ldmrd
    -#endif
    +
    nop opd
    nop opd
    ld_opd_16u
    @@ -944,27 +935,6 @@
    wait
    nop nxt

    -// TODO: initialize to zero
    -// or move to JVM.java (with synchronized())
    -//
    -//newarray: nop opd // no type info
    -// stm a // save count
    -// ldm heap -// stmwa // write ext. mem address -// ldm a -// stmwd // store count -// ldm heap -// ldi 1 -// add // arrayref to first element -// dup -// ldm a -// add // +count -// stm heap -// wait -// wait -// nop nxt - - newarray: nop opd ld_opd_8u @@ -994,14 +964,9 @@ arraylength: -#ifdef HANDLE - stmra // read handle indirection - wait // for the GC - wait - ldmrd -#endif - ldi -1 - add // arrayref-1 + + ldi 1 + add // arrayref+1 (in handle) stmra // read ext. mem, mem_bsy comes one cycle later wait wait @@ -1018,21 +983,13 @@ stm b // index // arrayref is TOS dup // for null pointer check - nop // wait one cycle for flags of ref + dup // for bound check, one cycle wait for bz bz null_pointer // - nop - nop - -#ifdef HANDLE - stmra // read handle indirection - wait // for the GC - wait - ldmrd -#endif - - dup // bound check - ldi -1 - add // arrayref-1 + // we do the following in the + // branch slot -> one more element + // from the former dup on the stack + ldi 1 + add // arrayref+1 stmra // read ext. mem, mem_bsy comes one cycle later wait // is this ok? - wait in branch slot wait @@ -1048,7 +1005,16 @@ and nop bnz array_bound - ldm b // in branch slot.... + nop + nop + +// we could save one ot two cycles when +// starting the read in the branch slot + stmra // read handle indirection + wait // for the GC + wait + ldmrd + ldm b add // index+arrayref stmwa // write ext. mem address @@ -1072,20 +1038,13 @@ stm b // index // arrayref is TOS dup // for null pointer check - nop // wait one cycle for flags of ref + dup // for bound check, one cycle wait for bz bz null_pointer // - nop - nop -#ifdef HANDLE - stmra // read handle indirection - wait // for the GC - wait - ldmrd -#endif - - dup // for bound check - ldi -1 - add // arrayref-1 + // we do the following in the + // branch slot -> one more element + // from the former dup on the stack + ldi 1 + add // arrayref+1 stmra // read array length wait // is this ok? - wait in branch slot @@ -1093,7 +1052,7 @@ ldmrd // read ext. mem (array length) ldi 1 - sub // length-1 + add // length+1 ldm b // index sub // TOS = length-1-index ldm b // check if index is negativ @@ -1102,7 +1061,16 @@ and nop bnz array_bound - ldm b // in branch slot... + nop + nop + +// we could save one ot two cycles when +// starting the read in the branch slot + stmra // read handle indirection + wait // for the GC + wait + ldmrd + ldm b add // index+arrayref stmra // read ext. mem, mem_bsy comes one cycle later @@ -1397,12 +1365,10 @@ jopsys_int2ext: stm c // save counter -#ifdef HANDLE stmra // read handle indirection wait // for the GC wait ldmrd -#endif stm a // extern address stm b // intern address ldm a @@ -1442,12 +1408,10 @@ jopsys_ext2int: stm c // save counter stm b // intern address -#ifdef HANDLE stmra // read handle indirection wait // for the GC wait ldmrd -#endif stm a // extern address ldm a ldm c 1.9 jop/asm/src/jvm_call.inc http://www.opencores.org/cvsweb.shtml/jop/asm/src/jvm_call.inc.diff?r1=1.8&r2=1.9 (In the diff below, changes in quantity of whitespace are not shown.) Index: jvm_call.inc =================================================================== RCS file: /cvsroot/martin/jop/asm/src/jvm_call.inc,v retrieving revision 1.8 retrieving revision 1.9 diff -u -b -r1.8 -r1.9 --- jvm_call.inc 12 Jan 2006 18:46:42 -0000 1.8 +++ jvm_call.inc 4 Nov 2006 23:28:01 -0000 1.9 @@ -54,17 +54,6 @@ invokeinterface: - // int idx = readOpd16u(); - // readOpd16u(); // read historical argument count and 0 - // int off = readMem(cp+idx); // index in interface table - // int args = off & 0xff; // this is args count without obj-ref - // off >>>= 8; - // int ref = stack[sp-args]; - // int vt = readMem(ref-1); // pointer to virtual table in obj-1 - // int it = readMem(vt-1); // pointer to interface table one befor vt - // int mp = readMem(it+off); - // invoke(mp); - ldm cp opd nop opd ld_opd_16u @@ -102,15 +91,8 @@ nop nop -#ifdef HANDLE - stmra // read handle indirection - wait // for the GC - wait - ldmrd -#endif - - ldi 1 // at address ref-1 is pointer to method table - sub + ldi 1 // at address ref+1 (in the handle) is the pointer to method table + add stmra // read pointer to method table wait wait @@ -141,14 +123,6 @@ invokevirtual: - // int idx = readOpd16u(); - // int off = readMem(cp+idx); // index in vt and arg count (-1) - // int args = off & 0xff; - // off >>>= 8; - // int ref = stack[sp-args]; - // int vt = readMem(ref-1); - // invoke(vt+off); - ldm cp opd nop opd ld_opd_16u @@ -186,16 +160,8 @@ nop nop -#ifdef HANDLE - stmra // read handle indirection - wait // for the GC - wait - ldmrd -#endif - - - ldi 1 // at address ref-1 is pointer to method table - sub + ldi 1 // at address ref+1 (in the handle) is the pointer to method table + add stmra // read pointer to method table wait 1.6 jop/asm/src/jvm_long.inc http://www.opencores.org/cvsweb.shtml/jop/asm/src/jvm_long.inc.diff?r1=1.5&r2=1.6 (In the diff below, changes in quantity of whitespace are not shown.) Index: jvm_long.inc =================================================================== RCS file: /cvsroot/martin/jop/asm/src/jvm_long.inc,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- jvm_long.inc 23 Jan 2006 12:06:45 -0000 1.5 +++ jvm_long.inc 4 Nov 2006 23:28:01 -0000 1.6 @@ -199,12 +199,11 @@ nop nop -#ifdef HANDLE stmra // read handle indirection wait // for the GC wait ldmrd -#endif + nop opd nop opd ld_opd_16u // CP index is the offset for the field @@ -238,12 +237,11 @@ nop nop -#ifdef HANDLE stmra // read handle indirection wait // for the GC wait ldmrd -#endif + nop opd nop opd ld_opd_16u // CP index is the offset for the field @@ -255,6 +253,7 @@ nop +// see also the little optimizations in iaload/iastore // // long array access disabled: // 1. we run out of microcode memory @@ -272,16 +271,9 @@ // nop // nop // -//#ifdef HANDLE -// stmra // read handle indirection -// wait // for the GC -// wait -// ldmrd -//#endif -// // dup // bound check -// ldi -1 -// add // arrayref-1 +// ldi 1 +// add // arrayref+1 // stmra // read ext. mem, mem_bsy comes one cycle later // wait // is this ok? - wait in branch slot // wait @@ -297,7 +289,14 @@ // and // nop // bnz array_bound -// ldm b // in branch slot.... +// nop +// nop +// +// stmra // read handle indirection +// wait // for the GC +// wait +// ldmrd +// ldm b // ldi 1 // shl // index*2 // add // index*2+arrayref @@ -326,16 +325,10 @@ // bz null_pointer // // nop // nop -//#ifdef HANDLE -// stmra // read handle indirection -// wait // for the GC -// wait -// ldmrd -//#endif // // dup // for bound check -// ldi -1 -// add // arrayref-1 +// ldi 1 +// add // arrayref+1 // // stmra // read array length // wait // is this ok? - wait in branch slot @@ -352,7 +345,14 @@ // and // nop // bnz array_bound -// ldm b // in branch slot... +// nop +// nop +// +// stmra // read handle indirection +// wait // for the GC +// wait +// ldmrd +// ldm b // ldi 1 // shl // index*2 // add // index*2+arrayref

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.