From 212556765da013d7f941be8c94f686908b3b838b Mon Sep 17 00:00:00 2001 From: "Sergey Semyonov (Serge)" Date: Mon, 28 Apr 2014 11:26:30 +0000 Subject: [PATCH] mtdbg: set rounding mode to -Inf git-svn-id: svn://kolibrios.org@4909 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/mtdbg/gui.inc | 13 ++++++++++--- programs/develop/mtdbg/mtdbg.asm | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/programs/develop/mtdbg/gui.inc b/programs/develop/mtdbg/gui.inc index d5753f4f02..b480300524 100644 --- a/programs/develop/mtdbg/gui.inc +++ b/programs/develop/mtdbg/gui.inc @@ -105,7 +105,10 @@ start: push eax fstcw word [esp] - or word [esp], 3 shl 10 ; set round-to-zero mode + pop eax + and ax, not (3 shl 10) + or ax, 1 shl 10 ; set round-to-minus infinity mode + push eax fldcw word [esp] pop eax @@ -734,6 +737,9 @@ draw_fpu_register_2: stosd stosd + ;int3 + ;nop + mov edx, ebp shl edx, 4 @@ -770,7 +776,6 @@ draw_fpu_register_2: jmp .display .decode: - fld tword [_st0+edx] fldlg2 fld tword [_st0+edx] @@ -783,6 +788,9 @@ draw_fpu_register_2: fist dword [.exp_v] fld st0 fbstp tword [.bcd_exp] + push 8 + fisub dword [esp] + pop eax fldl2t fmulp fld st0 @@ -796,7 +804,6 @@ draw_fpu_register_2: fscale fstp st1 fdivp - fimul dword [_10000000] fbstp tword [.bcd_man] lea esi, [.bcd_man-1] diff --git a/programs/develop/mtdbg/mtdbg.asm b/programs/develop/mtdbg/mtdbg.asm index accaa33b95..679c6288a1 100644 --- a/programs/develop/mtdbg/mtdbg.asm +++ b/programs/develop/mtdbg/mtdbg.asm @@ -2333,13 +2333,13 @@ avx_strs: db '-YMM6-' db '-YMM7-' -align 4 + debuggee_pid dd 0 bSuspended db 0 bAfterGo db 0 temp_break dd 0 reg_mode db 1 -_10000000 dd 1000000000 + include 'disasm_tbl.inc'