From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 09 Oct 2003 06:39:23 +0100 (BST) Received: from [IPv6:::ffff:203.199.202.17] ([IPv6:::ffff:203.199.202.17]:776 "EHLO pub.isofttechindia.com") by linux-mips.org with ESMTP id ; Thu, 9 Oct 2003 06:39:20 +0100 Received: from DURAI ([192.168.0.107]) by pub.isofttechindia.com (8.11.0/8.11.0) with SMTP id h995YGY03928 for ; Thu, 9 Oct 2003 11:04:16 +0530 Message-ID: <007801c38e27$a1c81920$6b00a8c0@DURAI> From: "durai" To: "mips" Subject: how to include mips assembly in c code? Date: Thu, 9 Oct 2003 11:08:56 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0075_01C38E55.BB76DF40" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-MailScanner: Found to be clean Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 3390 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: durai@isofttech.com Precedence: bulk X-list: linux-mips This is a multi-part message in MIME format. ------=_NextPart_000_0075_01C38E55.BB76DF40 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable hello, I am having the following assembly code and i wanted to call this = function from a c code. can anybody tell me how to include this code in a c program? /************************************************************************= ****** * * sysWbFlush - flush the write buffer * * This routine flushes the write buffers, making certain all * subsequent memory writes have occurred. It is used during critical = periods * only, e.g., after memory-mapped I/O register access. * * RETURNS: N/A * sysWbFlush (void) */ .ent sysWbFlush sysWbFlush: li t0, K1BASE /* load uncached address = */ lw t0, 0(t0) /* read in order to flush = */ j ra /* return to caller = */ .end sysWbFlush regards durai ------=_NextPart_000_0075_01C38E55.BB76DF40 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
hello,
I am having the following assembly code = and i=20 wanted to call this function from a c code.
can anybody tell me how to include this = code in a c=20 program?
 
/***************************************************************= ***************
*
*=20 sysWbFlush - flush the write buffer
*
* This routine flushes the = write=20 buffers, making certain all
* subsequent memory writes have = occurred. =20 It is used during critical periods
* only, e.g., after memory-mapped = I/O=20 register access.
*
* RETURNS: N/A
 
* sysWbFlush (void)
 
*/
       =20 .ent   =20 sysWbFlush
sysWbFlush:
       =20 li      t0,=20 K1BASE           &= nbsp; =20 /* load uncached address       =20 */
       =20 lw      t0,=20 0(t0)           &n= bsp;  =20 /* read in order to flush      =20 */
       =20 j      =20 ra            = ;         =20 /* return to=20 caller           &= nbsp;=20 */
        .end   =20 sysWbFlush
 
 
regards
durai
------=_NextPart_000_0075_01C38E55.BB76DF40--