diff options
author | wpaul <wpaul@FreeBSD.org> | 2005-05-08 09:16:33 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2005-05-08 09:16:33 +0000 |
commit | 36f8fdfd3601d88023dfc0b74e30a4cb6003cf7e (patch) | |
tree | d00d33706a7e33fb059df2ea8cbcf18283bf002b /sys/compat | |
parent | 1ad73a300483cb1766df91e0fc642cdd3a3d426c (diff) | |
download | FreeBSD-src-36f8fdfd3601d88023dfc0b74e30a4cb6003cf7e.zip FreeBSD-src-36f8fdfd3601d88023dfc0b74e30a4cb6003cf7e.tar.gz |
Correct the patch table entries for the 64-bit intrinsic math
routines (_alldiv(), _allmul(), _alludiv(), _aullmul(), etc...)
that use the _stdcall calling convention.
These routines all take two arguments, but the arguments are 64 bits wide.
On the i386 this means they each consume two 32-bit slots on the stack.
Consequently, when we specify the argument count in the IMPORT_SFUNC()
macro, we have to lie and claim there are 4 arguments instead of two.
This will cause the resulting i386 assembly wrapper to push the right
number of longwords onto the stack.
This fixes a crash I discovered with the RealTek 8180 driver, which
uses these routines a lot during initialization.
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/ndis/subr_ntoskrnl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/compat/ndis/subr_ntoskrnl.c b/sys/compat/ndis/subr_ntoskrnl.c index f7194c0..9181e0b 100644 --- a/sys/compat/ndis/subr_ntoskrnl.c +++ b/sys/compat/ndis/subr_ntoskrnl.c @@ -3273,14 +3273,14 @@ image_patch_table ntoskrnl_functbl[] = { IMPORT_SFUNC(IoInitializeIrp, 3), IMPORT_SFUNC(KeWaitForSingleObject, 5), IMPORT_SFUNC(KeWaitForMultipleObjects, 8), - IMPORT_SFUNC(_allmul, 2), - IMPORT_SFUNC(_alldiv, 2), - IMPORT_SFUNC(_allrem, 2), + IMPORT_SFUNC(_allmul, 4), + IMPORT_SFUNC(_alldiv, 4), + IMPORT_SFUNC(_allrem, 4), IMPORT_RFUNC(_allshr, 0), IMPORT_RFUNC(_allshl, 0), - IMPORT_SFUNC(_aullmul, 2), - IMPORT_SFUNC(_aulldiv, 2), - IMPORT_SFUNC(_aullrem, 2), + IMPORT_SFUNC(_aullmul, 4), + IMPORT_SFUNC(_aulldiv, 4), + IMPORT_SFUNC(_aullrem, 4), IMPORT_RFUNC(_aullshr, 0), IMPORT_RFUNC(_aullshl, 0), IMPORT_CFUNC(atoi, 0), |