From 52a300f1c1ec2d9733d41ecd3ecaf78be48097b8 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 26 Dec 2009 23:32:57 -0500 Subject: Introduce MODESEGMENT define; rename VISIBLE32 to VISIBLE32FLAT. Prepare for support of segmented 32bit code. Add new MODESEGMENT definition, and clarify existing 32bit mode defs. --- src/farptr.h | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/farptr.h') diff --git a/src/farptr.h b/src/farptr.h index acc9d59..3cc4170 100644 --- a/src/farptr.h +++ b/src/farptr.h @@ -122,9 +122,9 @@ extern void __force_link_error__unknown_type(); #define MAKE_FLATPTR(seg,off) ((void*)(((u32)(seg)<<4)+(u32)(off))) -#if MODE16 == 1 +#if MODESEGMENT == 1 -// Definitions when in 16 bit mode. +// Definitions when using segmented mode. #define GET_FARVAR(seg, var) __GET_FARVAR((seg), (var)) #define SET_FARVAR(seg, var, val) __SET_FARVAR((seg), (var), (val)) #define GET_VAR(seg, var) __GET_VAR(seg, (var)) @@ -159,13 +159,9 @@ static inline void outsl_fl(u16 port, void *ptr_fl, u16 count) { outsl(port, (u32*)FLATPTR_TO_OFFSET(ptr_fl), count); } -extern void __force_link_error__only_in_32bit() __attribute__ ((noreturn)); -#define ASSERT16() do { } while (0) -#define ASSERT32() __force_link_error__only_in_32bit() - #else -// In 32-bit mode there is no need to mess with the segments. +// In 32-bit flat mode there is no need to mess with the segments. #define GET_FARVAR(seg, var) \ (*((typeof(&(var)))MAKE_FLATPTR((seg), &(var)))) #define SET_FARVAR(seg, var, val) \ @@ -184,10 +180,6 @@ extern void __force_link_error__only_in_32bit() __attribute__ ((noreturn)); #define outsw_fl(port, ptr_fl, count) outsw(port, ptr_fl, count) #define outsl_fl(port, ptr_fl, count) outsl(port, ptr_fl, count) -extern void __force_link_error__only_in_16bit() __attribute__ ((noreturn)); -#define ASSERT16() __force_link_error__only_in_16bit() -#define ASSERT32() do { } while (0) - #endif // Definition for common 16bit segment/offset pointers. -- cgit v1.1