[LLVMdev] CPUStringIsValid() into MCSubtargetInfo and use it for ARM .cpu parsing

Tim Northover t.p.northover at gmail.com
Wed Jan 28 19:36:10 PST 2015


> 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.



More information about the llvm-dev mailing list