Changeset 6b96ab44 in mainline for arch/ia64/src/context.S


Ignore:
Timestamp:
2005-05-17T22:43:57Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1eee8383
Parents:
7f1bfce
Message:

IA-64 work.
Add the rest of branch registers to context_t.
Add predicate registers to context_t.
Modify context_save()/context_restore() to save/restore branch registers and predicate registers.
Change SP_DELTA to 0 since both context_save() and context_restore() are leaf procedures and as such don't use the scratch area.
Change pri_t to be u64 instead of u32.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia64/src/context.S

    r7f1bfce r6b96ab44  
    3333
    3434context_save:
    35         alloc loc0 = ar.pfs, 1, 2, 0, 0
     35        alloc loc0 = ar.pfs, 1, 9, 0, 0
    3636       
    3737        /*
     
    3939         */
    4040
     41        /*
     42         * Save general registers
     43         */
    4144        st8 [in0] = r1, 8       ;;
    4245        st8 [in0] = r2, 8       ;;
     
    7174        st8 [in0] = r31, 8      ;;
    7275
    73         /* save pc */
     76        /*
     77         * Save branch registers
     78         */
    7479        mov loc1 = b0           ;;
     80        st8 [in0] = loc1, 8             /* save pc */
     81        mov loc2 = b1           ;;
     82        st8 [in0] = loc2, 8
     83        mov loc3 = b2           ;;
     84        st8 [in0] = loc3, 8
     85        mov loc4 = b3           ;;
     86        st8 [in0] = loc4, 8
     87        mov loc5 = b4           ;;
     88        st8 [in0] = loc5, 8
     89        mov loc6 = b5           ;;
     90        st8 [in0] = loc6, 8
     91        mov loc7 = b6           ;;
     92        st8 [in0] = loc7, 8
     93        mov loc8 = b7           ;;
     94        st8 [in0] = loc8, 8
     95
     96        /*
     97         * Save predicate registers
     98         */
     99        mov loc1 = pr           ;;
    75100        st8 [in0] = loc1, 8
    76101       
     
    81106
    82107context_restore:
    83         alloc loc0 = ar.pfs, 1, 2, 0, 0
     108        alloc loc0 = ar.pfs, 1, 9, 0, 0
    84109
    85110        /*
     
    87112         */
    88113       
     114        /*
     115         * Restore general registers
     116         */
    89117        ld8 r1 = [in0], 8       ;;
    90118        ld8 r2 = [in0], 8       ;;
     
    119147        ld8 r31 = [in0], 8      ;;
    120148
    121         /* restore pc */
     149        /*
     150         * Restore branch registers
     151         */
     152        ld8 loc1 = [in0], 8     ;;      /* restore pc */
     153        mov b0 = loc1
     154        ld8 loc2 = [in0], 8     ;;
     155        mov b1 = loc2
     156        ld8 loc3 = [in0], 8     ;;
     157        mov b2 = loc3
     158        ld8 loc4 = [in0], 8     ;;
     159        mov b3 = loc4
     160        ld8 loc5 = [in0], 8     ;;
     161        mov b4 = loc5
     162        ld8 loc6 = [in0], 8     ;;
     163        mov b5 = loc6
     164        ld8 loc7 = [in0], 8     ;;
     165        mov b6 = loc7
     166        ld8 loc8 = [in0], 8     ;;
     167        mov b7 = loc8
     168
    122169        ld8 loc1 = [in0], 8     ;;
    123         mov b0 = loc1
     170        mov pr = loc1, ~0
    124171       
    125172        mov ar.pfs = loc0
Note: See TracChangeset for help on using the changeset viewer.