diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-06-13 21:41:05 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-06-13 21:41:05 +0000 |
commit | b5217a7b7bbd47b4fc6580df280a127b45892255 (patch) | |
tree | 085932f1e22ef92b85c0d62de71156689ff1363a /gas/config/tc-i386.c | |
parent | c0d796cf810a84f10703c0390f7b1c5887b837c9 (diff) | |
download | binutils-redhat-b5217a7b7bbd47b4fc6580df280a127b45892255.tar.gz |
Fix .dc.a for x32
gas/
* config/tc-i386.c (x86_address_bytes): New.
* config/tc-i386.h (TC_ADDRESS_BYTES): Likewise.
(x86_address_bytes): Likewise.
gas/testsuite/
* gas/i386/ilp32/x86-64-dc_a.d: New.
* gas/i386/ilp32/x86-64-dc_a.s: Likewise.
Diffstat (limited to 'gas/config/tc-i386.c')
-rw-r--r-- | gas/config/tc-i386.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index ccf54bcae5..d2b492762f 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -6619,6 +6619,17 @@ x86_cons_fix_new (fragS *frag, unsigned int off, unsigned int len, fix_new_exp (frag, off, len, exp, 0, r); } +/* Export the ABI address size for use by TC_ADDRESS_BYTES for the + purpose of the `.dc.a' internal pseudo-op. */ + +int +x86_address_bytes (void) +{ + if ((stdoutput->arch_info->mach & bfd_mach_x64_32)) + return 4; + return stdoutput->arch_info->bits_per_address / 8; +} + #if !(defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) || defined (OBJ_MACH_O)) \ || defined (LEX_AT) # define lex_got(reloc, adjust, types) NULL |