From: Roland Scheidegger srol...@vmware.com
Need to take the type into account. Also, if we want to allow
mov's with modifiers we need to pick a type (assume float).
v2: don't allow all modifiers on all type, in particular don't allow
absolute on non-float types and don't allow negate on
I think that we should probably allow signed everywhere.
The operation and result may be unsigned, but the arguments may need to be
negated to become unsigned.
Imagine:
int a = -1;
unsigned b = 10 / (unsigned)-a;
That is
MOV TEMP[0], INT IMM{-1}
UDIV TEMP[1], UINT IMM{10},
Allowing that looks very odd to me, and it seems no API does that.
FWIW the MOV with negation can't work like that (not in a consistent way
at least) since for ordinary temps etc. we don't know the type (hence
arguements are considered floats).
I think if you'd really want to do something like
Fair enough. I don't feel strongly either way.
Jose
- Original Message -
Allowing that looks very odd to me, and it seems no API does that.
FWIW the MOV with negation can't work like that (not in a consistent way
at least) since for ordinary temps etc. we don't know the type (hence