/// @file\r
/// IPF specific Global Control Registers accessing functions\r
///\r
-/// Copyright (c) 2006, Intel Corporation\r
+/// Copyright (c) 2006 - 2008, Intel Corporation\r
/// All rights reserved. This program and the accompanying materials\r
/// are licensed and made available under the terms and conditions of the BSD License\r
/// which accompanies this distribution. The full text of the license may be found at\r
.text\r
.type AsmWriteIva, @function\r
.proc AsmWriteIva\r
-.regstk 1, 0, 0, 0\r
+.regstk 1, 3, 0, 0\r
+\r
+ alloc loc1=ar.pfs,1,4,0,0 ;;\r
+\r
+ mov loc2 = psr\r
+ rsm 0x6000 // Make sure interrupts are masked\r
\r
AsmWriteIva::\r
- mov cr.iva = in0\r
- mov r8 = in0;;\r
- br.ret.dpnt b0;;\r
-.endp AsmWriteIva\r
+ mov cr.iva = in0\r
+ srlz.i;;\r
+ mov psr.l = loc2;;\r
+ srlz.i;;\r
+ srlz.d;;\r
+ mov ar.pfs=loc1 ;;\r
+ mov r8 = in0;;\r
+ br.ret.dpnt b0;;\r
+.endp AsmWriteIva\r
\r
\r
//---------------------------------------------------------------------------------\r
srlz.i;;\r
srlz.d;;\r
br.ret.dpnt b0;;\r
-.endp AsmWritePta
\ No newline at end of file
+.endp AsmWritePta\r