473,503 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inline assembly statement

Hi All,

I want to write one c function with some
inline assembly code like that:

void foo(int i)
{
__asm("addu $at,i,0");
}

Here input is a general purpose register number.
It's giving error at "i", that register expected.

I am using ghs compiler for MIPS.

Could anyone please tell me how I can do it?

Regards,
Sachin

Nov 14 '05 #1
1 1379
sb******@rediffmail.com wrote:

Hi All,

I want to write one c function with some
inline assembly code like that:

void foo(int i)
{
__asm("addu $at,i,0");
}

Here input is a general purpose register number.
It's giving error at "i", that register expected.

I am using ghs compiler for MIPS.

Could anyone please tell me how I can do it?


Not here. This is not standard portable C, so look for a newsgroup
that deals with your system and/or compiler.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
Nov 14 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
3796
by: yawnmoth | last post by:
http://www.frostjedi.com/terra/dev/test.html I'd like to have the colored boxes appear on the same line as "Test" does. The div containing the colored boxes is defined as being inline, yet...
43
13210
by: Patrick Laurent | last post by:
Hello I have a program with many many inlined template functions It is essential for the execution speed that every (or almost every) function marked as inlined, becomes really inlined by the...
3
3648
by: Ganesh Tawde | last post by:
Hi. I am trying to use the below pure assembly code as inline assembly in C. The pure assembly code gives proper data but the inline assembly code gives me distorted data. I am not able to...
25
2524
by: Brian Lindahl | last post by:
I'm using a temporary buffer to transfer some data and would rather not allocate it on the heap. The problem is that the size of the buffer is only known upon entry into the function that utilizes...
30
19667
by: Will Pittenger | last post by:
Does C# inline functions? I do not see a inline keyword. Is there an implicit inline? Can the compiler select functions for auto-inlining? I am more used to C++ where all these things are...
6
2403
by: ThomasR | last post by:
I was wondering on the breadth of optimization with .NET JIT compiler. Let's presume I have an assembly of static classes - mostly helper functions. Some of these functions may be very small...
9
2884
by: chinu | last post by:
hi all, i did a small experiment to grasp the advantages of declaring a function as inline. inline int fun1(); int main(){ unsigned int start=0,end=0; asm("rdtsc\n\t"
2
1811
by: =?Utf-8?B?TWljayBPJ05laWxs?= | last post by:
I am currently trying to wrap an old library (ImageMagick) in .NET, and am having problems with inline expansions. I have recompiled the library in vc++ 2005 OK. However, when I try to access any...
15
2787
by: Chris Peters | last post by:
Hello Group Can anyone confirm or suggest workrounds for the following bug in lccwin32. If an inline assembly statement immediately follows a for loop and you try to set a breakpoint on it, then...
0
7199
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7076
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7453
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5576
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5005
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4670
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3162
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1507
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
732
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.