From ddf8985325cf12296888e5f4214fa1f2ec26b727 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Thu, 23 Jan 2014 14:32:46 +0000 Subject: [PATCH] Add documentation for -m16 option on X86, fix typo llvm-svn: 199894 --- clang/docs/UsersManual.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst index fb5cda5059d2..d832f99baed0 100644 --- a/clang/docs/UsersManual.rst +++ b/clang/docs/UsersManual.rst @@ -1329,9 +1329,16 @@ to correctly compile many large C, C++, Objective-C, and Objective-C++ codebases. On ``x86_64-mingw32``, passing i128(by value) is incompatible with the -Microsoft x64 calling conversion. You might need to tweak +Microsoft x64 calling convention. You might need to tweak ``WinX86_64ABIInfo::classify()`` in lib/CodeGen/TargetInfo.cpp. +For the X86 target, clang supports the :option:`-m16` command line +argument which enables 16-bit code output. This is broadly similar to +using ``asm(".code16gcc")`` with the GNU toolchain. The generated code +and the ABI remains 32-bit but the assembler emits instructions +appropriate for a CPU running in 16-bit mode, with address-size and +operand-size prefixes to enable 32-bit addressing and operations. + ARM ^^^ -- GitLab