aboutsummaryrefslogtreecommitdiff
path: root/src/types.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2014-09-24 15:58:12 -0400
committerKevin O'Connor <kevin@koconnor.net>2014-10-11 13:41:53 -0400
commiteb88bf7db541aa2dd70cae869238cfb3003efb56 (patch)
tree18fd9939a0dd8541da9b1c74d11a7d55253e419c /src/types.h
parent9984b9df14a357b2c10972e8dbc17b627904c502 (diff)
downloadseabios-hppa-eb88bf7db541aa2dd70cae869238cfb3003efb56.zip
seabios-hppa-eb88bf7db541aa2dd70cae869238cfb3003efb56.tar.gz
seabios-hppa-eb88bf7db541aa2dd70cae869238cfb3003efb56.tar.bz2
build: Support declaring 32bit C functions that must reside in the f-segment
Add support for a FUNCFSEG macro that will force a "32bit flat" C function to be located in the f-segment. This is useful for 32bit code with inline assembler that thunks to 16bit mode. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/types.h')
-rw-r--r--src/types.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/types.h b/src/types.h
index 097372c..6dd8c43 100644
--- a/src/types.h
+++ b/src/types.h
@@ -70,6 +70,8 @@ extern void __force_link_error__only_in_16bit(void) __noreturn;
# define VARFSEG __section(".discard.varfseg." UNIQSEC) __VISIBLE __weak
// Designate a variable at a specific address in the f-segment.
# define VARFSEGFIXED(addr) __section(".discard.varfixed." UNIQSEC) __VISIBLE __weak
+// Notes a 32bit flat function that must reside in the f-segment.
+# define FUNCFSEG __section(".discard.32fseg." UNIQSEC) __VISIBLE __weak
// Verify a variable is only accessable via 32bit "init" functions
# define VARVERIFY32INIT __section(".discard.varinit." UNIQSEC)
// Designate top-level assembler as 16bit only.
@@ -90,6 +92,7 @@ extern void __force_link_error__only_in_16bit(void) __noreturn;
# define VARLOW __section(".discard.varlow." UNIQSEC) __VISIBLE __weak
# define VARFSEG __section(".discard.varfseg." UNIQSEC) __VISIBLE __weak
# define VARFSEGFIXED(addr) __section(".discard.varfixed." UNIQSEC) __VISIBLE __weak
+# define FUNCFSEG __section(".discard.32fseg." UNIQSEC) __VISIBLE __weak
# define VARVERIFY32INIT __section(".discard.varinit." UNIQSEC)
# define ASM16(code)
# define ASM32FLAT(code)
@@ -106,6 +109,7 @@ extern void __force_link_error__only_in_16bit(void) __noreturn;
# define VARLOW __section(".data.varlow." UNIQSEC) __VISIBLE __weak
# define VARFSEG __section(".data.varfseg." UNIQSEC) __VISIBLE
# define VARFSEGFIXED(addr) __section(".fixedaddr." __stringify(addr)) __VISIBLE __aligned(1)
+# define FUNCFSEG __section(".text.32fseg." UNIQSEC) __VISIBLE
# define VARVERIFY32INIT __section(".data.varinit." UNIQSEC)
# define ASM16(code)
# define ASM32FLAT(code) __ASM(code)