[LLVMdev] Implementing llvm.atomic.cmp.swap.i32 on PowerPC
Evan Cheng
evan.cheng at apple.com
Thu Jul 10 00:20:57 PDT 2008
Looks good.
+ unsigned temp;
+ if (is64bit)
+ temp = RegInfo.createVirtualRegister(&PPC::GPRCRegClass);
+ else
+ temp = RegInfo.createVirtualRegister(&PPC::G8RCRegClass);
How about?
const TargetRegisterClass *RC = is64Bit ? &PPC:GPRCRegClass :
&PPC:G8RCRegClass;
unsigned TmpReg = RegInfo.createVirtualRegister(RC);
Evan
On Jul 9, 2008, at 9:16 AM, Gary Benson wrote:
> Ah, didn't see that, that's what comes of trying to do something at
> 5pm :) I attached an updated patch which creates a virtual register
> instead of using R0. How does this look?
>
> Cheers,
> Gary
>
> Dan Gohman wrote:
>> PPCTargetLowering::EmitInstrWithCustomInserter has a reference
>> to the current MachineFunction for other purposes. Can you use
>> MachineFunction::getRegInfo instead?
>>
>> Dan
>>
>> On Jul 8, 2008, at 1:56 PM, Gary Benson wrote:
>>> Would it be acceptable to change MachineInstr::getRegInfo
>>> from private to public so I can use it from
>>> PPCTargetLowering::EmitInstrWithCustomInserter?
>>>
>>> Cheers,
>>> Gary
>>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
> --
> http://gbenson.net/
> <ppc-atomics-
> take2.patch>_______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list