Browse Source
* expr.c (add_to_result, subtract_from_result): Make global.
* expr.h (add_to_result, subtract_from_result): Add prototypes.
* config/tc-sh.c (sh_optimize_expr): Use add_to_result,
subtract_from_result to handle extra bit of precision for .sleb128
directive operands.
gas/testsuite/
* gas/all/gas.exp (sleb128-7): Don't run for tic4x, tic54x.
* gas/all/sleb128-2.s: Reformat, use _ at start of labels, remove
cruft.
* gas/all/sleb128-3.s: Likewise.
* gas/all/sleb128-4.s: Likewise.
* gas/all/sleb128-5.s: Likewise.
* gas/all/sleb128-7.s: Likewise.
* gas/all/sleb128-2.d: Handle data sections named $DATA$.
* gas/all/sleb128-3.d: Likewise.
* gas/all/sleb128-4.d: Likewise.
* gas/all/sleb128-5.d: Likewise.
* gas/all/sleb128-7.d: Likewise.
cygwin-64bit-premerge-branch
16 changed files with 91 additions and 75 deletions
@ -1,7 +1,7 @@ |
|||
#objdump : -s -j .data |
|||
#objdump : -s -j .data -j "\$DATA\$" |
|||
#name : .sleb128 tests (2) |
|||
|
|||
.*: .* |
|||
|
|||
Contents of section \.data: |
|||
Contents of section (\.data|\$DATA\$): |
|||
.* 7d2a.* |
|||
|
|||
@ -1,13 +1,10 @@ |
|||
.text |
|||
.globl foo |
|||
foo: |
|||
.L1: |
|||
.byte 0 |
|||
.byte 0 |
|||
.byte 0 |
|||
.L2: |
|||
.text |
|||
_L1: |
|||
.byte 0 |
|||
.byte 0 |
|||
.byte 0 |
|||
_L2: |
|||
|
|||
.data |
|||
bar: |
|||
.sleb128 .L1 - .L2 |
|||
.byte 42 |
|||
.data |
|||
.sleb128 _L1 - _L2 |
|||
.byte 42 |
|||
|
|||
@ -1,7 +1,7 @@ |
|||
#objdump : -s -j .data |
|||
#objdump : -s -j .data -j "\$DATA\$" |
|||
#name : .sleb128 tests (3) |
|||
|
|||
.*: .* |
|||
|
|||
Contents of section \.data: |
|||
Contents of section (\.data|\$DATA\$): |
|||
.* 9c7f2a.* |
|||
|
|||
@ -1,4 +1,3 @@ |
|||
.data |
|||
bar: |
|||
.sleb128 100 - 200 |
|||
.byte 42 |
|||
.data |
|||
.sleb128 100 - 200 |
|||
.byte 42 |
|||
|
|||
@ -1,7 +1,7 @@ |
|||
#objdump : -s -j .data |
|||
#objdump : -s -j .data -j "\$DATA\$" |
|||
#name : .sleb128 tests (4) |
|||
|
|||
.*: .* |
|||
|
|||
Contents of section \.data: |
|||
Contents of section (\.data|\$DATA\$): |
|||
.* 83808080 082a.* |
|||
|
|||
@ -1,13 +1,10 @@ |
|||
.text |
|||
.globl foo |
|||
foo: |
|||
.L1: |
|||
.byte 0 |
|||
.byte 0 |
|||
.byte 0 |
|||
.L2: |
|||
.text |
|||
_L1: |
|||
.byte 0 |
|||
.byte 0 |
|||
.byte 0 |
|||
_L2: |
|||
|
|||
.data |
|||
bar: |
|||
.sleb128 .L2 - .L1 + (1 << 31) |
|||
.byte 42 |
|||
.data |
|||
.sleb128 _L2 - _L1 + (1 << 31) |
|||
.byte 42 |
|||
|
|||
@ -1,7 +1,7 @@ |
|||
#objdump : -s -j .data |
|||
#objdump : -s -j .data -j "\$DATA\$" |
|||
#name : .sleb128 tests (5) |
|||
|
|||
.*: .* |
|||
|
|||
Contents of section \.data: |
|||
Contents of section (\.data|\$DATA\$): |
|||
.* 012a.* |
|||
|
|||
@ -1,13 +1,10 @@ |
|||
.text |
|||
.globl foo |
|||
foo: |
|||
.L1: |
|||
.byte 0 |
|||
.byte 0 |
|||
.byte 0 |
|||
.L2: |
|||
.text |
|||
_L1: |
|||
.byte 0 |
|||
.byte 0 |
|||
.byte 0 |
|||
_L2: |
|||
|
|||
.data |
|||
bar: |
|||
.sleb128 .L1 - .L2 + 4 |
|||
.byte 42 |
|||
.data |
|||
.sleb128 _L1 - _L2 + 4 |
|||
.byte 42 |
|||
|
|||
@ -1,7 +1,7 @@ |
|||
#objdump : -s -j .data |
|||
#objdump : -s -j .data -j "\$DATA\$" |
|||
#name : .sleb128 tests (7) |
|||
|
|||
.*: .* |
|||
|
|||
Contents of section \.data: |
|||
Contents of section (\.data|\$DATA\$): |
|||
.* cb012ac5 012acb01 2ac5012a.* |
|||
|
|||
@ -1,19 +1,16 @@ |
|||
.text |
|||
.globl foo |
|||
foo: |
|||
.L1: |
|||
.byte 0 |
|||
.byte 0 |
|||
.byte 0 |
|||
.L2: |
|||
.text |
|||
_L1: |
|||
.byte 0 |
|||
.byte 0 |
|||
.byte 0 |
|||
_L2: |
|||
|
|||
.data |
|||
bar: |
|||
.sleb128 200+(.L2 - .L1) |
|||
.byte 42 |
|||
.sleb128 200+(.L1 - .L2) |
|||
.byte 42 |
|||
.sleb128 (.L2 - .L1)+200 |
|||
.byte 42 |
|||
.sleb128 (.L1 - .L2)+200 |
|||
.byte 42 |
|||
.data |
|||
.sleb128 200+(_L2 - _L1) |
|||
.byte 42 |
|||
.sleb128 200+(_L1 - _L2) |
|||
.byte 42 |
|||
.sleb128 (_L2 - _L1)+200 |
|||
.byte 42 |
|||
.sleb128 (_L1 - _L2)+200 |
|||
.byte 42 |
|||
|
|||
Loading…
Reference in new issue