--- /dev/null
+/// @file\r
+/// CpuFlushTlb() function for Itanium-based architecture.\r
+///\r
+/// Copyright (c) 2006, 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
+/// http://opensource.org/licenses/bsd-license.php\r
+///\r
+/// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+/// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+///\r
+/// Module Name: CpuFlushTlb.s\r
+///\r
+///\r
+\r
+.auto\r
+.text\r
+\r
+.globl PalCallStatic\r
+.type PalCallStatic, @function\r
+\r
+.proc CpuFlushTlb\r
+.type CpuFlushTlb, @function\r
+CpuFlushTlb::\r
+ alloc loc0 = ar.pfs, 0, 3, 5, 0\r
+ mov out0 = 0\r
+ mov out1 = 6\r
+ mov out2 = 0\r
+ mov out3 = 0\r
+ mov loc1 = b0\r
+ mov out4 = 0\r
+ brl.call.sptk b0 = PalCallStatic\r
+ mov loc2 = psr // save PSR\r
+ mov ar.pfs = loc0\r
+ extr.u r14 = r10, 32, 32 // r14 <- count1\r
+ rsm 1 << 14 // Disable interrupts\r
+ extr.u r15 = r11, 32, 32 // r15 <- stride1\r
+ extr.u r10 = r10, 0, 32 // r10 <- count2\r
+ add r10 = -1, r10\r
+ extr.u r11 = r11, 0, 32 // r11 <- stride2\r
+ br.cond.sptk LoopPredicate\r
+LoopOuter:\r
+ mov ar.lc = r10 // LC <- count2\r
+ mov ar.ec = r0 // EC <- 0\r
+Loop:\r
+ ptc.e r9\r
+ add r9 = r11, r9 // r9 += stride2\r
+ br.ctop.sptk Loop\r
+ add r9 = r15, r9 // r9 += stride1\r
+LoopPredicate:\r
+ cmp.ne p6 = r0, r14 // count1 == 0?\r
+ add r14 = -1, r14\r
+(p6) br.cond.sptk LoopOuter\r
+ mov psr.l = loc2\r
+ mov b0 = loc1\r
+ br.ret.sptk.many b0\r
+.endp\r