This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR target/59672: Add -m16 support for x86
- From: Jakub Jelinek <jakub at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Alexander Monakov <amonakov at ispras dot ru>, Richard Biener <rguenther at suse dot de>, Uros Bizjak <ubizjak at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 29 Jan 2014 17:52:57 +0100
- Subject: Re: PATCH: PR target/59672: Add -m16 support for x86
- Authentication-results: sourceware.org; auth=none
- References: <20140127194457 dot GA12183 at intel dot com> <CAFULd4YBgcMtNVX8_7yYJ_7NStPu+g0axqhBJLeUTazfwRTnSA at mail dot gmail dot com> <alpine dot LSU dot 2 dot 11 dot 1401291048560 dot 469 at zhemvz dot fhfr dot qr> <CAMe9rOr_kuEAmN-59Oq=1h_c-=bAuGu-sVQaQJD6LgYf_C1H5w at mail dot gmail dot com> <alpine dot LNX dot 2 dot 00 dot 1401291828130 dot 7276 at monopod dot intra dot ispras dot ru> <CAMe9rOr6BjjCCP8gTPSwpxz9njr22SqTmUYQjXSou-v+O9PdwQ at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Jan 29, 2014 at 08:39:55AM -0800, H.J. Lu wrote:
> -m16 is used by Linux kernel, which checks if the compiler supports -m16
> and uses it if it does. Adding gas --code16gcc check is an additional change
> in Linux kernel. Clang already supports -m16, which generates objects
> directly. Adding gas --code16gcc check doesn't help clang. Add -m16
> to gcc makes gcc and clang consistent to Linux kernel build.
Not everything clang/llvm comes up with is a good idea to follow (numerous
examples in mind, won't list them here, don't want to start a flamewar).
Given that .code16gcc is really a hack in the assembler, I really think it
would be much better idea to just let kernel use -Wa,--code16gcc for this hack.
Sure, if somebody started a full-blown 16-bit code generation support as
opposed to .code16gcc, -m16 would make sense (unless it would be a separate
backend).
Jakub