- if (insn & 0x2)
- *buf++ = '-';
- switch ((insn >> 2) & 0x3)
- {
- case 0: *buf++ = 'Z'; break;
- case 2: *buf++ = 'Y'; break;
- case 3: *buf++ = 'X'; break;
- default: buf += sprintf (buf, _(" unknown register ")); break;
- }
- if (insn & 0x1)
- *buf++ = '+';
- *buf = '\0';
+ {
+ char *xyz;
+
+ switch (insn & 0x100f)
+ {
+ case 0x0000: xyz = "Z"; break;
+ case 0x1001: xyz = "Z+"; break;
+ case 0x1002: xyz = "-Z"; break;
+ case 0x0008: xyz = "Y"; break;
+ case 0x1009: xyz = "Y+"; break;
+ case 0x100a: xyz = "-Y"; break;
+ case 0x100c: xyz = "X"; break;
+ case 0x100d: xyz = "X+"; break;
+ case 0x100e: xyz = "-X"; break;
+ default: xyz = "??"; ok = 0;
+ }
+ sprintf (buf, xyz);
+
+ if (AVR_UNDEF_P (insn))
+ sprintf (comment, _("undefined"));
+ }