http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59672
Bug ID: 59672 Summary: Add -m16 support for x86 Product: gcc Version: unknown Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: hpa at zytor dot com It would be a very good thing to have an official way to generate 16-bit binaries on x86 (i386), even if all that is provided is a command-line flag that issues a .code16gcc assembly directive first in the generated assembly file. In the Linux kernel, we currently have to do a bunch of hacks to make sure that gcc doesn't issue any instructions *before* the .code16gcc directive: $(call cc-option, -fno-toplevel-reorder,\ $(call cc-option, -fno-unit-at-a-time)) \ $(call cc-option, -fno-stack-protector) \ ... and the list is likely to grow, which is why providing an actually supported compiler flag for this would be desirable.