Panajev2001a
Joined: 20 Aug 2005 Posts: 100
|
Posted: Sat Aug 27, 2005 8:01 pm Post subject: Inline ASM in C/C++ code |
|
|
Is there a reason why code that compiled perfectly on GCC 2.95.2 (PS2Linux... yeah I know some instructions cannot be used on ALLEGREX, etc... it is a question of inline ASM syntax) have to be modified very uglily to even be recognized.
Example:
Original:
| Code: | asm __volatile__ ("
.set push
.set noreorder
div.s %0, %1, %2
mtc1 $0, $f8
...
|
Modified to be recognized...:
| Code: | asm __volatile__ (".set\tpush\n\t"
".set\tnoreorder\n\t"
"div.s\t%0, %1, %2\n\t"
"mtc1\t$0, $f8\n\t"
...
|
It makes writing in-line ASM slower and more annoying. Is there anything that can be done to get gcc/g++ to recognize the original inline ASM syntax ? |
|