Re: [LLVMdev] clang .code16 with -Os producing larger code that it needs to

2015-02-20 Thread Rafael Espíndola
> Your task, should you choose to accept it, is to make it cope with other > forms of relaxation where necessary. And if not, please open a bug :-) There are a few other missing cases that cause MC to produce code that is more "relaxed" than it needs to be. Cheers, Rafael __

Re: clang .code16 with -Os producing larger code that it needs to

2015-02-20 Thread David Woodhouse
On Fri, 2015-02-20 at 16:46 +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > > All labels are local to the source file. If I use %eax instead of %ebx > in first example I get the short code. For the second example how does > clang detect that offset fits into one byte for issuing EB XX sequen

Re: clang .code16 with -Os producing larger code that it needs to

2015-02-20 Thread David Woodhouse
On Fri, 2015-02-20 at 16:05 +, David Woodhouse wrote: > > It's been a while since I looked at this... but I think for the short > jumps we just emit the 8-bit version and there's a fixup which can go > back and re-emit the instruction in 32-bit mode if it finds it doesn't > fit? > > Do we jus

Re: clang .code16 with -Os producing larger code that it needs to

2015-02-20 Thread David Woodhouse
On Fri, 2015-02-20 at 15:58 +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > When experimenting with compiling GRUB2 with clang using integrated as, > I found out that it generates a 16-bit code bigger than gas counterpart > and result gets too big for size constraints of bootsector. This was

Re: [PATCH 07/18] efi: run EFI specific code on EFI platform only

2015-02-20 Thread Jan Beulich
>>> On 30.01.15 at 18:54, wrote: > --- a/xen/arch/x86/shutdown.c > +++ b/xen/arch/x86/shutdown.c > @@ -504,7 +504,8 @@ void machine_restart(unsigned int delay_millisecs) > tboot_shutdown(TB_SHUTDOWN_REBOOT); > } > > -efi_reset_system(reboot_mode != 0); > +if ( efi_platform

Re: [PATCH 05/18] efi: split efi_enabled to efi_platform and efi_loader

2015-02-20 Thread Jan Beulich
>>> On 30.01.15 at 18:54, wrote: > We need more fine grained knowledge about EFI environment and check > for EFI platform and EFI loader separately to properly support > multiboot2 protocol. ... because of ... (i.e. I can't see from the description what the separation is good for). Looking at the

Re: [PATCH 04/18] xen/x86: add multiboot2 protocol support

2015-02-20 Thread Jan Beulich
>>> On 30.01.15 at 18:54, wrote: > --- a/xen/arch/x86/boot/Makefile > +++ b/xen/arch/x86/boot/Makefile > @@ -1,6 +1,7 @@ > obj-bin-y += head.o > > -RELOC_DEPS = $(BASEDIR)/include/asm-x86/config.h > $(BASEDIR)/include/xen/multiboot.h > +RELOC_DEPS = $(BASEDIR)/include/asm-x86/config.h > $(BAS

Re: clang .code16 with -Os producing larger code that it needs to

2015-02-20 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 20.02.2015 16:38, David Woodhouse wrote: > On Fri, 2015-02-20 at 15:58 +0100, Vladimir 'φ-coder/phcoder' Serbinenko > wrote: >> When experimenting with compiling GRUB2 with clang using integrated as, >> I found out that it generates a 16-bit code bigger than gas counterpart >> and result gets to

Re: clang .code16 with -Os producing larger code that it needs to

2015-02-20 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 20.02.2015 15:58, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > When experimenting with compiling GRUB2 with clang using integrated as, > I found out that it generates a 16-bit code bigger than gas counterpart > and result gets too big for size constraints of bootsector. This was > traced mainl

clang .code16 with -Os producing larger code that it needs to

2015-02-20 Thread Vladimir 'φ-coder/phcoder' Serbinenko
When experimenting with compiling GRUB2 with clang using integrated as, I found out that it generates a 16-bit code bigger than gas counterpart and result gets too big for size constraints of bootsector. This was traced mainly to 2 problems. 32-bit access to 16-bit addresses. source: movl