public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: rth@redhat.com
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 0/2] Convert s390 to atomic optabs, v2
Date: Fri, 03 Aug 2012 14:21:00 -0000	[thread overview]
Message-ID: <201208031421.q73ELQ6k004569@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <201208031219.q73CJoli001378@d06av02.portsmouth.uk.ibm.com> from "Ulrich Weigand" at Aug 03, 2012 02:19:50 PM

I wrote:
> Just a quick heads-up that something still must be broken;
> I get extra test suite failures:
> 
> FAIL: gcc.dg/atomic-compare-exchange-1.c execution test
> FAIL: gcc.dg/atomic-compare-exchange-2.c execution test
> FAIL: gcc.dg/atomic-compare-exchange-3.c execution test
> WARNING: program timed out.
> FAIL: gcc.dg/atomic-op-3.c execution test
> FAIL: gcc.dg/ia64-sync-2.c execution test
> FAIL: gcc.dg/ia64-sync-3.c execution test
> FAIL: gcc.dg/sync-3.c execution test
> FAIL: gcc.dg/simulate-thread/atomic-other-int.c  -O0 -g  thread simulation test
> FAIL: gcc.dg/simulate-thread/atomic-other-int.c  -O2 -g  thread simulation test
> FAIL: gcc.dg/simulate-thread/atomic-other-int.c  -O3 -g  thread simulation test
> FAIL: gcc.dg/simulate-thread/atomic-other-short.c  -O3 -g  thread simulation test
> FAIL: libatomic.c/atomic-compare-exchange-3.c execution test
> WARNING: program timed out.
> FAIL: libatomic.c/atomic-op-3.c execution test
> FAIL: libatomic.c/generic-2.c execution test
> 
> and just about all libgomp tests and many libjava tests seem
> to hang and time out ...
> 
> I'll have a look what's going on here.

Richard Henderson wrote:
> +(define_expand "atomic_compare_and_swap<mode>"
> +  [(match_operand:SI 0 "register_operand")	;; bool success output
> +   (match_operand:DGPR 1 "register_operand")	;; oldval output
> +   (match_operand:DGPR 2 "s_operand")		;; memory
> +   (match_operand:DGPR 3 "register_operand")	;; expected intput
> +   (match_operand:DGPR 4 "register_operand")	;; newval intput
> +   (match_operand:SI 5 "const_int_operand")	;; is_weak
> +   (match_operand:SI 6 "const_int_operand")	;; success model
> +   (match_operand:SI 7 "const_int_operand")]	;; failure model
> +  ""
> +{
> +  rtx cc, cmp;
> +  emit_insn (gen_atomic_compare_and_swap<mode>_internal
> +	     (operands[1], operands[2], operands[3], operands[4]));
> +  cc = gen_rtx_REG (CCZ1mode, CC_REGNUM);
> +  cmp = gen_rtx_NE (SImode, cc, const0_rtx);
> +  emit_insn (gen_cstorecc4 (operands[0], cmp, cc, const0_rtx));

This needs to be an EQ instead of NE comparison here ...

> +  if (is_weak)
>      {
> -      cmpv = force_reg (SImode, val);
> -      store_bit_field (cmpv, GET_MODE_BITSIZE (mode), 0,
> -		       0, 0, SImode, cmp);
> +      cc = s390_emit_compare_and_swap (NE, res, ac.memsi, cmpv, newv);
> +      emit_insn (gen_cstorecc4 (btarget, cc, XEXP (cc, 0), XEXP (cc, 1)));
>      }

... and here.

This fixes the main atomic test failures I was seeing.  I've restarted
the full bootstrap / regression test now ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com

  reply	other threads:[~2012-08-03 14:21 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-29 21:32 [CFT] s390: Convert from sync to atomic optabs Richard Henderson
2012-07-30 14:19 ` Ulrich Weigand
2012-07-30 15:12   ` Richard Henderson
2012-07-30 15:51     ` Ulrich Weigand
2012-07-30 18:53       ` Richard Henderson
2012-07-30 22:33         ` [PATCH 0/2] Convert s390 to atomic optabs, v2 Richard Henderson
2012-07-30 22:33           ` [PATCH 1/2] s390: Reorg s390_expand_insv Richard Henderson
2012-07-30 22:36           ` [PATCH 2/2] s390: Convert from sync to atomic optabs Richard Henderson
2012-08-06 18:34             ` Ulrich Weigand
2012-08-06 18:51               ` Richard Henderson
2012-08-06 19:45                 ` Richard Henderson
2012-08-06 22:40               ` s390: Avoid CAS boolean output inefficiency Richard Henderson
2012-08-07 17:02                 ` Ulrich Weigand
2012-08-07 22:13                   ` Richard Henderson
2012-08-08 18:05                     ` Ulrich Weigand
2012-08-09 16:55                 ` Eric Botcazou
2012-07-31  9:11           ` [PATCH 0/2] Convert s390 to atomic optabs, v2 Richard Guenther
2012-07-31 15:27             ` Andrew MacLeod
2012-07-31 16:07             ` Richard Henderson
2012-08-01  8:41               ` Richard Guenther
2012-08-01 15:59                 ` Richard Henderson
2012-08-01 17:14                   ` Richard Guenther
2012-08-01 19:42                     ` Richard Henderson
2012-07-31 18:36           ` Ulrich Weigand
2012-07-31 19:54             ` Richard Henderson
2012-08-01 23:23             ` Richard Henderson
2012-08-03 12:20               ` Ulrich Weigand
2012-08-03 14:21                 ` Ulrich Weigand [this message]
2012-08-06 16:44               ` Ulrich Weigand

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=201208031421.q73ELQ6k004569@d06av02.portsmouth.uk.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rth@redhat.com \
    /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).