FreeBSD Bugzilla – Attachment 246554 Details for
Bug 275322
Improper handling of mxcsr register during debug (gdb/lldb)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
C code to demonstrate the problem
freebsdbug.c (text/plain), 940 bytes, created by
Cheyenne Wills
on 2023-11-25 03:42:00 UTC
(
hide
)
Description:
C code to demonstrate the problem
Filename:
MIME Type:
Creator:
Cheyenne Wills
Created:
2023-11-25 03:42:00 UTC
Size:
940 bytes
patch
obsolete
>/* Build with: clang -mfpmath=sse -mlong-double-64 -g -lm -o {x} {x.c} */ >#include <stdlib.h> >#include <stdio.h> >#include <xmmintrin.h> >double ra = 7.0120999448636435e-310; >double reatt = 10000000000; >unsigned int mxcsr_set = 0x9fc0; >unsigned int mxcsr; >unsigned int savemxcsr; >unsigned int showmxcsr; >double result; >int main(int argc, char **argv) >{ > savemxcsr = _mm_getcsr(); > _mm_setcsr(mxcsr_set); > showmxcsr = _mm_getcsr(); > > __asm__ volatile (".intel_syntax\n" > " movsd xmm12, ra\n" > " movapd xmm1,xmm12\n" > " movsd xmm0, reatt\n" > " mulsd xmm12,xmm0\n" > " movsd result,xmm12\n"); > mxcsr = _mm_getcsr(); > _mm_setcsr(savemxcsr); > printf("ra=%1.18g reatt=%1.18g ra * reatt-> result =%1.18g savemxcsr %08x mxcsr_set %08x showmxcsr %08x mxcsr %08x\n", ra, reatt, result, savemxcsr, mxcsr_set, showmxcsr, mxcsr); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 275322
: 246554