Sumanth Gundapaneni
2015-Jan-29 03:30 UTC
[LLVMdev] CPUStringIsValid() into MCSubtargetInfo and use it for ARM .cpu parsing
Tim,
How about the below option ?
1. Specify an existing generic armv7 CPU or the CPU which is close my custom
variant. My custom variant can be treated as "cortex-a9" + hwdiv.
So my CPU here is "cortex-a9"
2. Specify the ".arch_extension idiv" which is available as an
extension for my custom variant.
3. Teach LLVM & Clang about your CPU's features, either locally or
upstream.
4. Pass "-mhwdiv=arm,thumb" to Clang (or less if you only have hwdiv
in one mode).
--Sumanth G
-----Original Message-----
From: Tim Northover [mailto:t.p.northover at gmail.com]
Sent: Tuesday, January 27, 2015 6:44 PM
To: Sumanth Gundapaneni
Cc: LLVM Developers Mailing List; Roman Divacky; Ana Pazos
Subject: Re: [LLVMdev] CPUStringIsValid() into MCSubtargetInfo and use it for
ARM .cpu parsing
Hi Sumanth,
> Shouldn’t the eabi attributes be honored ?
EABI attributes are instructions for the linker on which object files are
compatible with each other, not instructions for the assembler (and trying to
make them so sounds like a recipe for confusion to me).>From the ARM ABI addenda:
"Build attributes record data that a linker needs to reason mechanically
about the compatibility, or incompatibility, of a set of relocatable
files."
> What should be the approach to fix the issue which I am facing?
There are a few options here:
1. Specify an existing CPU that has hardware division (notably,
Cortex-A9 doesn't).
2. Teach LLVM & Clang about your CPU's features, either locally or
upstream.
3. Pass "-mhwdiv=arm,thumb" to Clang (or less if you only have hwdiv
in one mode).
Cheers.
Tim.
Tim Northover
2015-Jan-29 03:36 UTC
[LLVMdev] CPUStringIsValid() into MCSubtargetInfo and use it for ARM .cpu parsing
> How about the below option ?My options were mutually exclusive, or at least any one of them would allow you to assemble code using sdiv/udiv. You probably don't need to combine them.> 1. Specify an existing generic armv7 CPU or the CPU which is close my custom variant. My custom variant can be treated as "cortex-a9" + hwdiv. So my CPU here is "cortex-a9" > 2. Specify the ".arch_extension idiv" which is available as an extension for my custom variant.This looks like it'd be sufficient (and I didn't know about .arch_extension at all, or I'd have mentioned it. Thanks!).> 3. Teach LLVM & Clang about your CPU's features, either locally or upstream. > 4. Pass "-mhwdiv=arm,thumb" to Clang (or less if you only have hwdiv in one mode).These ought to be unneeded if you do 1+2 above. Cheers. Tim.
Renato Golin
2015-Jan-29 17:03 UTC
[LLVMdev] CPUStringIsValid() into MCSubtargetInfo and use it for ARM .cpu parsing
On 29 January 2015 at 03:36, Tim Northover <t.p.northover at gmail.com> wrote:> These ought to be unneeded if you do 1+2 above.As far as I remember, .arch_extension does change the assembler flags to support whatever you set. Have you tried that? cheers, --renato
Sumanth Gundapaneni
2015-Jan-31 20:29 UTC
[LLVMdev] CPUStringIsValid() into MCSubtargetInfo and use it for ARM .cpu parsing
I have pushed the patch here: http://reviews.llvm.org/D7316 Review it and let me know. --Sumanth G> I have tried ".arch_extension" and it works perfectly fine for me. > I will move ahead and add the arch_extension framework to ARM. > > Thanks for your guidance guys. > --Sumanth G > -----Original Message----- > From: Renato Golin [mailto:renato.golin at linaro.org] > Sent: Thursday, January 29, 2015 9:03 AM > To: Tim Northover > Cc: Sumanth Gundapaneni; Roman Divacky; LLVM Developers Mailing List > Subject: Re: [LLVMdev] CPUStringIsValid() into MCSubtargetInfo and use it > for ARM .cpu parsing > > On 29 January 2015 at 03:36, Tim Northover <t.p.northover at gmail.com> > wrote: >> These ought to be unneeded if you do 1+2 above. > > As far as I remember, .arch_extension does change the assembler flags to > support whatever you set. Have you tried that? > > cheers, > --renato >
Sumanth Gundapaneni
2015-Feb-12 21:53 UTC
[LLVMdev] CPUStringIsValid() into MCSubtargetInfo and use it for ARM .cpu parsing
Renato agreed to the patch. Patch http://reviews.llvm.org/D7316 Waiting for an "approved" bit. It has been there for three days idle.> I have pushed the patch here: http://reviews.llvm.org/D7316 > Review it and let me know. > > --Sumanth G >> I have tried ".arch_extension" and it works perfectly fine for me. >> I will move ahead and add the arch_extension framework to ARM. >> >> Thanks for your guidance guys. >> --Sumanth G >> -----Original Message----- >> From: Renato Golin [mailto:renato.golin at linaro.org] >> Sent: Thursday, January 29, 2015 9:03 AM >> To: Tim Northover >> Cc: Sumanth Gundapaneni; Roman Divacky; LLVM Developers Mailing List >> Subject: Re: [LLVMdev] CPUStringIsValid() into MCSubtargetInfo and use >> it >> for ARM .cpu parsing >> >> On 29 January 2015 at 03:36, Tim Northover <t.p.northover at gmail.com> >> wrote: >>> These ought to be unneeded if you do 1+2 above. >> >> As far as I remember, .arch_extension does change the assembler flags to >> support whatever you set. Have you tried that? >> >> cheers, >> --renato >> > > >
Possibly Parallel Threads
- [LLVMdev] CPUStringIsValid() into MCSubtargetInfo and use it for ARM .cpu parsing
- [LLVMdev] CPUStringIsValid() into MCSubtargetInfo and use it for ARM .cpu parsing
- [LLVMdev] CPUStringIsValid() into MCSubtargetInfo and use it for ARM .cpu parsing
- [LLVMdev] CPUStringIsValid() into MCSubtargetInfo and use it for ARM .cpu parsing
- [LLVMdev] [Compiler-rt] -march=aarch64 flag in gcc/clang