unsigned long x,mask;
int shift;
- x = cgen_get_insn_value (cd, bufp, word_length);
+ x = cgen_get_insn_value (cd, bufp, word_length, cd->endian);
/* Written this way to avoid undefined behaviour. */
mask = (((1L << (length - 1)) - 1) << 1) | 1;
shift = (word_length - (start + length));
x = (x & ~(mask << shift)) | ((value & mask) << shift);
- cgen_put_insn_value (cd, bufp, word_length, (bfd_vma) x);
+ cgen_put_insn_value (cd, bufp, word_length, (bfd_vma) x, cd->endian);
}
#endif /* ! CGEN_INT_INSN_P */
#else
cgen_put_insn_value (cd, buffer, min ((unsigned) cd->base_insn_bitsize,
- (unsigned) CGEN_FIELDS_BITSIZE (fields)),
- value);
+ (unsigned) CGEN_FIELDS_BITSIZE (fields)),
+ value, cd->insn_endian);
#endif /* ! CGEN_INT_INSN_P */
unsigned long x;
int shift;
- x = cgen_get_insn_value (cd, bufp, word_length);
+ x = cgen_get_insn_value (cd, bufp, word_length, cd->endian);
if (CGEN_INSN_LSB0_P)
shift = (start + 1) - length;