Re: PATCH: PR target/59672: Add -m16 support for x86

2014-01-29 Thread H.J. Lu
On Wed, Jan 29, 2014 at 8:52 AM, Jakub Jelinek wrote: > 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 al

Re: PATCH: PR target/59672: Add -m16 support for x86

2014-01-29 Thread Jakub Jelinek
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. Ad

Re: PATCH: PR target/59672: Add -m16 support for x86

2014-01-29 Thread H.J. Lu
On Wed, Jan 29, 2014 at 6:41 AM, Alexander Monakov wrote: > > On Wed, 29 Jan 2014, H.J. Lu wrote: >> Since the .code16gcc directive was added to binutils back in 1999, >> it is older than the minimum binutils required for x86 GCC. There >> is no need to specify a separate minimum binutils for it.

Re: PATCH: PR target/59672: Add -m16 support for x86

2014-01-29 Thread Alexander Monakov
On Wed, 29 Jan 2014, H.J. Lu wrote: > Since the .code16gcc directive was added to binutils back in 1999, > it is older than the minimum binutils required for x86 GCC. There > is no need to specify a separate minimum binutils for it. It's not clear to me why the compiler should be involved in pro

Re: PATCH: PR target/59672: Add -m16 support for x86

2014-01-29 Thread H.J. Lu
On Wed, Jan 29, 2014 at 1:52 AM, Richard Biener wrote: > On Tue, 28 Jan 2014, Uros Bizjak wrote: > >> On Mon, Jan 27, 2014 at 8:44 PM, H.J. Lu wrote: >> >> > The .code16gcc directive was added to binutils back in 1999: >> > >> > --- >> >'.code16gcc' provides experimental support for generatin

Re: PATCH: PR target/59672: Add -m16 support for x86

2014-01-29 Thread Richard Biener
On Tue, 28 Jan 2014, Uros Bizjak wrote: > On Mon, Jan 27, 2014 at 8:44 PM, H.J. Lu wrote: > > > The .code16gcc directive was added to binutils back in 1999: > > > > --- > >'.code16gcc' provides experimental support for generating 16-bit code > > from gcc, and differs from '.code16' in that '

Re: PATCH: PR target/59672: Add -m16 support for x86

2014-01-28 Thread H.J. Lu
On Tue, Jan 28, 2014 at 3:42 PM, Gerald Pfeifer wrote: > On Tue, 28 Jan 2014, H.J. Lu wrote: >> Here is the patch for changes.html. OK to install? > > Yes. Just say "command-line option" please. > This is what I checked in. Thanks. -- H.J. --- Index: changes.html

Re: PATCH: PR target/59672: Add -m16 support for x86

2014-01-28 Thread Gerald Pfeifer
On Tue, 28 Jan 2014, H.J. Lu wrote: > Here is the patch for changes.html. OK to install? Yes. Just say "command-line option" please. Thanks, Gerald

Re: PATCH: PR target/59672: Add -m16 support for x86

2014-01-28 Thread H.J. Lu
On Tue, Jan 28, 2014 at 8:42 AM, Uros Bizjak wrote: > On Tue, Jan 28, 2014 at 5:35 PM, H.J. Lu wrote: > > The .code16gcc directive was added to binutils back in 1999: > >> scan-asm testcase doesn't do anything useful. The only >> difference in assembly code between -m16 and -m32 is the >> .c

Re: PATCH: PR target/59672: Add -m16 support for x86

2014-01-28 Thread Jakub Jelinek
On Tue, Jan 28, 2014 at 08:35:13AM -0800, H.J. Lu wrote: > Here is a run-time test. It builds 16-bit image for BIOS and > loads it into qemu-system-i386. OK to install? Ugh, I'd say we don't want this kind of stuff in gcc testsuite. A scan-assembler would be IMHO enough. > PR target/59672 > * g

Re: PATCH: PR target/59672: Add -m16 support for x86

2014-01-28 Thread Uros Bizjak
On Tue, Jan 28, 2014 at 5:01 PM, Uros Bizjak wrote: > On Mon, Jan 27, 2014 at 8:44 PM, H.J. Lu wrote: > >> The .code16gcc directive was added to binutils back in 1999: >> >> --- >>'.code16gcc' provides experimental support for generating 16-bit code >> from gcc, and differs from '.code16' in

Re: PATCH: PR target/59672: Add -m16 support for x86

2014-01-28 Thread H.J. Lu
On Tue, Jan 28, 2014 at 8:01 AM, Uros Bizjak wrote: > On Mon, Jan 27, 2014 at 8:44 PM, H.J. Lu wrote: > >> The .code16gcc directive was added to binutils back in 1999: >> >> --- >>'.code16gcc' provides experimental support for generating 16-bit code >> from gcc, and differs from '.code16' in

Re: PATCH: PR target/59672: Add -m16 support for x86

2014-01-28 Thread Uros Bizjak
On Tue, Jan 28, 2014 at 5:35 PM, H.J. Lu wrote: The .code16gcc directive was added to binutils back in 1999: > scan-asm testcase doesn't do anything useful. The only > difference in assembly code between -m16 and -m32 is the > .code16gcc directive All magic is done in assembler. The test

Re: PATCH: PR target/59672: Add -m16 support for x86

2014-01-28 Thread H.J. Lu
On Tue, Jan 28, 2014 at 8:30 AM, Uros Bizjak wrote: > On Tue, Jan 28, 2014 at 5:01 PM, Uros Bizjak wrote: >> On Mon, Jan 27, 2014 at 8:44 PM, H.J. Lu wrote: >> >>> The .code16gcc directive was added to binutils back in 1999: >>> >>> --- >>>'.code16gcc' provides experimental support for gener

Re: PATCH: PR target/59672: Add -m16 support for x86

2014-01-28 Thread Uros Bizjak
On Mon, Jan 27, 2014 at 8:44 PM, H.J. Lu wrote: > The .code16gcc directive was added to binutils back in 1999: > > --- >'.code16gcc' provides experimental support for generating 16-bit code > from gcc, and differs from '.code16' in that 'call', 'ret', 'enter', > 'leave', 'push', 'pop', 'pusha

PATCH: PR target/59672: Add -m16 support for x86

2014-01-27 Thread H.J. Lu
Hi, The .code16gcc directive was added to binutils back in 1999: --- '.code16gcc' provides experimental support for generating 16-bit code from gcc, and differs from '.code16' in that 'call', 'ret', 'enter', 'leave', 'push', 'pop', 'pusha', 'popa', 'pushf', and 'popf' instructions default to 3