From: Ralf Baechle <ralf@linux-mips.org>
To: durai <durai@isofttech.com>
Cc: mips <linux-mips@linux-mips.org>
Subject: Re: how to include mips assembly in c code?
Date: Thu, 9 Oct 2003 09:54:15 +0200 [thread overview]
Message-ID: <20031009075415.GB19372@linux-mips.org> (raw)
In-Reply-To: <007801c38e27$a1c81920$6b00a8c0@DURAI>
On Thu, Oct 09, 2003 at 11:08:56AM +0530, durai wrote:
> 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?
Several solutions:
#define sysWbFlush() do { (*(volatile unsigned int *)K1BASE) } while (0)
Or using your existing code:
extern void sysWbFlush(void);
the call as
sysWbFlush();
No point in using inline assembler for such a small fragment.
Anyway - I suggest you dump this code and look at <asm/wbflush.h>.
Ralf
next prev parent reply other threads:[~2003-10-09 7:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-09 5:38 how to include mips assembly in c code? durai
2003-10-09 7:54 ` Ralf Baechle [this message]
2003-10-09 8:05 ` Matthew Dharm
2003-10-09 21:47 ` ilya
2003-10-09 22:09 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031009075415.GB19372@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=durai@isofttech.com \
--cc=linux-mips@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox