[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
Gary Benson
gbenson at redhat.com
Thu Jul 10 07:36:45 PDT 2008
Evan Cheng wrote:
> How about?
>
> const TargetRegisterClass *RC = is64Bit ? &PPC:GPRCRegClass :
> &PPC:G8RCRegClass;
> unsigned TmpReg = RegInfo.createVirtualRegister(RC);
I tried something like that yesterday:
const TargetRegisterClass *RC =
is64bit ? &PPC::GPRCRegClass : &PPC::G8RCRegClass;
but I kept getting this error no matter how I arranged it:
error: conditional expression between distinct pointer types
‘llvm::PPC::GPRCClass*’ and ‘llvm::PPC::G8RCClass*’ lacks a cast
Any suggestions?
Cheers,
Gary
--
http://gbenson.net/
More information about the llvm-dev
mailing list