[patch][GAS] combine NUMBERS_WITH_SUFFIX with LOCAL_LABELS_FB (for z80)

Arnold Metselaar arnold.metselaar@planet.nl
Sun Oct 30 20:04:00 GMT 2005


hello,

The patch below allows the usage of backward references on 
targets with NUMBERS_WITH_SUFFIX. If NUMBERS_WITH_SUFFIX and 
LOCAL_LABELS_FB are both defined as 1, then suffix 'B' 
indicates a binary number and suffix 'b' indicates a backward 
reference to a local numeric label.
The Z80 target is currently the only one that has both 
NUMBERS_WITH_SUFFIX and LOCAL_LABELS_FB.

I added a testcase that covers all suffixes for Z80.

Arnold

ChangeLog:
* expr.c (integer_constant): Only match 'b' as binary suffix if 
LOCAL_LABELS_FB == 0.
* testsuite/gas/z80/z80.exp: Added "suffix" test.
* testsuite/gas/z80/suffix.s: New file.
* testsuite/gas/z80/suffix.d: New file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: suffix.patch
Type: text/x-diff
Size: 1223 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20051030/3a0a2183/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testsuite/gas/z80/suffix.s
Type: application/x-troff
Size: 174 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20051030/3a0a2183/attachment.tr>
-------------- next part --------------
#objdump: -s -r -j .data
#name: suffixes

.*:.*

RELOCATION RECORDS FOR \[.data\]:
OFFSET[ 	]+TYPE[ 	]+VALUE[ 	]*
00000002[ 	]+r_imm16[ 	]+.data[ 	]*
00000014[ 	]+r_imm16[ 	]+.data[ 	]*


Contents of section .data:
 0000 0a000000 08020802 08020802 f203f203[ 	]+................[ 	]*
 0010 10b010b0 1600[ 	]+......[ 	]*
#pass


More information about the Binutils mailing list