public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "wilson at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug sim/27483] aarch64: adds test failing when adding 0x80000000 & 0xffffffff
Date: Mon, 01 Mar 2021 04:48:08 +0000	[thread overview]
Message-ID: <bug-27483-4717-W0W01a4f5u@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-27483-4717@http.sourceware.org/bugzilla/>

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

Jim Wilson <wilson at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wilson at gcc dot gnu.org

--- Comment #1 from Jim Wilson <wilson at gcc dot gnu.org> ---
It works for me.

Testing adds.s on machine aarch64.
Executing on host: /scratch/jimw/FOSS/COMBINED-TREE/X-aarch64-elf/gas/as-new
..\
/../../combined/sim/testsuite/aarch64/adds.s 
-I../../../combined/sim/testsuite\
/aarch64  -o adds.s.o    (timeout = 300)
spawn -ignore SIGHUP /scratch/jimw/FOSS/COMBINED-TREE/X-aarch64-elf/gas/as-new
\
../../../combined/sim/testsuite/aarch64/adds.s
-I../../../combined/sim/testsuit\
e/aarch64 -o adds.s.o^M
Executing on host: /scratch/jimw/FOSS/COMBINED-TREE/X-aarch64-elf/ld/ld-new
add\
s.s.o   -o adds.s.x    (timeout = 300)
spawn -ignore SIGHUP /scratch/jimw/FOSS/COMBINED-TREE/X-aarch64-elf/ld/ld-new
a\
dds.s.o -o adds.s.x^M
/scratch/jimw/FOSS/COMBINED-TREE/X-aarch64-elf/sim/testsuite/../aarch64/run   
\
 adds.s.x
spawn
/scratch/jimw/FOSS/COMBINED-TREE/X-aarch64-elf/sim/testsuite/../aarch64/r\
un adds.s.x^M
pass^M
PASS: aarch64 adds.s

Trying a trace, I see
insn:      pc = 400030 instr = 52b00000
reg:      GR[ 0] changes from                2 to         80000000
insn:      pc = 400034 instr = 12800001
insn:      pc = 400038 instr = 2b010002
reg:      GR[ 2] changes from                1 to         7fffffff
reg:      CPSR changes from --C- to --CV
insn:      pc = 40003c instr = 54000b27
insn:      pc = 400040 instr = 12800020

I've probably never tested it anywhere other than x86-64 host though.  Maybe
there is a subtle bug that only shows up on other hosts.  Or maybe it doesn't
work on a 32-bit host.

The flags should be set in set_flags_for_add32 where it does
  if (sresult != result)
    flags |= V;

I get this

(gdb) print/x sresult
$15 = 0xffffffff7fffffff
(gdb) print/x result
$16 = 0x7fffffff
(gdb) print sresult != result
$17 = 1

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

  reply	other threads:[~2021-03-01  4:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-28  6:35 [Bug sim/27483] New: " vapier at gentoo dot org
2021-03-01  4:48 ` wilson at gcc dot gnu.org [this message]
2021-03-01  8:30 ` [Bug sim/27483] " schwab@linux-m68k.org
2021-03-01 16:43 ` wilson at gcc dot gnu.org
2021-03-01 16:55 ` schwab@linux-m68k.org
2021-03-01 23:28 ` wilson at gcc dot gnu.org
2021-03-02  8:43 ` schwab@linux-m68k.org
2021-03-07 18:48 ` vapier at gentoo dot org
2021-04-08  1:53 ` cvs-commit at gcc dot gnu.org
2021-04-08  1:59 ` wilson at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-27483-4717-W0W01a4f5u@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).