Changeset 15748


Ignore:
Timestamp:
Feb 24, 2013, 1:14:40 PM (6 years ago)
Author:
gb
Message:

Write barrier changes for PPC, too.

Location:
trunk/source/lisp-kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/ppc-exceptions.c

    r15470 r15748  
    19211921  egc_store_node_conditional,
    19221922  egc_store_node_conditional_test,
    1923   egc_set_hash_key,
    1924   egc_gvset,
    1925   egc_rplaca,
    1926   egc_rplacd,
     1923  egc_set_hash_key, egc_set_hash_key_did_store,
     1924  egc_gvset, egc_gvset_did_store,
     1925  egc_rplaca, egc_rplaca_did_store,
     1926  egc_rplacd, egc_rplacd_did_store,
    19271927  egc_set_hash_key_conditional,
    19281928  egc_set_hash_key_conditional_test;
     
    19461946    LispObj *ea = 0, val = 0, root = 0;
    19471947    bitvector refbits = (bitvector)(lisp_global(REFBITS));
    1948     Boolean need_store = true, need_check_memo = true, need_memoize_root = false;
     1948    Boolean need_check_memo = true, need_memoize_root = false;
    19491949
    19501950    if (program_counter >= &egc_set_hash_key_conditional) {
     
    19541954        return;
    19551955      }
    1956       need_store = false;
    19571956      root = xpGPR(xp,arg_x);
    19581957      ea = (LispObj *) (root+xpGPR(xp,arg_y)+misc_data_offset);
     
    19681967      ea = (LispObj*)(xpGPR(xp,arg_x) + xpGPR(xp,imm4));
    19691968      xpGPR(xp,arg_z) = t_value;
    1970       need_store = false;
    19711969    } else if (program_counter >= &egc_set_hash_key) {
     1970      if (program_counter < &egc_set_hash_key_did_store) {
     1971        return;
     1972      }
    19721973      root = xpGPR(xp,arg_x);
    19731974      val = xpGPR(xp,arg_z);
     
    19751976      need_memoize_root = true;
    19761977    } else if (program_counter >= &egc_gvset) {
     1978      if (program_counter < &egc_gvset_did_store) {
     1979        return;
     1980      }
    19771981      ea = (LispObj *) (xpGPR(xp,arg_x)+xpGPR(xp,arg_y)+misc_data_offset);
    19781982      val = xpGPR(xp,arg_z);
    19791983    } else if (program_counter >= &egc_rplacd) {
     1984      if (program_counter < &egc_rplacd_did_store) {
     1985        return;
     1986      }
    19801987      ea = (LispObj *) untag(xpGPR(xp,arg_y));
    19811988      val = xpGPR(xp,arg_z);
    19821989    } else {                      /* egc_rplaca */
     1990      if (program_counter < &egc_rplaca_did_store) {
     1991        return;
     1992      }
    19831993      ea =  ((LispObj *) untag(xpGPR(xp,arg_y)))+1;
    19841994      val = xpGPR(xp,arg_z);
    1985     }
    1986     if (need_store) {
    1987       *ea = val;
    19881995    }
    19891996    if (need_check_memo) {
  • trunk/source/lisp-kernel/ppc-spentry.s

    r15704 r15748  
    464464/* For RPLACA and RPLACD, things are fairly simple: regardless of where we  */
    465465/* are in the function, we can do the store (even if it's already been done)  */
     466/* Wrong: we generally only want to do it once, at most .... */       
    466467/* and calculate whether or not we need to set the bit out-of-line.  (Actually */
    467468/* setting the bit needs to be done atomically, unless we're sure that other */
     
    470471       
    471472        .globl C(egc_write_barrier_start)
     473        .globl C(egc_rplaca_did_store)
    472474_spentry(rplaca)
    473475C(egc_write_barrier_start):
    474476        __(cmplr(cr2,arg_z,arg_y))
    475477        __(_rplaca(arg_y,arg_z))
     478C(egc_rplaca_did_store):               
    476479        __(blelr cr2)
    477480        __(ref_global(imm2,ref_base))
     
    498501
    499502        .globl C(egc_rplacd)
     503        .globl C(egc_rplacd_did_store)
    500504_spentry(rplacd)
    501505C(egc_rplacd):
    502506        __(cmplr(cr2,arg_z,arg_y))
    503507        __(_rplacd(arg_y,arg_z))
     508C(egc_rplacd_did_store):       
    504509        __(blelr cr2)
    505510        __(ref_global(imm2,ref_base))
     
    528533
    529534        .globl C(egc_gvset)
     535        .globl C(egc_gvset_did_store)
    530536_spentry(gvset)
    531537C(egc_gvset):
     
    533539        __(la imm0,misc_data_offset(arg_y))
    534540        __(strx(arg_z,arg_x,imm0))
     541C(egc_gvset_did_store):
    535542        __(blelr cr2)
    536543        __(add imm0,imm0,arg_x)
     
    560567/* the store, record the address of the hash-table vector in the refmap,  */
    561568/* as well. */
    562         .globl C(egc_set_hash_key)       
     569        .globl C(egc_set_hash_key)     
     570        .globl C(egc_set_hash_key_did_store) 
    563571_spentry(set_hash_key)
    564572C(egc_set_hash_key):
     
    566574        __(la imm0,misc_data_offset(arg_y))
    567575        __(strx(arg_z,arg_x,imm0))
     576C(egc_set_hash_key_did_store):         
    568577        __(blelr cr2)
    569578        __(add imm0,imm0,arg_x)
Note: See TracChangeset for help on using the changeset viewer.