[PATCH] Extend C disassembler API to allow specifying target features

Bradley Smith bradley.smith at arm.com
Fri Sep 26 02:16:58 PDT 2014


================
Comment at: test/Bindings/llvm-c/disassemble.test:14
@@ +13,3 @@
+;CHECK: b0                           ???
+;CHECK: f3                           ???
+
----------------
rengolin wrote:
> these checks look weird
I did both the positive and negative checks here so that the test doesn't need to worry about the default subtarget features for the architecture, (for armv8 +crypto is default, so the -crypto test is actually the one checking if the feature string is used properly).

================
Comment at: tools/llvm-c-test/disassemble.c:83
@@ -76,3 +82,3 @@
   }
-  do_disassemble(triple, disbuf, disbuflen);
+  do_disassemble(triple, features, disbuf, disbuflen);
 }
----------------
rengolin wrote:
> will there be any string validation further on? If yes, why do you do the NULL validation above? If not, shouldn't we add it?
The feature string is passed straight through to createMCSubtargetInfo which I don't think accepts NULL as a value, there is certainty a lot of precedence in the codebase for using "" as an empty feature string instead of NULL.

http://reviews.llvm.org/D5468






More information about the llvm-commits mailing list