| > * There is provision in C-- for primops that (a) may have more | > than one result, (b) have effects. This is done by the %% syntax, | > described at the end of Section 6.3 of the C-- spec. | > * However this feature is ill-specified by the C-- spec; indeed | > no %% operators are described at all | | I did not understand that reference when I read it the first time. | Section 6.8.1 mentions 'foreign "C--"', which until now did not make | sense to me. Now I realise that C-- has a basic runtime system so | primitive operators must leave the runtime system in order to produce | side effects. Interesting workaround--reminiscent of mutable | variables in Haskell. The big question is whether all those extra | foreign calls may be reduced to the proper assembler mnemonics | instead of creating special procedures.
Now you've confused me! The form x = %%op( p, q, r ) has the *form* of a call, and it *may* generate a call, but it also fine for the C-- compiler to generate a single, inline machine instruction. Indeed that is what GHC does for the memory-barrier op, I think. I don't understand your reference to the C-- runtime; it doesn't seem relevant here. Simon _______________________________________________ Cvs-ghc mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/cvs-ghc