public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/26971] New: FAIL: gdb.arch/amd64-init-x87-values.exp: check_x87_regs_around_init: check post FLD1 value of $fop
@ 2020-11-28 14:45 vries at gcc dot gnu.org
  2020-11-28 14:54 ` [Bug testsuite/26971] " vries at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: vries at gcc dot gnu.org @ 2020-11-28 14:45 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26971

            Bug ID: 26971
           Summary: FAIL: gdb.arch/amd64-init-x87-values.exp:
                    check_x87_regs_around_init: check post FLD1 value of
                    $fop
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: testsuite
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

On SLE-11, I run into:
...
(gdb) p/x $fop^M
$27 = 0x1e8^M
(gdb) FAIL: gdb.arch/amd64-init-x87-values.exp: check_x87_regs_around_init:
check post FLD1 value of $fop
...

The expected value is 0.

Can be reproduced on the command line:
...
$ gdb -batch /outputs/gdb.arch/amd64-init-x87-values/amd64-init-x87-values \
  -ex start \
  -ex n -ex n -ex n \
  -ex "p /x \$fop" \
  -ex n \
  -ex "p /x \$fop" \
  -ex "info float"
Temporary breakpoint 1 at 0x4000d5: file amd64-init-x87-values.S, line 27.

Temporary breakpoint 1, main () at amd64-init-x87-values.S:27
27              nop
28              fwait
29              nop
30              fld1
$1 = 0x0
31              nop
$2 = 0x1e8
=>R7: Valid   0x3fff8000000000000000 +1                         
  R6: Empty   0x00000000000000000000
  R5: Empty   0x00000000000000000000
  R4: Empty   0x00000000000000000000
  R3: Empty   0x00000000000000000000
  R2: Empty   0x00000000000000000000
  R1: Empty   0x00000000000000000000
  R0: Empty   0x00000000000000000000

Status Word:         0x3800                                            
                       TOP: 7
Control Word:        0x037f   IM DM ZM OM UM PM
                       PC: Extended Precision (64-bits)
                       RC: Round to nearest
Tag Word:            0x3fff
Instruction Pointer: 0x00:0x004000d8
Operand Pointer:     0x00:0x00000000
Opcode:              0xd9e8
...

Interesting is that info float prints the opcode somewhat modified, such that
we have: 0xd9e8, which is precisely the opcode:
...
00000000004000d5 <main>:
  4000d5:       90                      nop
  4000d6:       9b                      fwait
  4000d7:       90                      nop
  4000d8:       d9 e8                   fld1   
  4000da:       90                      nop
...

I wonder whether we should print $fop also as "0xd9e8", it would be somewhat
clearer.

Either way, it seems we get the correct opcode, which should be allow in the
test-case.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug testsuite/26971] FAIL: gdb.arch/amd64-init-x87-values.exp: check_x87_regs_around_init: check post FLD1 value of $fop
  2020-11-28 14:45 [Bug testsuite/26971] New: FAIL: gdb.arch/amd64-init-x87-values.exp: check_x87_regs_around_init: check post FLD1 value of $fop vries at gcc dot gnu.org
@ 2020-11-28 14:54 ` vries at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: vries at gcc dot gnu.org @ 2020-11-28 14:54 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26971

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Tentative patch:
...
diff --git a/gdb/testsuite/gdb.arch/amd64-init-x87-values.exp
b/gdb/testsuite/gdb.arch/amd64-init-x87-values.exp
index 264c98b..6ad3430 100644
--- a/gdb/testsuite/gdb.arch/amd64-init-x87-values.exp
+++ b/gdb/testsuite/gdb.arch/amd64-init-x87-values.exp
@@ -105,7 +105,7 @@ proc_with_prefix check_x87_regs_around_init {} {
                                     "fioff" $addr \
                                     "foseg" "0x0" \
                                     "fooff" "0x0" \
-                                    "fop" "0x0" \
+                                    "fop" "0x0|0x1e8" \
                                     "mxcsr" "0x1f80" ] {
        gdb_test "p/x \$${regname}" " = ${regvalue}"  "check post FLD1 value of
\$${regname}"
     }
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-28 14:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-28 14:45 [Bug testsuite/26971] New: FAIL: gdb.arch/amd64-init-x87-values.exp: check_x87_regs_around_init: check post FLD1 value of $fop vries at gcc dot gnu.org
2020-11-28 14:54 ` [Bug testsuite/26971] " vries at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).