[int13] Fix compilation on some versions of gcc
Using __from_text16() and __from_data16() in inline asm constraints sometimes defeats gcc's ability to simplify expressions down to compile-time constants. Reported-by: Jason Kohles <jkohles@palantir.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
parent
943b3003bd
commit
3c13d68f50
|
@ -1499,16 +1499,15 @@ static void int13_hook_vector ( void ) {
|
||||||
"cmpb $0x08, -1(%%bp)\n\t"
|
"cmpb $0x08, -1(%%bp)\n\t"
|
||||||
"jne 3f\n\t"
|
"jne 3f\n\t"
|
||||||
"testb $0x80, %%dl\n\t"
|
"testb $0x80, %%dl\n\t"
|
||||||
"movb %%cs:%c1, %%dl\n\t"
|
"movb %%cs:num_drives, %%dl\n\t"
|
||||||
"jnz 3f\n\t"
|
"jnz 3f\n\t"
|
||||||
"movb %%cs:%c2, %%dl\n\t"
|
"movb %%cs:num_fdds, %%dl\n\t"
|
||||||
/* Return */
|
/* Return */
|
||||||
"\n3:\n\t"
|
"\n3:\n\t"
|
||||||
"movw %%bp, %%sp\n\t"
|
"movw %%bp, %%sp\n\t"
|
||||||
"popw %%bp\n\t"
|
"popw %%bp\n\t"
|
||||||
"iret\n\t" )
|
"iret\n\t" )
|
||||||
: : "i" ( int13 ), "i" ( __from_text16 ( &num_drives ) ),
|
: : "i" ( int13 ) );
|
||||||
"i" ( __from_text16 ( &num_fdds ) ) );
|
|
||||||
|
|
||||||
hook_bios_interrupt ( 0x13, ( unsigned int ) int13_wrapper,
|
hook_bios_interrupt ( 0x13, ( unsigned int ) int13_wrapper,
|
||||||
&int13_vector );
|
&int13_vector );
|
||||||
|
|
Reference in New Issue