⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ppcbke_tlb_ibm.s

📁 qnx powerpc MPC8245的 BSP源文件
💻 S
字号:
#  # Copyright 2007, QNX Software Systems. #  # Licensed under the Apache License, Version 2.0 (the "License"). You # may not reproduce, modify or distribute this software except in # compliance with the License. You may obtain a copy of the License # at: http://www.apache.org/licenses/LICENSE-2.0 #  # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" basis, # WITHOUT WARRANTIES OF ANY KIND, either express or implied.# # This file may contain contributions from others, either as # contributors under the License or as licensors under other terms.  # Please review this entire file for other proprietary rights or license # notices, as well as the QNX Development Suite License Guide at # http://licensing.qnx.com/license-guide/ for other information.# 	.include "ppc/util.ah"	.include "asmoff.def".ifdef PPC_CPUOP_ENABLED	.cpu booke32.endif## IBM versions of book E TLB routines. Standards, gotta love 'em :-(#routine_start ppcbke_tlb_write_ibm, 1	# Initial moves because we added an extra parm to the front of	# the list. If we re-org the remainder of the list, they can be	# removed	mr		%r3,%r4	mr		%r4,%r5		# get word 1 (RPN) ready.ifdef __LITTLEENDIAN__	lwz		%r5,PPCBKE_TLB_RPN+0(%r4)	lwz		%r6,PPCBKE_TLB_RPN+4(%r4).else	lwz		%r5,PPCBKE_TLB_RPN+4(%r4)	lwz		%r6,PPCBKE_TLB_RPN+0(%r4).endif	rlwinm	%r5,%r5,0,0,21 	or		%r5,%r5,%r6			# get word 2 (attr/access) ready	lbz		%r6,PPCBKE_TLB_ACCESS(%r4)	lhz		%r7,PPCBKE_TLB_ATTR(%r4)	rlwimi	%r6,%r7,7,0,24 		# get word 0 (epn/v/ts/size/tid) ready	lwz		%r7,PPCBKE_TLB_EPN(%r4)	rlwinm	%r7,%r7,0,0,21	lbz		%r8,PPCBKE_TLB_V(%r4)	rlwimi	%r7,%r8,31-22,22,22	lbz		%r8,PPCBKE_TLB_TS(%r4)	rlwimi	%r7,%r8,31-23,23,23	lbz		%r8,PPCBKE_TLB_SIZE(%r4)	rlwimi	%r7,%r8,31-27,24,27	lwz		%r8,PPCBKE_TLB_TID(%r4)		mfspr	%r9,PPC440_SPR_MMUCR	rlwimi	%r9,%r8,0,24,31	mtspr	PPC440_SPR_MMUCR,%r9	   	tlbwe	%r6,%r3,2   	tlbwe	%r5,%r3,1   	tlbwe	%r7,%r3,0		isync	blrroutine_end ppcbke_tlb_write_ibmroutine_start ppcbke_tlb_read_ibm, 1	# Initial moves because we added an extra parm to the front of	# the list. If we re-org the remainder of the list, they can be	# removed	mr		%r3,%r4	mr		%r4,%r5	   	tlbre	%r5,%r3,0	rlwinm	%r8,%r5,28,28,31	stb		%r8,PPCBKE_TLB_SIZE(%r4)	rlwinm	%r8,%r5,24,31,31	stb		%r8,PPCBKE_TLB_TS(%r4)	rlwinm	%r8,%r5,24,31,31	stb		%r8,PPCBKE_TLB_TS(%r4)	rlwinm	%r8,%r5,23,31,31	stb		%r8,PPCBKE_TLB_V(%r4)	rlwinm	%r8,%r5,0,0,21	stw		%r8,PPCBKE_TLB_EPN(%r4)	mfspr	%r8,PPC440_SPR_MMUCR	rlwinm	%r8,%r8,0,24,31	stw		%r8,PPCBKE_TLB_TID(%r4)	   	tlbre	%r5,%r3,1	rlwinm	%r8,%r5,0,0,21	rlwinm	%r7,%r5,0,28,31.ifdef __LITTLEENDIAN__	stw		%r8,PPCBKE_TLB_RPN+0(%r4)	stw		%r7,PPCBKE_TLB_RPN+4(%r4).else	stw		%r8,PPCBKE_TLB_RPN+4(%r4)	stw		%r7,PPCBKE_TLB_RPN+0(%r4).endif   	tlbre	%r5,%r3,2	rlwinm	%r8,%r5,0,26,31	stb		%r8,PPCBKE_TLB_ACCESS(%r4)	rlwinm	%r8,%r5,25,23,31	sth		%r8,PPCBKE_TLB_ATTR(%r4)		blrroutine_end ppcbke_tlb_read_ibm

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -