[PATCH] MC: Improve the .fill directive's compatibility with GAS

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Fri Jan 31 10:25:17 PST 2014


  Please also add tests for the new warnings.


================
Comment at: lib/MC/MCParser/AsmParser.cpp:2445
@@ +2444,3 @@
+  if (FillSize > 8) {
+    Warning(SizeLoc, "'.fill' directive with negative size has no effect");
+    NumValues = 8;
----------------
this warning looks like a copy and paste error.

================
Comment at: lib/MC/MCParser/AsmParser.cpp:2450
@@ +2449,3 @@
+  if (!isUInt<32>(FillExpr) && FillSize == 8) {
+    Warning(ExprLoc, "'.fill' directive pattern has been truncated to 32-bits");
+    FillExpr = Lo_32(FillExpr);
----------------
Why? Does gas really use only the lower 32 bits? Why only if FillSize is 8? What about 5 6 and 7?

================
Comment at: test/CodeGen/PowerPC/i128-and-beyond.ll:1
@@ -1,2 +1,2 @@
-; RUN: llc < %s -march=ppc32 | grep 4294967295 | count 28
+; RUN: llc < %s -march=ppc32 | grep '\(\\377\)\{8\}' | count 14
 
----------------
Please convert to FileCheck.

================
Comment at: test/MC/AsmParser/directive_fill.s:36
@@ +35,3 @@
+# CHECK: TEST5
+# CHECK: .asciz "\002\000"
+# CHECK: .asciz "\002\000"
----------------
Why is this repeating 4 times?


http://llvm-reviews.chandlerc.com/D2667



More information about the llvm-commits mailing list