mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-30 17:31:13 +08:00
Fix typos in comments, and restore comment formatting destroyed by emacs at
some stage.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
2000-03-10 Alan Modra <alan@spri.levels.unisa.edu.au>
|
||||||
|
|
||||||
|
* reloc.c (bfd_perform_relocation): Undo emacs formatting of
|
||||||
|
comment, and ensure it doesn't happen again.
|
||||||
|
(bfd_install_relocation): Same here.
|
||||||
|
(_bfd_relocate_contents): Don't bother assigning unused signmask
|
||||||
|
shift result. Fix typos in comments.
|
||||||
|
Remove trailing whitespace throughout file.
|
||||||
|
|
||||||
2000-03-07 Doug Evans <dje@casey.transmeta.com>
|
2000-03-07 Doug Evans <dje@casey.transmeta.com>
|
||||||
|
|
||||||
* reloc.c (reloc_howto_struct): Fix partial_inplace comment.
|
* reloc.c (reloc_howto_struct): Fix partial_inplace comment.
|
||||||
|
56
bfd/reloc.c
56
bfd/reloc.c
@ -25,7 +25,7 @@ SECTION
|
|||||||
|
|
||||||
BFD maintains relocations in much the same way it maintains
|
BFD maintains relocations in much the same way it maintains
|
||||||
symbols: they are left alone until required, then read in
|
symbols: they are left alone until required, then read in
|
||||||
en-mass and translated into an internal form. A common
|
en-masse and translated into an internal form. A common
|
||||||
routine <<bfd_perform_relocation>> acts upon the
|
routine <<bfd_perform_relocation>> acts upon the
|
||||||
canonical form to do the fixup.
|
canonical form to do the fixup.
|
||||||
|
|
||||||
@ -359,7 +359,7 @@ CODE_FRAGMENT
|
|||||||
.
|
.
|
||||||
. {* The src_mask selects which parts of the read in data
|
. {* The src_mask selects which parts of the read in data
|
||||||
. are to be used in the relocation sum. E.g., if this was an 8 bit
|
. are to be used in the relocation sum. E.g., if this was an 8 bit
|
||||||
. bit of data which we read and relocated, this would be
|
. byte of data which we read and relocated, this would be
|
||||||
. 0x000000ff. When we have relocs which have an addend, such as
|
. 0x000000ff. When we have relocs which have an addend, such as
|
||||||
. sun4 extended relocs, the value in the offset part of a
|
. sun4 extended relocs, the value in the offset part of a
|
||||||
. relocating field is garbage so we never use it. In this case
|
. relocating field is garbage so we never use it. In this case
|
||||||
@ -885,23 +885,23 @@ space consuming. For each target:
|
|||||||
R result
|
R result
|
||||||
|
|
||||||
Do this:
|
Do this:
|
||||||
i i i i i o o o o o from bfd_get<size>
|
(( i i i i i o o o o o from bfd_get<size>
|
||||||
and S S S S S to get the size offset we want
|
and S S S S S) to get the size offset we want
|
||||||
+ r r r r r r r r r r to get the final value to place
|
+ r r r r r r r r r r) to get the final value to place
|
||||||
and D D D D D to chop to right size
|
and D D D D D to chop to right size
|
||||||
-----------------------
|
-----------------------
|
||||||
A A A A A
|
= A A A A A
|
||||||
And this:
|
And this:
|
||||||
... i i i i i o o o o o from bfd_get<size>
|
( i i i i i o o o o o from bfd_get<size>
|
||||||
and N N N N N get instruction
|
and N N N N N ) get instruction
|
||||||
-----------------------
|
-----------------------
|
||||||
... B B B B B
|
= B B B B B
|
||||||
|
|
||||||
And then:
|
And then:
|
||||||
B B B B B
|
( B B B B B
|
||||||
or A A A A A
|
or A A A A A)
|
||||||
-----------------------
|
-----------------------
|
||||||
R R R R R R R R R R put into bfd_put<size>
|
= R R R R R R R R R R put into bfd_put<size>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DOIT(x) \
|
#define DOIT(x) \
|
||||||
@ -1275,23 +1275,23 @@ space consuming. For each target:
|
|||||||
R result
|
R result
|
||||||
|
|
||||||
Do this:
|
Do this:
|
||||||
i i i i i o o o o o from bfd_get<size>
|
(( i i i i i o o o o o from bfd_get<size>
|
||||||
and S S S S S to get the size offset we want
|
and S S S S S) to get the size offset we want
|
||||||
+ r r r r r r r r r r to get the final value to place
|
+ r r r r r r r r r r) to get the final value to place
|
||||||
and D D D D D to chop to right size
|
and D D D D D to chop to right size
|
||||||
-----------------------
|
-----------------------
|
||||||
A A A A A
|
= A A A A A
|
||||||
And this:
|
And this:
|
||||||
... i i i i i o o o o o from bfd_get<size>
|
( i i i i i o o o o o from bfd_get<size>
|
||||||
and N N N N N get instruction
|
and N N N N N ) get instruction
|
||||||
-----------------------
|
-----------------------
|
||||||
... B B B B B
|
= B B B B B
|
||||||
|
|
||||||
And then:
|
And then:
|
||||||
B B B B B
|
( B B B B B
|
||||||
or A A A A A
|
or A A A A A)
|
||||||
-----------------------
|
-----------------------
|
||||||
R R R R R R R R R R put into bfd_put<size>
|
= R R R R R R R R R R put into bfd_put<size>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DOIT(x) \
|
#define DOIT(x) \
|
||||||
@ -1504,7 +1504,7 @@ _bfd_relocate_contents (howto, input_bfd, relocation, location)
|
|||||||
if ((b & signmask) != 0)
|
if ((b & signmask) != 0)
|
||||||
{
|
{
|
||||||
/* Set all the bits above the sign bit. */
|
/* Set all the bits above the sign bit. */
|
||||||
b -= signmask <<= 1;
|
b -= signmask << 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
b = (b & addrmask) >> bitpos;
|
b = (b & addrmask) >> bitpos;
|
||||||
@ -1560,7 +1560,7 @@ _bfd_relocate_contents (howto, input_bfd, relocation, location)
|
|||||||
If the field is signed and a is -4095 (0x1001) and b is
|
If the field is signed and a is -4095 (0x1001) and b is
|
||||||
-1 (0x1fff), the sum is -4096 (0x1000), but (0x1001 +
|
-1 (0x1fff), the sum is -4096 (0x1000), but (0x1001 +
|
||||||
0x1fff is 0x3000). It's not clear how to handle this
|
0x1fff is 0x3000). It's not clear how to handle this
|
||||||
everywhere, since there is not way to know how many bits
|
everywhere, since there is no way to know how many bits
|
||||||
are significant in the relocation, but the original code
|
are significant in the relocation, but the original code
|
||||||
assumed that it was fully sign extended, and we will keep
|
assumed that it was fully sign extended, and we will keep
|
||||||
that assumption. */
|
that assumption. */
|
||||||
@ -1570,7 +1570,7 @@ _bfd_relocate_contents (howto, input_bfd, relocation, location)
|
|||||||
{
|
{
|
||||||
/* Some bits out of the field are set. This might not
|
/* Some bits out of the field are set. This might not
|
||||||
be a problem: if this is a signed bitfield, it is OK
|
be a problem: if this is a signed bitfield, it is OK
|
||||||
iff all the high bits are set, including the sign
|
if all the high bits are set, including the sign
|
||||||
bit. We'll try setting all but the most significant
|
bit. We'll try setting all but the most significant
|
||||||
bit in the original relocation value: if this is all
|
bit in the original relocation value: if this is all
|
||||||
ones, we are OK, assuming a signed bitfield. */
|
ones, we are OK, assuming a signed bitfield. */
|
||||||
@ -1594,9 +1594,9 @@ _bfd_relocate_contents (howto, input_bfd, relocation, location)
|
|||||||
sum = a + b;
|
sum = a + b;
|
||||||
if (sum < a || (sum & ~ fieldmask) != 0)
|
if (sum < a || (sum & ~ fieldmask) != 0)
|
||||||
{
|
{
|
||||||
/* There was a carry out, or the field overflow. Test
|
/* There was a carry out, or the field overflowed. Test
|
||||||
for signed operands again. Here is the overflow test
|
for signed operands again. Here the overflow test is
|
||||||
is as for complain_overflow_signed. */
|
as for complain_overflow_signed. */
|
||||||
if (((~ (a ^ b)) & (a ^ sum)) & signmask)
|
if (((~ (a ^ b)) & (a ^ sum)) & signmask)
|
||||||
overflow = true;
|
overflow = true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user