+ case 'I': /* 11 bit immediate. */
+ case 'j': /* 10 bit immediate. */
+ {
+ /* We cannot trust the compiler to sign-extend
+ when extracting the bitfield, hence the shifts. */
+ int imm;
+
+ if (*s == 'I')
+ imm = ((int) insn.imm13 << 21) >> 21;
+ else
+ imm = ((int) insn.imm13 << 22) >> 22;
+
+ /* Check to see whether we have a 1+i, and take
+ note of that fact.
+
+ Note: because of the way we sort the table,
+ we will be matching 1+i rather than i+1,
+ so it is OK to assume that i is after +,
+ not before it. */
+ if (found_plus)
+ imm_added_to_rs1 = 1;
+
+ if (imm <= 9)
+ fprintf (stream, "%d", imm);
+ else
+ fprintf (stream, "%#x", (unsigned) imm);
+ }
+ break;
+
+
+
+