Previously this used a quoted hex string; now it's a number with 0x prefix, just like the .octa directive.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Especially if there is prior art this seems fine to me, especially if we keep the leading zeros.
The leading zeroes look weird to me, but I think in practice it's not going to be an issue anyhow so I think this is good to throw over the wall at the binutils list if you'd like?
Going to LGTM the patch for now as I think the syntax is fine as well.
The leading zeros are because an MD5 hash is defined to be a 128-bit value. MD5Result::digest() returns the full 32-character hex string. I didn't see any value in trying to suppress leading zeros, it's slow and more likely to be confusing than helpful.
The parsing should automatically zero-extend a short value, and as it's identical to .octa parsing (see test\MC\AsmParser\directive_values.s) I didn't bother with one for MD5.