Is this a bug in the C2 matcher code?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Is this a bug in the C2 matcher code?

Andrew Haley
  /* CompareAndSet, Long: */
  case vmIntrinsics::_compareAndSetLong:
    if (!Matcher::match_rule_supported(Op_CompareAndSwapL)) return false;
    break;
  case vmIntrinsics::_weakCompareAndSetLongPlain:
  case vmIntrinsics::_weakCompareAndSetLongAcquire:
  case vmIntrinsics::_weakCompareAndSetLongRelease:
  case vmIntrinsics::_weakCompareAndSetLong:
    if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapL)) return false;
    break;

  /* CompareAndSet, Int: */
  case vmIntrinsics::_compareAndSetInt:
    if (!Matcher::match_rule_supported(Op_CompareAndSwapI)) return false;
    break;
  case vmIntrinsics::_weakCompareAndSetIntPlain:
  case vmIntrinsics::_weakCompareAndSetIntAcquire:
  case vmIntrinsics::_weakCompareAndSetIntRelease:
  case vmIntrinsics::_weakCompareAndSetInt:
    if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapL)) return false;
    break;

Note that last line:

    if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapL)...

Shouldn't that be Op_WeakCompareAndSwapI ?

--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is this a bug in the C2 matcher code?

Andrew Dinn
On 10/08/17 15:33, Andrew Haley wrote:
> if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapL)) return false;

Yes, it is. Nice catch.

Although, it seems to have been innocuous since every platform that has
Op_WeakCompareAndSwapI also has Op_WeakCompareAndSwapL (I checked
aarch64, x86_32/64, sparc and ppc).

regards,


Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Is this a bug in the C2 matcher code?

Vladimir Kozlov
Please, file bug.

Thanks,
Vladimir

On 8/10/17 7:53 AM, Andrew Dinn wrote:

> On 10/08/17 15:33, Andrew Haley wrote:
>> if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapL)) return false;
>
> Yes, it is. Nice catch.
>
> Although, it seems to have been innocuous since every platform that has
> Op_WeakCompareAndSwapI also has Op_WeakCompareAndSwapL (I checked
> aarch64, x86_32/64, sparc and ppc).
>
> regards,
>
>
> Andrew Dinn
> -----------
> Senior Principal Software Engineer
> Red Hat UK Ltd
> Registered in England and Wales under Company Registration No. 03798903
> Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander
>
Loading...