[i386] Change semantics of __from_data16 and __from_text16

__from_data16 and __from_text16 now take a pointer to a
.data16/.text16 variable, and return the real-mode offset within the
appropriate segment.  This matches the use case for every occurrence
of these macros, and prevents potential future bugs such as that fixed
in commit d51d80f.  (The bug arose essentially because "&pointer" is
still syntactically valid.)
This commit is contained in:
Michael Brown
2008-06-30 18:52:13 -07:00
parent d51d80f785
commit 4fbbf651d7
9 changed files with 23 additions and 30 deletions

View File

@@ -147,7 +147,7 @@ static int meme820 ( struct memory_map *memmap ) {
"=b" ( next ), "=D" ( discard_D ),
"=c" ( discard_c ), "=d" ( discard_d )
: "a" ( 0xe820 ), "b" ( next ),
"D" ( &__from_data16 ( e820buf ) ),
"D" ( __from_data16 ( &e820buf ) ),
"c" ( sizeof ( e820buf ) ),
"d" ( SMAP )
: "memory" );