Ignore:
Timestamp:
May 10, 2011, 5:33:37 AM (9 years ago)
Author:
gb
Message:

Don't use swp instructions: they're deprecated and may be disabled
and/or improperly emulated on some Linux kernels. (And they're generally
somewhat slow.)

Support the alternative instruction sequences (which involve loading a
PC into a register not expected to contain one) in pc_luser_xp().

File:
1 edited

Legend:

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

    r14754 r14791  
    15451545  egc_rplacd,
    15461546  egc_set_hash_key_conditional,
    1547   egc_set_hash_key_conditional_test;
     1547  egc_set_hash_key_conditional_test,
     1548  swap_lr_lisp_frame_temp0,
     1549  swap_lr_lisp_frame_arg_z;
    15481550
    15491551
     
    17201722        xpGPR(xp,allocptr) = VOID_ALLOCPTR;
    17211723      }
     1724      return;
    17221725    }
    17231726    return;
     1727  }
     1728  {
     1729    lisp_frame *swap_frame = NULL;
     1730    pc base = &swap_lr_lisp_frame_temp0;
     1731   
     1732    if ((program_counter >base)             /* sic */
     1733        && (program_counter < (base+3))) {
     1734      swap_frame = (lisp_frame *)xpGPR(xp,temp0);
     1735    } else {
     1736      base = &swap_lr_lisp_frame_arg_z;
     1737      if ((program_counter > base) && (program_counter < (base+3))) {
     1738        swap_frame = (lisp_frame *)xpGPR(xp,arg_z);
     1739      }
     1740    }
     1741    if (swap_frame) {
     1742      if (program_counter == (base+1)) {
     1743        swap_frame->savelr = xpGPR(xp,Rlr);
     1744      }
     1745      xpGPR(xp,Rlr) = xpGPR(xp,imm0);
     1746      xpPC(xp) = base+3;
     1747      return;
     1748    }
    17241749  }
    17251750}
Note: See TracChangeset for help on using the changeset viewer.