mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-23 20:19:49 +00:00
Formatting changes for RISC-V
This is a mixed bag of format changes: * Replacing constants with macros (0xffffffff with MINUS_ONE, for example). There's one technically functional change in here (some MINUS_ONEs are changed to 0), but it only changes the behavior of an otherwise-unused field. * Using 0 instead of 0x0 in the relocation table. * There were some missing spaces before parens, the spaces have been added. * A handful of comments are now more descriptive. * A bunch of whitespace-only changes, mostly alignment and brace newlines. bfd/ * elfnn-riscv.c: Formatting and comment fixes throughout. * elfxx-riscv.c: Likewise. (howto_table): Change the src_mask field from MINUS_ONE to 0 for R_RISCV_TLS_DTPMOD32, R_RISCV_TLS_DTPMOD64, R_RISCV_TLS_DTPREL32, R_RISCV_TLS_DTPREL64, R_RISCV_TLS_TPREL32, R_RISCV_TLS_TPREL64. opcodes/ * riscv-opc.c: Formatting fixes. gas/ * config/tc-riscv.c: Formatting and comment fixes throughout.
This commit is contained in:
parent
96b0927de3
commit
1d65abb5e2
@ -1,3 +1,11 @@
|
||||
2016-12-20 Andrew Waterman <andrew@sifive.com>
|
||||
|
||||
* elfnn-riscv.c: Formatting and comment fixes throughout.
|
||||
* elfxx-riscv.c: Likewise.
|
||||
(howto_table): Change the src_mask field from MINUS_ONE to 0 for
|
||||
R_RISCV_TLS_DTPMOD32, R_RISCV_TLS_DTPMOD64, R_RISCV_TLS_DTPREL32,
|
||||
R_RISCV_TLS_DTPREL64, R_RISCV_TLS_TPREL32, R_RISCV_TLS_TPREL64.
|
||||
|
||||
2016-12-20 Palmer Dabbelt <palmer@dabbelt.com>
|
||||
|
||||
* elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Improve
|
||||
|
@ -63,7 +63,7 @@ static reloc_howto_type howto_table[] =
|
||||
"R_RISCV_32", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
MINUS_ONE, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
/* 64 bit relocation. */
|
||||
@ -93,7 +93,7 @@ static reloc_howto_type howto_table[] =
|
||||
"R_RISCV_RELATIVE", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
0, /* src_mask */
|
||||
0xffffffff, /* dst_mask */
|
||||
MINUS_ONE, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
HOWTO (R_RISCV_COPY, /* type */
|
||||
@ -106,8 +106,8 @@ static reloc_howto_type howto_table[] =
|
||||
bfd_elf_generic_reloc, /* special_function */
|
||||
"R_RISCV_COPY", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
0x0, /* src_mask */
|
||||
0x0, /* dst_mask */
|
||||
0, /* src_mask */
|
||||
0, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
HOWTO (R_RISCV_JUMP_SLOT, /* type */
|
||||
@ -120,8 +120,8 @@ static reloc_howto_type howto_table[] =
|
||||
bfd_elf_generic_reloc, /* special_function */
|
||||
"R_RISCV_JUMP_SLOT", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
0x0, /* src_mask */
|
||||
0x0, /* dst_mask */
|
||||
0, /* src_mask */
|
||||
0, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
/* Dynamic TLS relocations. */
|
||||
@ -135,7 +135,7 @@ static reloc_howto_type howto_table[] =
|
||||
bfd_elf_generic_reloc, /* special_function */
|
||||
"R_RISCV_TLS_DTPMOD32", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
MINUS_ONE, /* src_mask */
|
||||
0, /* src_mask */
|
||||
MINUS_ONE, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
@ -149,7 +149,7 @@ static reloc_howto_type howto_table[] =
|
||||
bfd_elf_generic_reloc, /* special_function */
|
||||
"R_RISCV_TLS_DTPMOD64", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
MINUS_ONE, /* src_mask */
|
||||
0, /* src_mask */
|
||||
MINUS_ONE, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
@ -163,7 +163,7 @@ static reloc_howto_type howto_table[] =
|
||||
bfd_elf_generic_reloc, /* special_function */
|
||||
"R_RISCV_TLS_DTPREL32", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
MINUS_ONE, /* src_mask */
|
||||
0, /* src_mask */
|
||||
MINUS_ONE, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
@ -177,7 +177,7 @@ static reloc_howto_type howto_table[] =
|
||||
bfd_elf_generic_reloc, /* special_function */
|
||||
"R_RISCV_TLS_DTPREL64", /* name */
|
||||
TRUE, /* partial_inplace */
|
||||
MINUS_ONE, /* src_mask */
|
||||
0, /* src_mask */
|
||||
MINUS_ONE, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
@ -191,7 +191,7 @@ static reloc_howto_type howto_table[] =
|
||||
bfd_elf_generic_reloc, /* special_function */
|
||||
"R_RISCV_TLS_TPREL32", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
MINUS_ONE, /* src_mask */
|
||||
0, /* src_mask */
|
||||
MINUS_ONE, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
@ -205,7 +205,7 @@ static reloc_howto_type howto_table[] =
|
||||
bfd_elf_generic_reloc, /* special_function */
|
||||
"R_RISCV_TLS_TPREL64", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
MINUS_ONE, /* src_mask */
|
||||
0, /* src_mask */
|
||||
MINUS_ONE, /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
@ -238,9 +238,6 @@ static reloc_howto_type howto_table[] =
|
||||
TRUE, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
/* This needs complex overflow
|
||||
detection, because the upper 36
|
||||
bits must match the PC + 4. */
|
||||
bfd_elf_generic_reloc, /* special_function */
|
||||
"R_RISCV_JAL", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
@ -264,7 +261,7 @@ static reloc_howto_type howto_table[] =
|
||||
/* dst_mask */
|
||||
TRUE), /* pcrel_offset */
|
||||
|
||||
/* 32-bit PC-relative function call (AUIPC/JALR). */
|
||||
/* Like R_RISCV_CALL, but not locally binding. */
|
||||
HOWTO (R_RISCV_CALL_PLT, /* type */
|
||||
0, /* rightshift */
|
||||
2, /* size */
|
||||
@ -460,7 +457,7 @@ static reloc_howto_type howto_table[] =
|
||||
ENCODE_STYPE_IMM (-1U), /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
/* TLS LE thread pointer usage. */
|
||||
/* TLS LE thread pointer usage. May be relaxed. */
|
||||
HOWTO (R_RISCV_TPREL_ADD, /* type */
|
||||
0, /* rightshift */
|
||||
2, /* size */
|
||||
@ -665,9 +662,6 @@ static reloc_howto_type howto_table[] =
|
||||
TRUE, /* pc_relative */
|
||||
0, /* bitpos */
|
||||
complain_overflow_dont, /* complain_on_overflow */
|
||||
/* This needs complex overflow
|
||||
detection, because the upper 36
|
||||
bits must match the PC + 4. */
|
||||
bfd_elf_generic_reloc, /* special_function */
|
||||
"R_RISCV_RVC_JUMP", /* name */
|
||||
FALSE, /* partial_inplace */
|
||||
@ -690,7 +684,7 @@ static reloc_howto_type howto_table[] =
|
||||
ENCODE_RVC_IMM (-1U), /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
/* High 12 bits of 32-bit load or add. */
|
||||
/* GP-relative load. */
|
||||
HOWTO (R_RISCV_GPREL_I, /* type */
|
||||
0, /* rightshift */
|
||||
2, /* size */
|
||||
@ -705,7 +699,7 @@ static reloc_howto_type howto_table[] =
|
||||
ENCODE_ITYPE_IMM (-1U), /* dst_mask */
|
||||
FALSE), /* pcrel_offset */
|
||||
|
||||
/* High 12 bits of 32-bit store. */
|
||||
/* GP-relative store. */
|
||||
HOWTO (R_RISCV_GPREL_S, /* type */
|
||||
0, /* rightshift */
|
||||
2, /* size */
|
||||
|
@ -1,3 +1,7 @@
|
||||
2016-12-20 Andrew Waterman <andrew@sifive.com>
|
||||
|
||||
* config/tc-riscv.c: Formatting and comment fixes throughout.
|
||||
|
||||
2016-12-14 Maciej W. Rozycki <macro@imgtec.com>
|
||||
|
||||
* config/tc-mips.c (md_convert_frag): Report an error instead of
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "itbl-ops.h"
|
||||
#include "dwarf2dbg.h"
|
||||
#include "dw2gencfi.h"
|
||||
#include "struc-symbol.h"
|
||||
|
||||
#include "elf/riscv.h"
|
||||
#include "opcode/riscv.h"
|
||||
|
@ -1,3 +1,7 @@
|
||||
2016-12-20 Andrew Waterman <andrew@sifive.com>
|
||||
|
||||
* riscv-opc.c: Formatting fixes.
|
||||
|
||||
2016-12-20 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* Makefile.am (TARGET_LIBOPCODES_CFILES): Add riscv files.
|
||||
|
@ -34,8 +34,7 @@ const char * const riscv_gpr_names_numeric[NGPR] =
|
||||
"x24", "x25", "x26", "x27", "x28", "x29", "x30", "x31"
|
||||
};
|
||||
|
||||
const char * const riscv_gpr_names_abi[NGPR] =
|
||||
{
|
||||
const char * const riscv_gpr_names_abi[NGPR] = {
|
||||
"zero", "ra", "sp", "gp", "tp", "t0", "t1", "t2",
|
||||
"s0", "s1", "a0", "a1", "a2", "a3", "a4", "a5",
|
||||
"a6", "a7", "s2", "s3", "s4", "s5", "s6", "s7",
|
||||
@ -50,8 +49,7 @@ const char * const riscv_fpr_names_numeric[NFPR] =
|
||||
"f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31"
|
||||
};
|
||||
|
||||
const char * const riscv_fpr_names_abi[NFPR] =
|
||||
{
|
||||
const char * const riscv_fpr_names_abi[NFPR] = {
|
||||
"ft0", "ft1", "ft2", "ft3", "ft4", "ft5", "ft6", "ft7",
|
||||
"fs0", "fs1", "fa0", "fa1", "fa2", "fa3", "fa4", "fa5",
|
||||
"fa6", "fa7", "fs2", "fs3", "fs4", "fs5", "fs6", "fs7",
|
||||
|
Loading…
Reference in New Issue
Block a user