Re: [x86 setup 13/33] Header file to produce 16-bit code with gcc

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: H. Peter Anvin <hpa@...>
Cc: Andi Kleen <ak@...>, <linux-kernel@...>, <linux-arch@...>, <akpm@...>
Date: Tuesday, July 10, 2007 - 4:08 pm

>>>> gcc for i386 can be used with the assembly prefix ".code16gcc" to

This would be even more fragile.  The exact format of GCC's
assembler code output isn't defined at all, so in principle
this is a hopeless task.  In practice just putting the
.code16gcc directive on the first line would likely work
though, GCC never generates a .code32 AFAIK, but it isn't
guaranteed that this will work (or will keep working).


-fno-unit-at-a-time is the default on three year old compilers,
yes.  Newer compilers have unit-at-a-time enabled by default.


An asm() outside of a function is a top-level thing, just
like functions and file-scope variable definitions, and with
unit-at-a-time compilation all such blocks can be reordered
(or even omitted, or inlined, or whatever).  Note that even
before unit-at-a-time was introduced there was no guarantee
of emitting everything in the order it appears in the source
file.


Segher

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [x86 setup 13/33] Header file to produce 16-bit code wit..., Segher Boessenkool, (Tue Jul 10, 10:16 am)
Re: [x86 setup 13/33] Header file to produce 16-bit code wit..., Segher Boessenkool, (Tue Jul 10, 3:57 pm)
Re: [x86 setup 13/33] Header file to produce 16-bit code wit..., Segher Boessenkool, (Tue Jul 10, 5:10 pm)
Re: [x86 setup 13/33] Header file to produce 16-bit code wit..., Segher Boessenkool, (Tue Jul 10, 6:06 pm)
Re: [x86 setup 13/33] Header file to produce 16-bit code wit..., Segher Boessenkool, (Tue Jul 10, 4:08 pm)
[x86 setup 14/33] Top header file for new x86 setup code, H. Peter Anvin, (Mon Jul 9, 10:51 pm)
Re: [x86 setup 16/33] String-handling functions for the new ..., Segher Boessenkool, (Tue Jul 10, 4:10 pm)
Re: [x86 setup 16/33] String-handling functions for the new ..., Segher Boessenkool, (Tue Jul 10, 5:14 pm)
[x86 setup 17/33] A20 handling code, H. Peter Anvin, (Mon Jul 9, 10:51 pm)
Re: [x86 setup 17/33] A20 handling code, Jan Engelhardt, (Tue Jul 10, 2:27 pm)
Re: [x86 setup 17/33] A20 handling code, H. Peter Anvin, (Tue Jul 10, 2:36 pm)
Re: [x86 setup 17/33] A20 handling code, H. Peter Anvin, (Tue Jul 10, 2:33 pm)
[x86 setup 18/33] APM probing code, H. Peter Anvin, (Mon Jul 9, 10:51 pm)
Re: [x86 setup 22/33] CPU features verification for the new ..., Sébastien Dugué, (Tue Jul 10, 3:37 am)
[x86 setup 24/33] MCA support for new x86 setup code, H. Peter Anvin, (Mon Jul 9, 10:52 pm)