aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog11
-rw-r--r--gas/cgen.c9
-rw-r--r--gas/config/tc-bpf.c3
-rw-r--r--gas/config/tc-mep.c2
4 files changed, 20 insertions, 5 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 6484c62..bb917cc 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,14 @@
+2020-06-04 Jose E. Marchesi <jose.marchesi@oracle.com>
+
+ * cgen.c (gas_cgen_finish_insn): Pass the endianness to
+ cgen_put_insn_value.
+ (gas_cgen_md_apply_fix): Likewise.
+ (gas_cgen_md_apply_fix): Likewise.
+ * config/tc-bpf.c (md_apply_fix): Pass data endianness to
+ cgen_put_insn_value.
+ * config/tc-mep.c (mep_check_ivc2_scheduling): Pass endianness to
+ cgen_put_insn_value.
+
2020-06-04 Alan Modra <amodra@gmail.com>
* testsuite/config/default.exp: Remove global directive outside
diff --git a/gas/cgen.c b/gas/cgen.c
index b94802e..8d1867b 100644
--- a/gas/cgen.c
+++ b/gas/cgen.c
@@ -621,7 +621,8 @@ gas_cgen_finish_insn (const CGEN_INSN *insn, CGEN_INSN_BYTES_PTR buf,
/* If we're recording insns as numbers (rather than a string of bytes),
target byte order handling is deferred until now. */
#if CGEN_INT_INSN_P
- cgen_put_insn_value (gas_cgen_cpu_desc, (unsigned char *) f, length, *buf);
+ cgen_put_insn_value (gas_cgen_cpu_desc, (unsigned char *) f, length, *buf,
+ gas_cgen_cpu_desc->insn_endian);
#else
memcpy (f, buf, byte_len);
#endif
@@ -906,13 +907,15 @@ gas_cgen_md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
{
CGEN_INSN_INT insn_value =
cgen_get_insn_value (cd, (unsigned char *) where,
- CGEN_INSN_BITSIZE (insn));
+ CGEN_INSN_BITSIZE (insn),
+ cd->insn_endian);
/* ??? 0 is passed for `pc'. */
errmsg = CGEN_CPU_INSERT_OPERAND (cd) (cd, opindex, fields,
&insn_value, (bfd_vma) 0);
cgen_put_insn_value (cd, (unsigned char *) where,
- CGEN_INSN_BITSIZE (insn), insn_value);
+ CGEN_INSN_BITSIZE (insn), insn_value,
+ cd->insn_endian);
}
#else
/* ??? 0 is passed for `pc'. */
diff --git a/gas/config/tc-bpf.c b/gas/config/tc-bpf.c
index a379acb..7c7d22e 100644
--- a/gas/config/tc-bpf.c
+++ b/gas/config/tc-bpf.c
@@ -324,7 +324,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
this code is executed only once per instruction. */
where = fixP->fx_frag->fr_literal + fixP->fx_where;
cgen_put_insn_value (gas_cgen_cpu_desc, (unsigned char *) where + 1, 8,
- target_big_endian ? 0x01 : 0x10);
+ target_big_endian ? 0x01 : 0x10,
+ gas_cgen_cpu_desc->endian);
/* Fallthrough. */
case BPF_OPERAND_DISP16:
/* The PC-relative displacement fields in jump instructions
diff --git a/gas/config/tc-mep.c b/gas/config/tc-mep.c
index 26fb80e..6b52841 100644
--- a/gas/config/tc-mep.c
+++ b/gas/config/tc-mep.c
@@ -1111,7 +1111,7 @@ mep_check_ivc2_scheduling (void)
#if CGEN_INT_INSN_P
cgen_put_insn_value (gas_cgen_cpu_desc, (unsigned char *) temp, 32,
- m->buffer[0]);
+ m->buffer[0], gas_cgen_cpu_desc->insn_endian);
#else
memcpy (temp, m->buffer, byte_len);
#endif