Home | History | Annotate | Download | only in ppc
      1 ;
      2 ;  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
      3 ;
      4 ;  Use of this source code is governed by a BSD-style license
      5 ;  that can be found in the LICENSE file in the root of the source
      6 ;  tree. An additional intellectual property rights grant can be found
      7 ;  in the file PATENTS.  All contributing project authors may
      8 ;  be found in the AUTHORS file in the root of the source tree.
      9 ;
     10 
     11 
     12     .globl save_platform_context
     13     .globl restore_platform_context
     14 
     15 .macro W V P
     16     stvx    \V,  0, \P
     17     addi    \P, \P, 16
     18 .endm
     19 
     20 .macro R V P
     21     lvx     \V,  0, \P
     22     addi    \P, \P, 16
     23 .endm
     24 
     25 ;# r3 context_ptr
     26     .align 2
     27 save_platform_contex:
     28     W v20, r3
     29     W v21, r3
     30     W v22, r3
     31     W v23, r3
     32     W v24, r3
     33     W v25, r3
     34     W v26, r3
     35     W v27, r3
     36     W v28, r3
     37     W v29, r3
     38     W v30, r3
     39     W v31, r3
     40 
     41     blr
     42 
     43 ;# r3 context_ptr
     44     .align 2
     45 restore_platform_context:
     46     R v20, r3
     47     R v21, r3
     48     R v22, r3
     49     R v23, r3
     50     R v24, r3
     51     R v25, r3
     52     R v26, r3
     53     R v27, r3
     54     R v28, r3
     55     R v29, r3
     56     R v30, r3
     57     R v31, r3
     58 
     59     blr
     60