diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-06-04 11:15:06 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-06-04 11:15:06 -0700 |
commit | d413a6233ac3bc0afe6ff5261df1421854334a6d (patch) | |
tree | 25ebb3c09632a20c3aca97266971eb829aa86f61 /gas | |
parent | f8c4185131758306ddeb7b40479e82cab4dd7f26 (diff) | |
download | gdb-d413a6233ac3bc0afe6ff5261df1421854334a6d.zip gdb-d413a6233ac3bc0afe6ff5261df1421854334a6d.tar.gz gdb-d413a6233ac3bc0afe6ff5261df1421854334a6d.tar.bz2 |
gas: Fix ip2k-elf and xstormy16-elf build
Fix ip2k-elf and xstormy16-elf build due to
commit e9bffec9afc45cf7c49308f0b4b8cc6bf68f58f2
Author: Jose E. Marchesi <jose.marchesi@oracle.com>
Date: Thu Jun 4 16:15:53 2020 +0200
opcodes: discriminate endianness and insn-endianness in CGEN ports
* config/tc-ip2k. (ip2k_apply_fix): Pass endianness to
cgen_get_insn_value.
* config/tc-xstormy16.c (xstormy16_md_apply_fix): Pass
endianness to cgen_get_insn_value and cgen_put_insn_value.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/config/tc-ip2k.c | 3 | ||||
-rw-r--r-- | gas/config/tc-xstormy16.c | 6 |
3 files changed, 13 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 1c072e9..19cefba 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2020-06-04 H.J. Lu <hongjiu.lu@intel.com> + + * config/tc-ip2k. (ip2k_apply_fix): Pass endianness to + cgen_get_insn_value. + * config/tc-xstormy16.c (xstormy16_md_apply_fix): Pass + endianness to cgen_get_insn_value and cgen_put_insn_value. + 2020-06-04 Jose E. Marchesi <jose.marchesi@oracle.com> * config/tc-bpf.c (md_apply_fix): Simplify and avoid using diff --git a/gas/config/tc-ip2k.c b/gas/config/tc-ip2k.c index 75cd61b..665cdc0 100644 --- a/gas/config/tc-ip2k.c +++ b/gas/config/tc-ip2k.c @@ -385,7 +385,8 @@ ip2k_apply_fix (fixS *fixP, valueT *valueP, segT seg) CGEN_CPU_DESC cd = gas_cgen_cpu_desc; CGEN_INSN_INT insn_value = cgen_get_insn_value (cd, (unsigned char *) where, - CGEN_INSN_BITSIZE (fixP->fx_cgen.insn)); + CGEN_INSN_BITSIZE (fixP->fx_cgen.insn), + gas_cgen_cpu_desc->insn_endian); /* Preserve (DP) or (SP) specification. */ *valueP += (insn_value & 0x180); } diff --git a/gas/config/tc-xstormy16.c b/gas/config/tc-xstormy16.c index c2bab0d..6bb5f2a 100644 --- a/gas/config/tc-xstormy16.c +++ b/gas/config/tc-xstormy16.c @@ -502,13 +502,15 @@ xstormy16_md_apply_fix (fixS * fixP, { CGEN_INSN_INT insn_value = cgen_get_insn_value (cd, (unsigned char *) where, - CGEN_INSN_BITSIZE (insn)); + CGEN_INSN_BITSIZE (insn), + gas_cgen_cpu_desc->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, + gas_cgen_cpu_desc->insn_endian); } #else /* ??? 0 is passed for `pc'. */ |