Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /*
  2.  * Common module to set offset into the scoreboard
  3.  * Copyright © <2010>, Intel Corporation.
  4.  *
  5.  * This program is licensed under the terms and conditions of the
  6.  * Eclipse Public License (EPL), version 1.0.  The full text of the EPL is at
  7.  * http://www.opensource.org/licenses/eclipse-1.0.php.
  8.  *
  9.  */
  10. //
  11. // Module name: set_SB_offset.asm
  12. //
  13. // Common module to set offset into the scoreboard
  14. //      Note: This is to encapsulate the way M0.5:ud in ForwardMsg is filled.
  15. //
  16. //  $Revision: 2 $
  17. //  $Date: 10/16/06 5:19p $
  18. //
  19.         add (1)         MSGHDRY1.10<1>:uw r0.20:ub      0x0200:uw                       // Message length = 1 DWORD
  20.  
  21.         add     (16)    acc0<1>:w       r0.12<0;1,0>:uw -LEADING_THREAD:w       // 0-based thread count derived from r0.6:ud
  22.         shl (1)         M05_STORE<1>:uw         acc0<0;1,0>:uw  0x2:uw          // Store for future "update" use, in DWORD unit
  23.         and     (16)    acc0<1>:w       acc0<16;16,1>:uw        SB_MASK:uw              // Wrap around scoreboard
  24.         shl (1)         MSGHDRY1.11<1>:uw       acc0<0;1,0>:uw  0x2:uw          // Convert to DWORD offset
  25.  
  26. // End of set_SB_offset