[PATCH] [arm] Implement ARM .arch directive.
richard.barton at arm.com
Mon Nov 11 06:36:31 PST 2013
I dont see any problems with the detail of the patch, although I haven't looked over the fine detail of each test case output.
I'm worried that we have started recording information about build attributes in two different places, especially mappings between cpu/fpus and default attribute values. We have added a lot of build attributes generation code to ARMAsmPrinter, including generation of Tag_CPU_name, and Tag_ARM_ISA_use, etc. that queries the ARMSubtarget object created for codegen. It would be great to unify the two codepaths for the ELFStreamer and the AsmPrinter.
Would it be feasible for the ELFStreamer to create an ARMSubtarget object from the textual attributes that it parses? That way we could use the same code to emit attributes for both the AsmPrinter and ELFStreamer and we would not have to worry about the two codepaths getting out of step with eachother.
What do you think?
Comment at: lib/Target/ARM/MCTargetDesc/ARMArchName.def:22
@@ +21,3 @@
+// ARM_ARCH_NAME(NAME, ID, DEFAULT_CPU_NAME, DEFAULT_CPU_ARCH)
+ARM_ARCH_NAME("armv2", ARMV2, "2", v4)
+ARM_ARCH_NAME("armv2a", ARMV2A, "2A", v4)
Formatting bug space before v4
More information about the llvm-commits