[x86] Use 16-bit addressing where possible in 16-bit mode
authorDavid Woodhouse <dwmw2@infradead.org>
Wed, 8 Jan 2014 12:58:18 +0000 (12:58 +0000)
committerDavid Woodhouse <dwmw2@infradead.org>
Wed, 8 Jan 2014 12:58:18 +0000 (12:58 +0000)
commit4f32ce2436d11f4de00db677f2c1d0a4022dbcfe
tree62a31cd9cbf764d7023ccc94b4f629d5967407e4
parent975fe2cfc34c605746a644e96ff2cb96a7855131
[x86] Use 16-bit addressing where possible in 16-bit mode

Where "where possible" means that it's an immediate value and it's below
0x10000. In fact GAS will either truncate or error with larger values,
and will insist on using the addr32 prefix to get 32-bit addressing. So
perhaps we should do that, in a later patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198758 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
test/MC/X86/x86-16.s