f



PowerPC inline assembly and Green Hills Multi

Hello,

I'm searching information on writing inline assembly routines in Green
Hills Multi 4.0.7 environment. Is there a tutorial somewhere or any
other source of information ?

My problem is that I very often don't understand why the compiler
compiles the code but the linker complains about unresolved externals.
Sometimes If receive compiler errors like  "No storage mode
specification line matched in asm procedure : set_TBL". What does it
mean ?

Could anyone be so kind to give me some examples ? I mostly only want
to read/write some processor registers or do some low level init (BAT
registers ...)

Regards
Enie

0
Enie45
3/13/2007 8:05:09 AM
comp.sys.powerpc.tech 819 articles. 1 followers. Post Follow

1 Replies
982 Views

Similar Articles

[PageSpeed] 37

Enie45 wrote:
> Hello,
> 
> I'm searching information on writing inline assembly routines in Green
> Hills Multi 4.0.7 environment. Is there a tutorial somewhere or any
> other source of information ?
> 
> My problem is that I very often don't understand why the compiler
> compiles the code but the linker complains about unresolved externals.
> Sometimes If receive compiler errors like  "No storage mode
> specification line matched in asm procedure : set_TBL". What does it
> mean ?
> 
> Could anyone be so kind to give me some examples ? I mostly only want
> to read/write some processor registers or do some low level init (BAT
> registers ...)
> 

If you look through the GHS manuals there's a section on this. They have 
a truly horrible implementation of inline assmebly. You have to put all 
sorts of weird directives in the asm routine depending on how the code 
is going to be be built, otherwise you get link errors as you describe 
and various other problems.

Here's an example that works for me - YMMV as they say...

asm double __frsqrte (double x)
{
%reg x
     frsqrte f1,x
%error
}

Paul
0
Paul
3/13/2007 10:13:04 AM
Reply: