summaryrefslogtreecommitdiff
path: root/gas/config/tc-aarch64.c
Commit message (Collapse)AuthorAgeFilesLines
* [AArch64, ILP32] Retire -milp32 and -mlp64; use -mabi=ilp32 and -mabi=lp64.Yufeng Zhang2013-07-191-5/+51
| | | | | | | | | | | | | | | | | | | | gas/ * config/tc-aarch64.c (enum aarch64_abi_type): New enumeration tag. (AARCH64_ABI_LP64, AARCH64_ABI_ILP32): New enumerators. (aarch64_abi): New variable. (ilp32_p): Change to be a macro. (aarch64_opts): Remove the support for option -milp32 and -mlp64. (struct aarch64_option_abi_value_table): New struct. (aarch64_abis): New table. (aarch64_parse_abi): New function. (aarch64_long_opts): Add entry for -mabi=. * doc/as.texinfo (Target AArch64 options): Document -mabi. * doc/c-aarch64.texi: Likewise. gas/testsuite/ * gas/aarch64/ilp32-basic.d (#as): Update to use -mabi=ilp32
* [PATCH, COMMITTED] [AArch64] Replace the :got_prel19: address modifier with ↵mshawcroft2013-07-031-7/+3
| | | | :got:
* [AArch64] Tidy up switch statement in GAS.mshawcroft2013-07-031-32/+32
|
* [AArch64, ILP32] 3/6 Support for ELF32 relocs and refactor reloc handlingYufeng Zhang2013-06-261-3/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bfd/ * bfd-in2.h: Re-generated. * elfnn-aarch64.c (HOWTO64, HOWTO32): New define. (IS_AARCH64_TLS_RELOC): Change to be based on the bfd reloc enumerators. (IS_AARCH64_TLSDESC_RELOC): Likewise. (PG, PG_OFFSET): Cast literal to bfd_vma. (elf64_aarch64_howto_table): Removed. (elf64_aarch64_howto_dynrelocs): Removed. (elf64_aarch64_tls_howto_table): Removed. (elf64_aarch64_tlsdesc_howto_table): Removed. (elfNN_aarch64_howto_table): New table to host all howto entires.. (R_AARCH64_*): Replaced by AARCH64_R (*) and AARCH64_R_STR (*). (elfNN_aarch64_bfd_reloc_from_howto): New function. (elfNN_aarch64_bfd_reloc_from_type): Ditto. (struct elf_aarch64_reloc_map): New. (elf_aarch64_reloc_map): New table. (elfNN_aarch64_howto_from_bfd_reloc): New function. (elfNN_aarch64_howto_from_type): Update to look up the new table elfNN_aarch64_howto_table. (struct elf64_aarch64_reloc_map): Remove. (elf64_aarch64_reloc_map): Remove. (elfNN_aarch64_reloc_type_lookup): Change to call elfNN_aarch64_howto_from_bfd_reloc. (elfNN_aarch64_reloc_name_lookup): Change to look up the new table elfNN_aarch64_howto_table. (aarch64_resolve_relocation): Refactor to switch on the bfd reloc enumerators. (bfd_elf_aarch64_put_addend): Likewise. (elfNN_aarch64_final_link_relocate): Likewise. (aarch64_tls_transition_without_check): Likewise. (aarch64_reloc_got_type): Likewise. (aarch64_can_relax_tls): Likewise. (aarch64_tls_transition): Likewise. (elfNN_aarch64_tls_relax): Likewise. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_relocate_section): Likewise. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise. (aarch64_tls_transition): Change to return a bfd reloc enumerator. * libbfd.h: Re-generated. * reloc.c: Re-order the AArch64 bfd reloc enumerators. (BFD_RELOC_AARCH64_RELOC_START) (BFD_RELOC_AARCH64_RELOC_END) (BFD_RELOC_AARCH64_LD_GOT_LO12_NC) (BFD_RELOC_AARCH64_LD32_GOT_LO12_NC) (BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC) (BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC) (BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC) (BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC) (BFD_RELOC_AARCH64_IRELATIVE): New relocs. gas/ * config/tc-aarch64.c (reloc_table): Replace BFD_RELOC_AARCH64_LD64_GOT_LO12_NC with BFD_RELOC_AARCH64_LD_GOT_LO12_NC; likewise to BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC and BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC. (md_apply_fix): Handle BFD_RELOC_AARCH64_LD_GOT_LO12_NC, BFD_RELOC_AARCH64_LD32_GOT_LO12_NC, BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC, BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC and BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC. (aarch64_force_relocation): Likewise. gas/testsuite/ * gas/aarch64/ilp32-basic.d: New file. * gas/aarch64/ilp32-basic.s: New file. include/elf/ * aarch64.h: Add ELF32 reloc codes and remove fake ELF64 ones. (R_AARCH64_IRELATIVE): New reloc.
* [AArch64, ILP32] 2/6 Parametrize elfnn-aarch64.c and add basic support in ldYufeng Zhang2013-06-261-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and gas. bfd/ * Makefile.am (BFD64_BACKENDS): Add elf32-aarch64.lo. (BUILD_CFILES): Add elf32-aarch64.c. (elf32-aarch64.c): New rule for generating from elfnn-aarch64.c. * Makefile.in: Re-generated. * archures.c (bfd_mach_aarch64_ilp32): New define. * bfd-in.h (bfd_elf32_aarch64_init_maps): New declaration. (bfd_elf32_aarch64_set_options): Ditto. (elf32_aarch64_setup_section_lists): Ditto. (elf32_aarch64_next_input_section): Ditto. (elf32_aarch64_size_stubs): Ditto. (elf32_aarch64_build_stubs): Ditto. * bfd-in2.h: Re-generated. * config.bfd (aarch64-*-elf): Add bfd_elf32_littleaarch64_vec and bfd_elf32_bigaarch64_vec. (aarch64-*-linux*): Likewise. (aarch64_be-*-elf): Likewise. (aarch64_be-*-linux*): Likewise. * configure.in (bfd_elf32_bigaarch64_vec) (bfd_elf32_littleaarch64_vec): New. * configure: Re-generated. * cpu-aarch64.c (compatible): Don't allow mixing ilp32 objects with lp64 ones. (bfd_aarch64_arch_ilp32): New. (bfd_aarch64_arch): Link to bfd_aarch64_arch_ilp32. * elfnn-aarch64.c (ARCH_SIZE): New define. (AARCH64_R, AARCH64_R_STR, LOG_FILE_ALIGN): New defines. (GOT_ENTRY_SIZE): Re-define as (ARCH_SIZE / 8). (elf64_aarch64_*): Rename to elfNN_aarch64_*. (ELF64_R_*): Rename to ELFNN_R_*. Plus other paramaterization. * targets.c (bfd_elf32_bigaarch64_vec, bfd_elf32_littleaarch64_vec): New declarations. (_bfd_target_vector): Add bfd_elf32_bigaarch64_vec and bfd_elf32_littleaarch64_vec. gas/ * config/tc-aarch64.c (ilp32_p): New static variable. (elf64_aarch64_target_format): Return the target according to the value of 'ilp32_p'. (md_begin): Determine 'mach' according to the value of 'ilp32_p'. (aarch64_opts): Add support for options '-milp32' and '-mlp64'. (aarch64_dwarf2_addr_size): New function. * config/tc-aarch64.h (aarch64_dwarf2_addr_size): New declaration. (DWARF2_ADDR_SIZE): New define. ld/ * Makefile.am (ALL_64_EMULATION_SOURCES): Add eaarch64elf32.c. (eaarch64elf32.c): New dependency and rule. * Makefile.in: Re-generated. * configure.tgt (aarch64-*-elf): Add aarch64elf32. (aarch64_be-*-elf, aarch64_be-*-linux*, aarch64-*-linux*): Likewise. * emulparams/aarch64elf32.sh: New file.
* Correct the relocation names for R_AARCH64_TLSDESC_LD_PREL19 and ↵Yufeng Zhang2013-05-281-3/+3
| | | | R_AARCH64_TLSDESC_ADR_PAGE21.
* [AArch64] Range check only resolved relocations.mshawcroft2013-05-281-26/+27
| | | | | | | | | | | | | | | | | | | | 2013-05-28 Marcus Shawcroft <marcus.shawcroft@arm.com> * config/tc-aarch64.c (md_apply_fix): Move value range checking inside fx_done condition. 2013-05-28 Marcus Shawcroft <marcus.shawcroft@arm.com> * gas/aarch64/adr_1.d: New file. * gas/aarch64/adr_1.s: New file. * gas/aarch64/b_1.d: New file. * gas/aarch64/b_1.s: New file. * gas/aarch64/beq_1.d: New file. * gas/aarch64/beq_1.s: New file. * gas/aarch64/ldr_1.d: New file. * gas/aarch64/ldr_1.s: New file. * gas/aarch64/tbz_1.d: New file. * gas/aarch64/tbz_1.s: New file.
* Add to the AArch64 GAS the missing support for hexadecimal-formatYufeng Zhang2013-03-051-30/+124
| | | | | | | | | | | | | | | | | | | | | | floating-point literal in the FMOV instruction. gas/ * config/tc-aarch64.c (aarch64_imm_float_p): Rename 'e' to 'pattern'; add comment. (aarch64_double_precision_fmovable): New function. (parse_aarch64_imm_float): Add parameter 'dp_p'; call the new function; handle hexadecimal representation of IEEE754 encoding. (parse_operands): Update the call to parse_aarch64_imm_float. gas/testsuite/ * gas/aarch64/diagnostic.s: Add test. * gas/aarch64/diagnostic.l: Update. * gas/aarch64/illegal.s: Add test. * gas/aarch64/illegal.l: Update. * gas/aarch64/fpmov.s: New file. * gas/aarch64/fpmov.d: New file.
* include/opcode/Yufeng Zhang2013-02-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | * aarch64.h (AARCH64_FEATURE_CRC): New macro. opcodes/ * aarch64-tbl.h (QL_I3SAMEW, QL_I3WWX): New macros. (aarch64_feature_crc): New static. (CRC): New macro. (aarch64_opcode_table): Add entries for the crc32b, crc32h, crc32w, crc32x, crc32cb, crc32ch, crc32cw and crc32cx instructions. * aarch64-asm-2.c: Re-generate. * aarch64-dis-2.c: Ditto. * aarch64-opc-2.c: Ditto. gas/ * config/tc-aarch64.c (aarch64_features): Add the 'crc' option. gas/testsuite/ * gas/aarch64/crc32.s: New test. * gas/aarch64/crc32.d: Ditto.
* gas/Yufeng Zhang2013-02-281-3/+7
| | | | | | | | | | | | * config/tc-aarch64.c (parse_sys_reg): Allow the full range of CRn for system registers. gas/testsuite/ * gas/aarch64/illegal.l: Delete the error message for msr S3_1_C13_C15_1,x7. * gas/aarch64/sysreg.s: Add new tests. * gas/aarch64/sysreg.d: Update.
* opcodes/Yufeng Zhang2013-02-141-3/+2
| | | | | | | | | | | | | | | | * aarch64-opc.c (aarch64_prfops): Change unnamed operation 'name' fields to NULL. (aarch64_print_operand): Adjust the printing for AARCH64_OPND_PRFOP. gas/ * config/tc-aarch64.c (md_begin): Change to check if 'name' is NULL. gas/testsuite/ * gas/aarch64/system.s: Add tests. * gas/aarch64/system.d: Update.
* include/opcode/Yufeng Zhang2013-01-171-22/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2013-01-17 Yufeng Zhang <yufeng.zhang@arm.com> * aarch64.h (aarch64_op): Remove OP_V_MOVI_B. opcodes/ 2013-01-17 Yufeng Zhang <yufeng.zhang@arm.com> * aarch64-asm.c (aarch64_ins_advsimd_imm_modified): Handle 8-bit MOVI. * aarch64-dis.c (aarch64_ext_advsimd_imm_modified): Likewise. * aarch64-opc.c (operand_general_constraint_met_p): For AARCH64_MOD_LSL, move the range check on the shift amount before the alignment check; change to call set_sft_amount_out_of_range_error instead of set_imm_out_of_range_error. * aarch64-tbl.h (QL_SIMD_IMM_B): Replace NIL with LSL. (aarch64_opcode_table): Remove the OP enumerator from the asimdimm 8-bit MOVI entry; change the 2nd operand from SIMD_IMM to SIMD_IMM_SFT. gas/ 2013-01-17 Yufeng Zhang <yufeng.zhang@arm.com> * config/tc-aarch64.c (output_operand_error_record): Change to output the out-of-range error message as value-expected message if there is only one single value in the expected range. (programmer_friendly_fixup): Remove the handling of 8-bit MOVI with LSL #0 as a programmer-friendly feature. gas/testsuite/ 2013-01-17 Yufeng Zhang <yufeng.zhang@arm.com> * gas/aarch64/diagnostic.l: Update. * gas/aarch64/movi.s: Add tests. * gas/aarch64/movi.d: Update. * gas/aarch64/programmer-friendly.s: Add comment.
* gas/Yufeng Zhang2013-01-081-3/+6
| | | | | | | | | | | | | | 2013-01-08 Yufeng Zhang <yufeng.zhang@arm.com> * config/tc-aarch64.c (parse_operands): Change to compare the result of function call 'parse_sys_reg' with 'PARSE_FAIL' instead of 'FALSE'. gas/testsuite/ 2013-01-08 Yufeng Zhang <yufeng.zhang@arm.com> * gas/aarch64/diagnostic.s: Add test. * gas/aarch64/diagnostic.l: Update.
* gas/ Yufeng Zhang2013-01-021-0/+2
| | | | | | | 2013-01-02 Yufeng Zhang <yufeng.zhang@arm.com> * config/tc-aarch64.c (aarch64_cpus): Add entries for "cortex-a53" and "cortex57".
* gas/Yufeng Zhang2012-12-061-37/+2
| | | | | | | | | | | | | | | | | | | 2012-12-06 Yufeng Zhang <yufeng.zhang@arm.com> * config/tc-aarch64.c (exp_has_bignum_p): Remove. (my_get_expression): Not get rid of bignums. (s_ltorg): Increase the range of 'align'. (programmer_friendly_fixup): Allow bignum expression. gas/testsuite/ 2012-12-06 Yufeng Zhang <yufeng.zhang@arm.com> * gas/aarch64/illegal.s: Add test for unaccepted LDR literal. * gas/aarch64/illegal.l: Update. * gas/aarch64/programmer-friendly.s: Add tests for LDR literal with the auto-generation of literal in pool. * gas/aarch64/programmer-friendly.d: Update.
* gas/ChangeLogYufeng Zhang2012-11-201-1/+1
| | | | | | | 2012-11-20 Yufeng Zhang <yufeng.zhang@arm.com> * config/tc-aarch64.c (first_error_fmt): Add ATTRIBUTE_UNUSED to the local variable "ret".
* 2012-09-17 Yufeng Zhang <yufeng.zhang@arm.com>Richard Earnshaw2012-09-171-1/+1
| | | | | | | | | | | | | gas: * config/tc-aarch64.c (aarch64_archs): Rename 'armv8' to 'armv8-a'. gas/testsuite: * gas/aarch64/crypto.d (#as): Update for v8->v8-A change. * gas/aarch64/int-insns.d (#as): Likewise. * gas/aarch64/legacy_reg_names.s (.arch): Likewise. * gas/aarch64/neon-not.s (.arch): Likewise. * gas/aarch64/neon-vfp-reglist-post.s (.arch): Likewise. * gas/aarch64/neon-vfp-reglist.s (.arch): Likewise.
* 2012-09-11 Chris Schlumberger-Socha <chris.schlumberger-socha@arm.com>Richard Earnshaw2012-09-121-37/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bfd/ * bfd-in2.h: Regenerated. * elf64-aarch64.c (elf64_aarch64_howto_table): Add R_AARCH64_GOT_LD_PREL19 reloc to HOWTO. (elf64_aarch64_reloc_map): Add reloc entry. (aarch64_resolve_relocation): Likewise. (bfd_elf_aarch64_put_addend): Likewise. (aarch64_reloc_got_type): Likewise. (elf64_aarch64_final_link_relocate): Likewise. (lf64_aarch64_check_relocs): Likewise. (elf64_aarch64_check_relocs): New case for R_AARCH64_ADR_PREL_LO21 reloc. * libbfd.h: Regenerated. * reloc.c (R_AARCH64_GOT_LD_PREL19): New reloc. gas/ * config/tc-aarch64.c (reloc_table): Add reloc to table entry. (parse_address_main): Add support for #:<reloc_op>:<symbol>. (parse_operands): Check for unused reloc. (md_apply_fix): New case for reloc. (aarch64_force_relocation): Likewise. gas/testsuite * gas/aarch64/reloc-insn.d (BFD_RELOC_AARCH64_GOT_LD_PREL19): Add expected asm for new reloc test. * gas/aarch64/reloc-insn.s (BFD_RELOC_AARCH64_GOT_LD_PREL19): Add test for reloc. include/ * elf/aarch64.h (R_AARCH64_GOT_LD_PREL19): New reloc. ld/testsuite * ld-aarch64/aarch64-elf.exp: New reloc tests. * ld-aarch64/emit-relocs-309-low-bad.d: New file. Expected asm for test failure (lower bound overflow). * ld-aarch64/emit-relocs-309-low.d: New file. Expected asm for test success (lower bound). * ld-aarch64/emit-relocs-309-up-bad.d: New file. Expected asm for test failure (upper bound overflow). * ld-aarch64/emit-relocs-309-up.d: New file. Expected asm for test success (upper bound). * ld-aarch64/emit-relocs-309.s: New file. Asm for new reloc tests.
* Add support for 64-bit ARM architecture: AArch64Nick Clifton2012-08-131-0/+7349