Date: Sat, 25 Nov 2023 04:52:27 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 275322] Improper handling of mxcsr register during debug (gdb/lldb) Message-ID: <bug-275322-227-L6pjnWOIO3@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-275322-227@https.bugs.freebsd.org/bugzilla/> References: <bug-275322-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D275322 --- Comment #2 from Cheyenne Wills <cheyenne.wills@gmail.com> --- (In reply to Kyle Evans from comment #1) I might be able to reduce the C code even more if needed. Some background on how I stumbled on this. I'm trying to debug some of my code (assembly) that uses SSE2 floating point instructions. The code runs fine under Linux, and I wanted to see if it co= uld be ported to freebsd. The code ended up in a loop where it is trying to sc= ale a floating point number, and when I was trying to debug the code I was gett= ing inconsistent results when I was running the program under the gdb debugger. The assembly source does set mxcsr to control how underflow/overflow, etc, = are handled within the assembly code. The mxcsr settings are relied upon within the assembly code and the mxcsr register is reset back to value that it was when the assembly code got control from the calling C code. The mxcsr regi= ster is set back to the "original" value whenever the assembly code switches bac= k to any C functions, or other system calls. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-275322-227-L6pjnWOIO3>