Re: [edk2-devel] ovmf miscompiles with gcc-12

2022-06-08 Thread Andrew Fish via groups.io
Mike, This sounds like a conversation we had years ago? I think we concluded we needed to write stuff in assembler and not depend on implementation choices of the compiler with regard to registers usage? I want to say something broke with Xcode clang. I think it might have been the Emulator

Re: [edk2-devel] ovmf miscompiles with gcc-12

2022-06-08 Thread Jiri Slaby
Hi, On 07. 06. 22, 12:31, Gerd Hoffmann wrote: The reason is TemporaryRamMigration() overwrites rbp unconditionally -- it adds an offset to rbp even if rbp is NOT used as a frame pointer Now, what is the right way to fix this? Do the SetJump/LongJump in assembly and wrap it into push rbp/pop

Re: [edk2-devel] ovmf miscompiles with gcc-12

2022-06-08 Thread Jiri Slaby
On 07. 06. 22, 13:07, Gerd Hoffmann wrote: On Tue, Jun 07, 2022 at 12:38:46PM +0200, Jiri Slaby wrote: Hi, On 07. 06. 22, 12:31, Gerd Hoffmann wrote: The reason is TemporaryRamMigration() overwrites rbp unconditionally -- it adds an offset to rbp even if rbp is NOT used as a frame pointer

Re: [edk2-devel] ovmf miscompiles with gcc-12

2022-06-07 Thread Gerd Hoffmann
On Tue, Jun 07, 2022 at 12:38:46PM +0200, Jiri Slaby wrote: > Hi, > > On 07. 06. 22, 12:31, Gerd Hoffmann wrote: > > > The reason is TemporaryRamMigration() overwrites rbp unconditionally -- it > > > adds an offset to rbp even if rbp is NOT used as a frame pointer > > > > > Now, what is the

Re: [edk2-devel] ovmf miscompiles with gcc-12

2022-06-07 Thread Gerd Hoffmann
Hi, > The reason is TemporaryRamMigration() overwrites rbp unconditionally -- it > adds an offset to rbp even if rbp is NOT used as a frame pointer > Now, what is the right way to fix this? Do the SetJump/LongJump in assembly > and wrap it into push rbp/pop rbp? push/pop rbp will break in

Re: [edk2-devel] ovmf miscompiles with gcc-12

2022-05-26 Thread joeyli via groups.io
Hi all, I have filed this issue on tianocore bugzilla: Bug 3934 - ovmf miscompiles with gcc-12 https://bugzilla.tianocore.org/show_bug.cgi?id=3934 Thanks Joey Lee On Thu, May 19, 2022 at 07:43:12AM +0200, Jiri Slaby via groups.io wrote: > Hi, > > we discovered that qemu-ovmf-x86_64 doesn't

[edk2-devel] ovmf miscompiles with gcc-12

2022-05-19 Thread Jiri Slaby
Hi, we discovered that qemu-ovmf-x86_64 doesn't start when compiled using gcc-12. Originally reported as: https://bugzilla.suse.com/show_bug.cgi?id=1199597 I run qemu as: qemu-kvm -drive file=/dev/null,format=raw -drive if=pflash,format=raw,unit=0,readonly=on,file=OVMF.fd -m 3000 The