I need to port some code written with a GCC compiler and inline assembly to its HP Unix equivalent. The situation is that HP CC compiler does not support the _asm keyword and of course the syntax is completely different. I have been looking on the internet for days but I have not found much information. The most I got is some information about the header file inline.h which has all the defini开发者_Go百科tions of some macros that, as I understand, are equivalent to some kind of assembly functions.
I have not found any example that can guide me. All the HP documentation I have found is about Itanium assembly language, which is a completely different architecture from PA-RISC.
Can someone please point me to some online resources about PA-RISC inline assembly with the HP CC compiler? Or at least some examples.
Your computer speaks Spanish (RISC Assembly).
Somebody wrote instructions in Chinese for a Chinese speaking computer.
You need to translate from Chinese to Spanish.
Not knowing both languages makes it an impossible job, examples notwithstanding.
Suggestion: ask the original programmer to rewrite the code in plain C.
As an alternative to rewriting the assembly in a different assembler format, you could use gcc on your hpux.
Of course, if the assembly was written for a different processor, then you'll have to follow @pmg's advice and ask for a generic C version. (Which is one of the reasons why C became so popular! It worked on multiple architectures once a compiler code generator was written for the target platform! Woot.)
精彩评论