[PATCH] Implement ARM EHABI

Logan Chien tzuhsiang.chien at gmail.com
Tue Apr 16 11:56:31 PDT 2013


Dear all,

  I am trying to work on the .unwind directives in the AsmParser.  There's
the incomplete patch<https://github.com/loganchien/llvm/compare/master...add-arm-unwind-directives>which
you may be interested in.  Currently, it implements most of the
existing directives which are used by Clang.  It is incomplete because:

(1) The test case coverage is not high enough.
(2) Several directives are not implemented yet: ".movsp",
".personality_index", and etc.
(3) The diagnostic is not implemented well.  Several assertions should
always be checked.

  I will try to finish them ASAP.

Sincerely,
Logan


On Tue, Apr 16, 2013 at 11:40 AM, Ilyong Cho <ilyoan at gmail.com> wrote:

> Thank you for response.
>
> Does llvm-mc deal with unwind directive? That's awsome!
>
> I've posted a snippet here( https://gist.github.com/ILyoan/5392936). I've
> only posted stack related parts with comments but it contains all
> information to exception table. So I believe you can test with it.
>
> Regards
> Ilyong Cho
>  Hi,
>
>   Sorry for the late reply.  I have read your patch.  It seems that there
> are several differences.  Maybe we can cooperate to merge them in to one
> patch (if you don't mind.)
>
> *1. Add new .movsp directive.*
>
> This part LGTM.
>
> *2. Much more delicate algorithm for $SP offset. *
>
> I have to admit that the algorithm in my patch is likely to be different
> from the one in gas.  Due to the lack of documentation, I have to guess the
> algorithm by disassembling the object files generated by gas.  Since I have
> only tested them with the assembly files generated by clang, it might be
> incompatible with gas when they are used as an assembler.  Especially, when
> there are multiple .setfp directives in a function.
>
> May you attach the assembly file that you are trying to assemble?  I can
> try to deal with llvm-mc these days.
>
> Sincerely,
> Logan
>
>
>
> On Mon, Apr 15, 2013 at 5:30 PM, Ilyong Cho <ilyoan at gmail.com> wrote:
>
>> Or we can just ignore such cases.
>> Becasue it's very very weird and at least there is a another option to
>> conpile it :)
>>
>> Regards
>> Ilyong Cho
>> 2013. 4. 15. 오후 6:26에 "Ilyong Cho" <ilyoan at gmail.com>님이 작성:
>>
>> Ooops I've accidently pushed send button :)
>>>
>>> Anyway, IMO, There is no problem the patch from Logan regarding to the
>>> issue I mentioned, because there is no way to produce the case right now.
>>> But after llvm-mc understand unwind directive, it can be the case.
>>>
>>> Regards,
>>> Ilyong Cho
>>> 2013. 4. 15. 오후 6:12에 "Ilyong Cho" <ilyoan at gmail.com>님이 작성:
>>>
>>>> Hi Anton
>>>>
>>>> Actually I'm not sure if it is possible to make such test cases using
>>>> higher language. And llvm-mc looks like does not understand unwind
>>>> directives(am I right?) so it is impossible to make test case using llvm-mc.
>>>>
>>>> The counter example is a wired situation that pushes the same register
>>>> into stack twice from function prologue(I just analyzed reviewing source
>>>> code, so I can be wrong). There are some such handmade assemblies In my
>>>> personal project for some reasons(ex. stack manipulation)
>>>> And I'm pretty sure that higher language compilers never generate such
>>>> assembly.
>>>>  2013. 4. 15. 오후 5:28에 "Anton Korobeynikov" <anton at korobeynikov.info>님이
>>>> 작성:
>>>>
>>>>> Hello,
>>>>>
>>>>> > I've juat looked the patch and I think it looks good but I found the
>>>>> > implementation of that patch is different from gas's. I have a weird
>>>>> use
>>>>> > case (hand made ARM assembly with a complex function prologue) that
>>>>> the
>>>>> > patch on D414 couldn't cover but gas implementation(and mine) could
>>>>> cover.
>>>>> Will it be possible for you to provide a testcase then? Knowing that
>>>>> the code is broken is not a good thing for committing it :)
>>>>>
>>>>> --
>>>>> With best regards, Anton Korobeynikov
>>>>> Faculty of Mathematics and Mechanics, Saint Petersburg State University
>>>>>
>>>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130417/135cabf8/attachment.html>


More information about the llvm-commits mailing list