Quote:
Originally Posted by cyborgt
man, i hope i can do that, but i couldn't .... please help.. anybody...
|
What did you try so far? How about
:
Code:
mips-linux-gnu-g++ -S binarysearch.cc
So assuming your C++ sourcefile is
binarysearch.cc, you should will get a mips assembly file called
binarysearch.s. You can obviously add all architecture-specific options outlined in the g++ manpage.
Also, make sure you sanitize your C++ code to be as self-sufficient as possible (e.g., remove all use of the STL, and most library functions). That way, instead of having your assembly code be a bunch of function calls, you will have a self-contained piece of code (except for obvious things like writing to stdout).