On Fri, Jul 04, 2008 at 02:56:37AM -0700, Mladen Nikitovic wrote:
> after some tests I came to this conclusion:
> 
> regardless of the compiler the statement MAGIC(6000 + a) fails.
> 
> The reason for this is that the generated code by the compiler becomes 
> 
> sethi %g1, %g0
> 
> this violates the requirement that the parameter need to be an immediate 
> value. 
> 
> So, I came to the conclusion that it really doesn't matter which compiler I 
> use, it's the actual expression that is the problem. 
> 
> The sad story is that i must use the sethi instruction to trigger a 'magic' 
> breakpoint in my simulator.  This is fine in most cases
> where I usually send a constant value as a parameter. Unfortunately, this 
> exceptional case requires me to pass along a value that 
> is unknown at compilation time...
> 
> Seems I'm stuck at this point.

Try to separate two problems.
First, figure out how to write it in a pure assembly.
And then find a way how to put it through the compiler (gnu-inline assembler, 
inline templates whatever).

Unfortunately my sparc assembler knowledge is minimal, so I cant help with the 
first one.

regards,
  Fedor.

> 
> Thanks for all the help anyway.
> 
> BR,
> Mladen
> --
> This message posted from opensolaris.org
> _______________________________________________
> tools-compilers mailing list
> tools-compilers at opensolaris.org

Reply via email to