[PATCH] Implement the ldr-pseudo opcode for ARM assembly

Renato Golin renato.golin at linaro.org
Wed Dec 4 00:10:21 PST 2013


Hi David,

I can't seem to find the phabricator link...

--renato

On 4 December 2013 02:02, David Peixotto <dpeixott at codeaurora.org> wrote:
> Ping.
>
>
>
> Still waiting for internal approval for phabricator. Would it be ok to
> conduct the review the old-fashioned way for now?
>
>
>
>
>
> From: llvm-commits-bounces at cs.uiuc.edu
> [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of David Peixotto
> Sent: Monday, November 25, 2013 2:36 PM
> To: 'Renato Golin'
>
>
> Cc: 'Commit Messages and Patches for LLVM'
> Subject: RE: [PATCH] Implement the ldr-pseudo opcode for ARM assembly
>
>
>
> Hi Rentao,
>
>
>
> I'm working on getting internal approval to upload patches to phabrictor. I
> agree that it is much easier to review that way. Not sure how long it will
> take to get approval, but I'm working twords it.
>
>
>
> -David
>
>
>
>
>
> From: Renato Golin [mailto:renato.golin at linaro.org]
> Sent: Monday, November 25, 2013 11:21 AM
> To: David Peixotto
> Cc: Jim Grosbach; Commit Messages and Patches for LLVM
> Subject: Re: [PATCH] Implement the ldr-pseudo opcode for ARM assembly
>
>
>
> Hi David,
>
>
>
> Sorry it's taking so long, many other things flying around...
>
>
>
> Can you attach your patch to phabricator? First the original one, than this
> one, so it's easier to see what's the difference between the original
> proposal and the current. Otherwise, we'll have to go through the whole
> patch every time...
>
>
>
> cheers,
>
> --renato
>
>
>
> On 22 November 2013 18:25, David Peixotto <dpeixott at codeaurora.org> wrote:
>
> ping
>
>
>
> From: llvm-commits-bounces at cs.uiuc.edu
> [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of David Peixotto
> Sent: Wednesday, November 20, 2013 11:51 AM
>
>
> To: 'Jim Grosbach'
> Cc: 'Commit Messages and Patches for LLVM'
> Subject: RE: [PATCH] Implement the ldr-pseudo opcode for ARM assembly
>
>
>
> I've attached updated patches that contain the corresponding tests for
> darwin. I also modifed the patch to use MCContext::CreateTempSymbol()
> instead of creating the symbols explicitly.
>
>
>
> Please help to review this change.
>
>
>
> From: llvm-commits-bounces at cs.uiuc.edu
> [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of David Peixotto
> Sent: Tuesday, November 19, 2013 7:39 PM
> To: 'Jim Grosbach'
> Cc: 'Commit Messages and Patches for LLVM'
> Subject: RE: [PATCH] Implement the ldr-pseudo opcode for ARM assembly
>
>
>
> I've converted the ARM tests in ldr-pseudo.s to run for darwin and they are
> passing. The darwin tests for arm are attached. I have not converted the
> thumb1 and thumb2 tests yet.
>
>
>
> Compared to the linux tests, I made the following changes:
>
>
>
> 1. Adjust CHECK lines for the address of the constant pool entries. Needed
> because with llvm-objdump -d, new sections do not start at address zero, but
> continue from end of previous section. However, llvm-objdump -r still prints
> relocation addresses as offset from the section.
>
> 2. Adjust CHECK lines for the type of relocation: R_ARM_ABS32(linx) vs.
> ARM_RELOC_VANILLA(darwin)
>
> 3. Adjust the CHECK lines for the reloc value in the constant pools for
> known symbols. For darwin it contains the address in the section rather than
> the offset from the symbol (e.g. see test in section h that has a relocation
> with value 3c in section d rather than offset 0 from symbol f5).
>
>
>
> None of the pc-relative loads in the generated ldr instructions needed to
> change. For the linux tests, I had gcc to compare against for the correct
> output. It is more difficult for me to verify the results on darwin. The
> changes look reasonable to me, but I would appreciate any feedback/help on
> the test.
>
>
>
> Thanks,
>
> -David
>
>
>
> From: David Peixotto [mailto:dpeixott at codeaurora.org]
> Sent: Tuesday, November 19, 2013 6:01 PM
> To: 'Jim Grosbach'
> Cc: 'Commit Messages and Patches for LLVM'
> Subject: RE: [PATCH] Implement the ldr-pseudo opcode for ARM assembly
>
>
>
> Hi Jim,
>
>
>
> I had thought that these set of tests would be ok because I was using the
> machine independent assembler apis, but I can see that I have made a bad
> assumption. I will add the corresponding tests for darwin.
>
>
>
> (As an aside, I just tried a quick test with the first example from
> ldr-pseudo.s and it did not complain about the labels. I'm used the same
> commands, but switched the target to armv7-darwin-apple and updated the
> .section syntax. In any case I will fix the labels to use real temporaries,
> but let me know if there is a better way to test for darwin).
>
>
>
> As for the subsections-via-symbols, I had looked for a test that I could
> follow, but did not see anything. Based on our discussion it seems that
> pc-relative loads across symbols is undefined behavior. So even the existing
> ldr <label> instructions should have a problem, right? Is there some test
> you can point me to that checks for this or some testing guidance you can
> provide? I'm not quite sure what the correct behavior should be here.
>
>
>
> -David
>
>
>
>
>
> From: Jim Grosbach [mailto:grosbach at apple.com]
> Sent: Tuesday, November 19, 2013 4:56 PM
> To: David Peixotto
> Cc: Commit Messages and Patches for LLVM
> Subject: Re: [PATCH] Implement the ldr-pseudo opcode for ARM assembly
>
>
>
> Hi David,
>
>
>
> As far as I can tell, these patches don’t handle the subsections-via-symbols
> or anything else Darwin related at all. Am I missing something? For a
> trivial example, the label names are not going to work at all on Darwin.
>
>
>
> -Jim
>
>
>
> On Nov 15, 2013, at 6:00 PM, David Peixotto <dpeixott at codeaurora.org> wrote:
>
>
>
> Attached are 3 patches that together implement the ldr pseudo for arm and
> the .ltorg directive. Please help to review these patches.
>
>
>
> Thanks,
>
> David
>
>
>
> -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by The Linux Foundation
>
>
>
>
>
> <0001-Add-a-finishParse-callback-to-the-targer-asm-parser.patch><0002-Implement-the-ldr-pseudo-opcode-for-ARM-assembly.patch><0003-Implement-the-.ltorg-directive-for-ARM-assembly.patch>_______________________________________________
> 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