I'm porting some CodeWarrior C++ projects over to XCode/gcc, and have run
into a problem that I've been unable to solve it despite a lot of effort and
time.
The code has some template classes with inlined functions that are declared
asm:
template<int sprid>
class SpecialReg
{ private:
SpecialReg( );
~SpecialReg( );
public:
typedef PPCContext::gpr t_GPR;
typedef PPCContext::spr t_reg;
typedef SpecialReg<sprid> sprreg;
enum { id = sprid };
static inline asm t_GPR get( )
{
mfspr r3, id;
blr;
}
};
The error I get is "error: block assembly operand not recognized", and the
offending line is:
"mfspr r3, id;"
I believe that the operand "id" must be the problem, and I think that the
template substitution isn't occuring (i.e. the template arg "sprid" isn't
being substituted). I've tried writing in "sprid" directly:
"mfspr r3, sprid;"
but that didn't work.
Does anyone have any advice, or know of a solution?
Much appreciation,
Tim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden