gas: simplify code in tc-bpf.c:md_apply_fix
authorJose E. Marchesi <jose.marchesi@oracle.com>
Thu, 4 Jun 2020 14:33:34 +0000 (16:33 +0200)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Thu, 4 Jun 2020 14:34:16 +0000 (16:34 +0200)
2020-06-04  Jose E. Marchesi  <jose.marchesi@oracle.com>

* config/tc-bpf.c (md_apply_fix): Simplify and avoid using
cgen_put_insn_value.

gas/ChangeLog
gas/config/tc-bpf.c

index 91e3dc2ba250356947d6c6745575a6cea2055ad0..1c072e9c402696ff6af07e19d0070d6343de27c8 100644 (file)
@@ -1,3 +1,8 @@
+2020-06-04  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+       * config/tc-bpf.c (md_apply_fix): Simplify and avoid using
+       cgen_put_insn_value.
+
 2020-06-04  Jose E. Marchesi  <jose.marchesi@oracle.com>
 
        * config/tc-bpf.c (md_begin): Pass CGEN_CPU_OPEN_INSN_ENDIAN to
index b742f426a1fd0e2d2dbf44f528a8c6e3fb5bc34d..aa48108748b197aac177875a89d0cd467895111b 100644 (file)
@@ -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
This page took 0.026247 seconds and 4 git commands to generate.