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

📄 callxlc.s

📁 qnx powerpc MPC8245的 BSP源文件
💻 S
字号:
/* * Copyright 2002, QNX Software Systems Ltd. Unpublished Work All Rights * Reserved. *  * This source code contains confidential information of QNX Software Systems * Ltd. (QSSL). Any use, reproduction, modification, disclosure, distribution * or transfer of this software, or any software which includes or is based * upon any of this code, is only permitted under the terms of the QNX * Confidential Source License version 1.0 (see licensing.qnx.com for details) * or as otherwise expressly authorized by a written license agreement from * QSSL. For more information, please email licensing@qnx.com. *//*!@(#)callxlc.s	7.1 3/29/97 14:10:21 *//*!-------------------------------------------------------------------------------!!       OS Open Operating System!       COPYRIGHT   I B M   CORPORATION 1992!       LICENSED MATERIAL  -  PROGRAM PROPERTY OF I B M!       REFER TO COPYRIGHT INSTRUCTIONS: FORM G120-2083!       US Government Users Restricted Rights - Use, duplication or!       disclosure restricted by GSA ADP Schedule Contract with IBM Corp.!!-------------------------------------------------------------------------------!-------------------------------------------------------------------------------!!  File Name:   callxlc.s!!  Function:    The _callxlc function alows for Metaware compiled functions!               to call to xlc compiled function (as long as floating point.!               parameters are not used and all the parameters fit in gpr's).!!  Author:      Maciej P. Tyrlik!!  Notes: 	Input:   r3 -> address of the function descriptor! 			 r4 -> r10 parameters for xlc function!!               Output:  none!!  Change Activity-!!  Date        Description of Change                                       BY!  ---------   ---------------------                                       ---!  01-Sep-92   Created                                                     MPT!  03-May-95   Added code to mask off external interupts                   mkw!  18-Aug-97   Port to gcc                                                 -NL !!-------------------------------------------------------------------------------*/.set    ..jmpret,0x0.set    ..jmpstk,0x4.set    ..jmpregs,0xC.set    ..jmpcr,0x58        .text	.align	2        .global _callxlc_callxlc:        mflr    %r0        stw     %r0,4(%r1)        stwu    %r1,-64(%r1)        stw     %r2,60(%r1)        lwz     %r0,0x0(%r3)        mtctr   %r0        lwz     %r2,0x4(%r3)                            ori     %r3,%r4,0x0               /* put parms in proper regs */                        ori     %r4,%r5,0x0        ori     %r5,%r6,0x0        ori     %r6,%r7,0x0        ori     %r7,%r8,0x0        ori     %r8,%r9,0x0        ori     %r9,%r10,0x0        mfmsr   %r0                      /* get msr */            stw     %r0,56(%r1)              /* save the msr */        addis   %r10,%r0,0xffff          /* turn off ext. int bit */        ori     %r10,%r10,0x7fff        and     %r0,%r10,%r0        mtmsr   %r0                      /* set the msr */          bctrl                            /* call the xcoff function */        lwz     %r0,68(%r1)        mtlr    %r0        lwz     %r2,60(%r1)        lwz     %r0,56(%r1)        mtmsr   %r0                     /* restore the msr    */        addi    %r1,%r1,64        blr	.type _callxlc,@function	.size _callxlc,.-_callxlc

⌨️ 快捷键说明

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