In case of "krait" CPU, asm printer doesn't emit any ".cpu" so the
features bits are not computed. This patch lets the asm printer
emit ".cpu cortex-a9" directive for krait and the hwdiv feature is
enabled through ".arch_extension". In short, krait is treated
as "cortex-a9" with hwdiv. We can not emit ".krait" as CPU since
it is not supported bu GNU GAS yet.
Details
Diff Detail
Event Timeline
lib/Target/ARM/ARMAsmPrinter.cpp | ||
---|---|---|
709 | I was looking around and emitting plain text of a hardcoded value here would be a bad idea. I think you need to create/append an enum and do like FPU/CPU/ARCH. |
lib/Target/ARM/ARMAsmPrinter.cpp | ||
---|---|---|
709 | Renato, Can you be more specifc on this ? |
lib/Target/ARM/ARMAsmPrinter.cpp | ||
---|---|---|
709 | see emitFPU(). Valid values for name are the same as those accepted as architectural extensions by the -mcpu commandline option. The same duplication that emitFPU has introduced (by adding the ARMFPUName.def) will need to be introduced, and that will all go away once we unify the parsers. For now, let's have it in the same way, so I can wipe them out all at once later. |
With the comment inline sorted, LGTM, thanks!
lib/Target/ARM/ARMAsmPrinter.cpp | ||
---|---|---|
707 | Can you move this up with the first check? I think it'll be easier to "remove Krait" later, as the FIXME hints to. |
lib/Target/ARM/ARMAsmPrinter.cpp | ||
---|---|---|
707 | Sure. I will do that and commit this patch. |
This patch is breaking the mips bot here.
Any idea why ?
http://lab.llvm.org:8011/builders/llvm-mips-linux/builds/12343/steps/configure/logs/stdio
Can you move this up with the first check? I think it'll be easier to "remove Krait" later, as the FIXME hints to.