Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

assembly in NIOS II IDE

Altera_Forum
Honored Contributor II
962 Views

hello to everybody 

it's possible to optimize a C function in assembly  

For example : 

 

int myfunc(int a , int http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/cool.gif  

int c;# asm 

... 

...# end_asm 

 

return c; 

 

like this not run , of course  

How it&#39;s possible writing something about this? 

thanks 

walter 

ciao
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
278 Views

Hi, 

in Nios I it was: 

 

asm("... 

... 

... 

... "); 

 

i haven&#39;t tried it yet in Nios II. 

bye
0 Kudos
Altera_Forum
Honored Contributor II
278 Views

ok thanks 

yesterday i saw some documents about it  

May be the same  

ciao 

walter
0 Kudos
Altera_Forum
Honored Contributor II
278 Views

Right....and, in reality, this has very little to do with the IDE and a whole lot more to do with the compiler toolchain: GCC. Along those lines, you really should be referencing something like the following: 

 

gcc-inline-assembly-howto (http://www.ibiblio.org/gferg/ldp/gcc-inline-assembly-howto.html#s3

 

Cheers, 

 

- slacker
0 Kudos
Reply