From 7d8b91fda9fed423b91d4d43b19dd068457fe555 Mon Sep 17 00:00:00 2001 From: "Jose E. Marchesi" Date: Thu, 4 Jun 2020 16:33:34 +0200 Subject: [PATCH] gas: simplify code in tc-bpf.c:md_apply_fix 2020-06-04 Jose E. Marchesi * config/tc-bpf.c (md_apply_fix): Simplify and avoid using cgen_put_insn_value. --- gas/ChangeLog | 5 +++++ gas/config/tc-bpf.c | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 91e3dc2ba25..1c072e9c402 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2020-06-04 Jose E. Marchesi + + * config/tc-bpf.c (md_apply_fix): Simplify and avoid using + cgen_put_insn_value. + 2020-06-04 Jose E. Marchesi * config/tc-bpf.c (md_begin): Pass CGEN_CPU_OPEN_INSN_ENDIAN to diff --git a/gas/config/tc-bpf.c b/gas/config/tc-bpf.c index b742f426a1f..aa48108748b 100644 --- a/gas/config/tc-bpf.c +++ b/gas/config/tc-bpf.c @@ -325,9 +325,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg) Note that the CALL instruction has only one operand, so 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, - gas_cgen_cpu_desc->endian); + where[1] = target_big_endian ? 0x01 : 0x10; /* Fallthrough. */ case BPF_OPERAND_DISP16: /* The PC-relative displacement fields in jump instructions -- 2.30.2