DWARF: Use .short to render half-machine-words
authorBen Gamari <bgamari.foss@gmail.com>
Mon, 26 Jun 2017 20:27:11 +0000 (16:27 -0400)
committerBen Gamari <ben@smart-cactus.org>
Mon, 26 Jun 2017 20:27:12 +0000 (16:27 -0400)
commit904255eb9b537103898fb5f6b73df9b53ca7fd93
tree3ba74f02add2fc746e6cd1593992eb2e2ba47794
parenta48464a7d2858bad28cfd1f393e82589825e62db
DWARF: Use .short to render half-machine-words

The binutils documentation states that .short is a synonym for .word,
which I assumed to mean "machine word", leading me to believe that we
needed to use .hword to render half-machine-words. However, Darwin's
toolchain doesn't understand .hword, so there we instead used .short.

However, as it turns out the binutils documentation confusingly uses
"word" to refer to a 16-bit word, so .short should work fine. Moreover,
LLVM's internal assembler also doesn't understand .hword, so using
.short consistently simplies things remarkably.

Test Plan: Validate using binutils and LLVM internal assembler,
validate on Darwin

Reviewers: niteria, austin

Reviewed By: niteria

Subscribers: rwbarton, thomie

GHC Trac Issues: #13866

Differential Revision: https://phabricator.haskell.org/D3667
compiler/nativeGen/Dwarf/Types.hs