[TUHS] Unix stories

Random832 random832 at fastmail.com
Thu Jan 5 02:54:02 AEST 2017


On Wed, Jan 4, 2017, at 11:51, Steffen Nurpmeso wrote:
> Ok, but that quite clearly was not what i have meant.  I meant
> that if you program in assembler, well, all those newer assembler
> languages that i have seen, the target of an operation is the
> target of a store, and say if it is a register that is also one of
> the sources, it means nothing, from the language side.

Yes but you are storing *twice*, two different values, to the same
variable, in the same statement. There's no operation in any assembler
language that does that, and at this point I honestly don't know what
value you expect to 'win'.

>  ARM has
> even predicates that perform operations on that value before the
> store, even if the source is the same as the destination.  It
> simply strives me absurd that i, in C, cannot simply say what
> i want

Why do you think that "i = ... + ++i" is a reasonable way to say what
you want?

> and let the C compiler with all its knowledge of the target
> system decide what to do about it.
> 
> --steffen


More information about the TUHS mailing list