[llvm-commits] [llvm] r161739 - in /llvm/trunk: lib/MC/MCDwarf.cpp test/MC/ELF/fde.s

Peter Cooper peter_cooper at apple.com
Sun Aug 12 09:55:09 PDT 2012


Oops, i see you already fixed it.  Sorry, was looking at previous builds.

Sorry for the noise.

Pete
On Aug 12, 2012, at 9:50 AM, Peter Cooper <peter_cooper at apple.com> wrote:

> Hi Nick
> 
> This is breaking one of the buildbots.  The command the buildbot ran is:
> 
> llvm-mc -filetype=obj test/MC/ELF/fde.s -o /Output/fde.s.tmp.o && llvm-objdump -s /Output/fde.s.tmp.o
> 
> which gives the error
> 
> LLVM ERROR: unsupported symbol modifier in branch relocation
> 
> Could you please take a look.
> 
> Thanks,
> Pete
> On Aug 12, 2012, at 1:09 AM, Nick Lewycky <nicholas at mxc.ca> wrote:
> 
>> Author: nicholas
>> Date: Sun Aug 12 03:09:45 2012
>> New Revision: 161739
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=161739&view=rev
>> Log:
>> When emitting the PC range in an FDE, use the same data encoding for both ends
>> of the range. Fixes PR13581!
>> 
>> Added:
>>   llvm/trunk/test/MC/ELF/fde.s
>> Modified:
>>   llvm/trunk/lib/MC/MCDwarf.cpp
>> 
>> Modified: llvm/trunk/lib/MC/MCDwarf.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDwarf.cpp?rev=161739&r1=161738&r2=161739&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/MC/MCDwarf.cpp (original)
>> +++ llvm/trunk/lib/MC/MCDwarf.cpp Sun Aug 12 03:09:45 2012
>> @@ -1294,20 +1294,17 @@
>>    streamer.EmitSymbolValue(&cieStart, 4);
>>  }
>> 
>> -  unsigned fdeEncoding = MOFI->getFDEEncoding(UsingCFI);
>> -  unsigned size = getSizeForEncoding(streamer, fdeEncoding);
>> -
>>  // PC Begin
>> -  unsigned PCBeginEncoding = IsEH ? fdeEncoding :
>> -    (unsigned)dwarf::DW_EH_PE_absptr;
>> -  unsigned PCBeginSize = getSizeForEncoding(streamer, PCBeginEncoding);
>> -  EmitSymbol(streamer, *frame.Begin, PCBeginEncoding, "FDE initial location");
>> +  unsigned PCEncoding = IsEH ? MOFI->getFDEEncoding(UsingCFI)
>> +                             : (unsigned)dwarf::DW_EH_PE_absptr;
>> +  unsigned PCSize = getSizeForEncoding(streamer, PCEncoding);
>> +  EmitSymbol(streamer, *frame.Begin, PCEncoding, "FDE initial location");
>> 
>>  // PC Range
>>  const MCExpr *Range = MakeStartMinusEndExpr(streamer, *frame.Begin,
>>                                              *frame.End, 0);
>>  if (verboseAsm) streamer.AddComment("FDE address range");
>> -  streamer.EmitAbsValue(Range, size);
>> +  streamer.EmitAbsValue(Range, PCSize);
>> 
>>  if (IsEH) {
>>    // Augmentation Data Length
>> @@ -1330,7 +1327,7 @@
>>  EmitCFIInstructions(streamer, frame.Instructions, frame.Begin);
>> 
>>  // Padding
>> -  streamer.EmitValueToAlignment(PCBeginSize);
>> +  streamer.EmitValueToAlignment(PCSize);
>> 
>>  return fdeEnd;
>> }
>> 
>> Added: llvm/trunk/test/MC/ELF/fde.s
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/fde.s?rev=161739&view=auto
>> ==============================================================================
>> --- llvm/trunk/test/MC/ELF/fde.s (added)
>> +++ llvm/trunk/test/MC/ELF/fde.s Sun Aug 12 03:09:45 2012
>> @@ -0,0 +1,28 @@
>> +# RUN: llvm-mc -filetype=obj %s -o %t.o && llvm-objdump -s %t.o
>> +# PR13581
>> +
>> +# CHECK: Contents of section .debug_frame:
>> +# CHECK-NEXT:  0000 14000000 ffffffff 01000178 100c0708  ...........x....
>> +# CHECK-NEXT:  0010 90010000 00000000 1c000000 00000000  ................
>> +# CHECK-NEXT:  0020 00000000 00000000 11000000 00000000  ................
>> +# CHECK-NEXT:  0030 410e1086 02430d06                    A....C..
>> +
>> +__cxx_global_var_init:                  # @__cxx_global_var_init
>> +        .cfi_startproc
>> +.Lfunc_begin0:
>> +# BB#0:                                 # %entry
>> +        pushq   %rbp
>> +.Ltmp2:
>> +        .cfi_def_cfa_offset 16
>> +.Ltmp3:
>> +        .cfi_offset %rbp, -16
>> +        movq    %rsp, %rbp
>> +.Ltmp4:
>> +        .cfi_def_cfa_register %rbp
>> +.Ltmp5:
>> +        callq   _Z2rsv at PLT
>> +        movl    %eax, _ZL1i(%rip)
>> +        popq    %rbp
>> +        ret
>> +        .cfi_endproc
>> +        .cfi_sections .debug_frame
>> 
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list