[M3commit] [modula3/cm3] cc457b: Fix wrong M3CG_Checks on code generated for Compar...

GitHub noreply at github.com
Tue Oct 11 21:55:18 CEST 2016


  Branch: refs/heads/master
  Home:   https://github.com/modula3/cm3
  Commit: cc457b7deddfc53ac75ea8b6d820ecafc0c29d73
      https://github.com/modula3/cm3/commit/cc457b7deddfc53ac75ea8b6d820ecafc0c29d73
  Author: Rodney Bates <rodney.m.bates at acm.org>
  Date:   2016-10-11 (Tue, 11 Oct 2016)

  Changed paths:
    M m3-sys/m3middle/src/M3CG_Check.m3

  Log Message:
  -----------
  Fix wrong M3CG_Checks on code generated for Compare_Swap, I think.

The code produced by CG matches the declaration of Compare_Swap
in Atomic.ig, specifically, the 2nd parameter is passed by reference,
and can be altered.  Fix M3CG_Check to agree.

The comments in the code generators and M3CG_Ops.i3 suggest it is
passed by value, but this would not work correctly.  The back ends
need review for this operation, and are probably wrong in more ways
that one.

m3cc, in particular segfaults handling this code, if the stuff
in atomic is compiled.




More information about the M3commit mailing list