There might only be a single arg (e.g. cvt), so use mode rather than
looking at the source directly. Also we don't want to rely on the type
of the value, which can be unreliable, but instead use the
instruction's. This works out well since mkSplit doesn't adjust the
type.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
return;
if ((mode & 3) == 1) {
- const int pos = i->src(1).getFile() == FILE_IMMEDIATE ? 13 : 14;
+ const int pos = ((mode >> 2) & 3) == 3 ? 13 : 14;
- switch (i->getSrc(0)->reg.type) {
+ switch (i->sType) {
case TYPE_U8:
break;
case TYPE_U16: