[llvm-commits] [llvm] r93796 - in /llvm/trunk: include/llvm/Target/TargetMachine.h lib/Target/PowerPC/PPCTargetMachine.cpp lib/Target/PowerPC/PPCTargetMachine.h lib/Target/X86/X86TargetMachine.cpp lib/Target/X86/X86TargetMachine.h
Bill Wendling
isanbard at gmail.com
Mon Jan 18 18:44:08 PST 2010
On Jan 18, 2010, at 5:33 PM, Chris Lattner wrote:
>
> On Jan 18, 2010, at 2:36 PM, Bill Wendling wrote:
>
>> Author: void
>> Date: Mon Jan 18 16:36:35 2010
>> New Revision: 93796
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=93796&view=rev
>> Log:
>> - Add getLSDAEncoding to the PowerPC backend.
>> - Greatly improve the comments to the getLSDAEncoding method.
>
> Thanks Bill,
>
>> +++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp Mon Jan 18 16:36:35 2010
>> @@ -194,4 +194,19 @@
>> return false;
>> }
>>
>> +/// getLSDAEncoding - Returns the LSDA pointer encoding. The choices are 4-byte,
>> +/// 8-byte, and target default. The CIE is hard-coded to indicate that the LSDA
>> +/// pointer in the FDE section is an "sdata4", and should be encoded as a 4-byte
>> +/// pointer by default. However, some systems may require a different size due
>> +/// to bugs or other conditions. We will default to a 4-byte encoding unless the
>> +/// system tells us otherwise.
>> +///
>> +/// FIXME: This call-back isn't good! We should be using the correct encoding
>> +/// regardless of the system. However, there are some systems which have bugs
>> +/// that prevent this from occuring.
>> +DwarfLSDAEncoding::Encoding PPCTargetMachine::getLSDAEncoding() const {
>> + if (Subtarget.isDarwin() && Subtarget.getDarwinVers() != 10)
>> + return DwarfLSDAEncoding::Default;
>>
>> + return DwarfLSDAEncoding::EightByte;
>> +}
>
> You now have a nice generic comment, please add a big specific comment explaining why PPC (and X86) need to implement this. What is it doing, why is it important?
>
Done.
-bw
More information about the llvm-commits
mailing list