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

David Majnemer david.majnemer at gmail.com
Fri Jan 31 11:07:51 PST 2014



================
Comment at: lib/MC/MCParser/AsmParser.cpp:2449
@@ +2448,3 @@
+
+  if (!isUInt<32>(FillExpr) && FillSize == 8) {
+    Warning(ExprLoc, "'.fill' directive pattern has been truncated to 32-bits");
----------------
Rafael Ávila de Espíndola wrote:
> Same question. What if FillSize is 7. Will gas not truncate the value? Please check what gas actually does, the manual can miss the details or be out of date.
```$ echo '.data\n .fill 1, 7, 1<<32' | as
$ objdump -s

a.out:     file format elf64-x86-64

Contents of section .data:
 0000 00000000 000000                      .......
```

Seems like I have to make this fire when FillSize > 4



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



More information about the llvm-commits mailing list