mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-01 01:45:51 +08:00
gas/
* read.c (address_bytes): New function. (TC_ADDRESS_BYTES): Default for BSD_ASSEMBLER to address_bytes. (potable): Add "dc.a". (cons_worker): Handle "dc.a". * doc/internals.texi (TC_ADDRESS_BYTES): Document. ld/testsuite/ * ld-elf/exclude1.s: Use ".dc.a". * ld-elfvsb/hidden2.s: Likewise.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2005-02-21 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* read.c (address_bytes): New function.
|
||||||
|
(TC_ADDRESS_BYTES): Default for BSD_ASSEMBLER to address_bytes.
|
||||||
|
(potable): Add "dc.a".
|
||||||
|
(cons_worker): Handle "dc.a".
|
||||||
|
* doc/internals.texi (TC_ADDRESS_BYTES): Document.
|
||||||
|
|
||||||
2005-02-21 Alan Modra <amodra@bigpond.net.au>
|
2005-02-21 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* input-file.c (input_file_open): Rearrange to avoid warning.
|
* input-file.c (input_file_open): Rearrange to avoid warning.
|
||||||
|
@ -1114,6 +1114,11 @@ pseudo-op.
|
|||||||
@cindex TC_CONS_FIX_NEW
|
@cindex TC_CONS_FIX_NEW
|
||||||
You may define this macro to generate a fixup for a data allocation pseudo-op.
|
You may define this macro to generate a fixup for a data allocation pseudo-op.
|
||||||
|
|
||||||
|
@item TC_ADDRESS_BYTES
|
||||||
|
@cindex TC_ADDRESS_BYTES
|
||||||
|
Define this macro to specify the number of bytes used to store an address.
|
||||||
|
Used to implement @code{dc.a}. The target must have a reloc for this size.
|
||||||
|
|
||||||
@item TC_INIT_FIX_DATA (@var{fixp})
|
@item TC_INIT_FIX_DATA (@var{fixp})
|
||||||
@cindex TC_INIT_FIX_DATA
|
@cindex TC_INIT_FIX_DATA
|
||||||
A C statement to initialize the target specific fields of fixup @var{fixp}.
|
A C statement to initialize the target specific fields of fixup @var{fixp}.
|
||||||
|
26
gas/read.c
26
gas/read.c
@ -243,6 +243,24 @@ read_begin (void)
|
|||||||
lex_type['?'] = 3;
|
lex_type['?'] = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef TC_ADDRESS_BYTES
|
||||||
|
#ifdef BFD_ASSEMBLER
|
||||||
|
#define TC_ADDRESS_BYTES address_bytes
|
||||||
|
|
||||||
|
static inline int
|
||||||
|
address_bytes (void)
|
||||||
|
{
|
||||||
|
/* Choose smallest of 1, 2, 4, 8 bytes that is large enough to
|
||||||
|
contain an address. */
|
||||||
|
int n = (stdoutput->arch_info->bits_per_address - 1) / 8;
|
||||||
|
n |= n >> 1;
|
||||||
|
n |= n >> 2;
|
||||||
|
n += 1;
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Set up pseudo-op tables. */
|
/* Set up pseudo-op tables. */
|
||||||
|
|
||||||
static struct hash_control *po_hash;
|
static struct hash_control *po_hash;
|
||||||
@ -263,6 +281,9 @@ static const pseudo_typeS potable[] = {
|
|||||||
{"common.s", s_mri_common, 1},
|
{"common.s", s_mri_common, 1},
|
||||||
{"data", s_data, 0},
|
{"data", s_data, 0},
|
||||||
{"dc", cons, 2},
|
{"dc", cons, 2},
|
||||||
|
#ifdef TC_ADDRESS_BYTES
|
||||||
|
{"dc.a", cons, 0},
|
||||||
|
#endif
|
||||||
{"dc.b", cons, 1},
|
{"dc.b", cons, 1},
|
||||||
{"dc.d", float_cons, 'd'},
|
{"dc.d", float_cons, 'd'},
|
||||||
{"dc.l", cons, 4},
|
{"dc.l", cons, 4},
|
||||||
@ -3335,6 +3356,11 @@ cons_worker (register int nbytes, /* 1=.byte, 2=.word, 4=.long. */
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef TC_ADDRESS_BYTES
|
||||||
|
if (nbytes == 0)
|
||||||
|
nbytes = TC_ADDRESS_BYTES ();
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef md_cons_align
|
#ifdef md_cons_align
|
||||||
md_cons_align (nbytes);
|
md_cons_align (nbytes);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2005-02-21 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* ld-elf/exclude1.s: Use ".dc.a".
|
||||||
|
* ld-elfvsb/hidden2.s: Likewise.
|
||||||
|
|
||||||
2005-02-21 Alan Modra <amodra@bigpond.net.au>
|
2005-02-21 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* ld-elf/warn1.d: Specify -Ttext.
|
* ld-elf/warn1.d: Specify -Ttext.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.globl include_sym
|
.globl include_sym
|
||||||
.data
|
.data
|
||||||
include_sym:
|
include_sym:
|
||||||
.long exclude_sym
|
.dc.a exclude_sym
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.data
|
.data
|
||||||
.hidden foo
|
.hidden foo
|
||||||
.global foo
|
.global foo
|
||||||
.long foo
|
.dc.a foo
|
||||||
|
Reference in New Issue
Block a user