[PATCH] Generic support for sub/super registers in AsmPrinter::EmitDwarfRegOp()

Adrian Prantl aprantl at apple.com
Wed Feb 26 16:28:29 PST 2014


On Feb 26, 2014, at 15:10, Adrian Prantl <aprantl at apple.com> wrote:

> 
> On Feb 25, 2014, at 18:31, Eric Christopher <echristo at gmail.com> wrote:
> 
>> Hi Adrian,
>> 
>> Few comments on Patch #1:
>> 
>> The function comments from Patch #2 would be nice in this patch :)
>> 
>> +  if (Reg < 0) {
>> +    if (!Indirect && !MLoc.isIndirect()) {
>> +      // Walk up the super-register chain until we find a valid number.
>> 
>> Looks like this is designed to fail if we have Reg < 0 and indirect? I
>> think? (Formatting is hard). At any rate an illuminating comment would
>> be great.
> 
> 
> There was actually no good reason to do this. I removed the check and instead emit 1-2 DW_OP_deref's.

And now that I thought about it some more, I will remove this again. First, the current implementation just drops the offset, which is clearly wrong, and the thought of having indirect values in sub-registers, or the semantics for having the address of an indirect value split across multiple registers, scares me enough that I will revisit this when I can actually find a target or testcase that would benefit from this.

I’ll add a comment, though.

-- adrian



More information about the llvm-commits mailing list