Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7f4a5fb authored by H. Peter Anvin's avatar H. Peter Anvin Committed by Linus Torvalds
Browse files

Header file to produce 16-bit code with gcc



gcc for i386 can be used with the assembly prefix ".code16gcc" to generate
16-bit (real-mode) code.  This header file provides the assembly prefix.

Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8afd2af8
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
/*
 * code16gcc.h
 *
 * This file is -include'd when compiling 16-bit C code.
 * Note: this asm() needs to be emitted before gcc omits any code.
 * Depending on gcc version, this requires -fno-unit-at-a-time or
 * -fno-toplevel-reorder.
 *
 * Hopefully gcc will eventually have a real -m16 option so we can
 * drop this hack long term.
 */

#ifndef __ASSEMBLY__
asm(".code16gcc");
#endif