Show HN: I486SX_soft_FPU โ€“ Software FPU Emulator for NetBSD 10 on 486SX

https://news.ycombinator.com/rss Hits: 19
Summary

FPU Emulation Revival for i486SX on NetBSD This retro-computing project restores support for x87 floating-point unit (FPU) emulation in the NetBSD kernel, targeting legacy 486SX-class processors without hardware FPUs. It brings back the original MATH_EMULATE option into NetBSD 10.x and beyond, as well as reverts and reworks the changes introduced in commit dfe83e0, which removed FPU emulation support from the kernel. Disclaimer This project is a work in progress and may contain bugs or incomplete functionality. Use at your own risk. The author is not responsible for any issues caused by its use. Notes fyl2x seems to work properly on FPU, but when executed from libc , log functions bring incorrect results seems to work properly on FPU, but when executed from , functions bring incorrect results Some operations have hard-to-detect issues with precision x87 FPU Emulated Instructions ๐Ÿง  Control & Initialization Instruction Status Description Opcode Example fninit โœ… OK Initialize FPU 9B DB E3 fninit ๐Ÿ“ค Load to FPU Stack Instruction Status Description Opcode Example fld โœ… OK Load floating-point value D9 /0 fld st(1) fldt โœ… OK Load 80-bit extended precision DB /5 fldt [mem] filds โœ… OK Load integer (short) DB /0 filds [mem] fildl โœ… OK Load long integer DB /A fildl [mem] ๐Ÿ“ค Store from FPU Stack Instruction Status Description Opcode Example fstps โœ… OK Store and pop single precision D9 /3 fstps [mem] fstpt โœ… OK Store 80-bit extended precision & pop DB /7 fstpt [mem] โž•โž–โœ–๏ธโž— Arithmetic Operations Instruction Status Description Opcode Example fadd โœ… OK Add floating-point values D8 /0 fadd st(1), st faddl โœ… OK Add long double from memory DA /0 faddl [mem] fsub โœ… OK Subtract floating-point values D8 /4 fsub st(1), st fsubp โœ… OK Subtract with pop DE /5 fsubp st(1), st(0) fmul โœ… OK Multiply floating-point values D8 /1 fmul st(1), st fdiv โœ… OK Divide floating-point values D8 /6 fdiv st(1), st fdivp โœ… OK Divide with pop DE /7 fdivp st(1), st(0) fscale โœ… OK Scale ST(0) by ST(1) D9 FD fscale ...

First seen: 2025-04-27 22:17

Last seen: 2025-04-28 16:20