2013-03-14 18:00:46 +08:00
|
|
|
@c Copyright 1996-2013 Free Software Foundation, Inc.
|
1999-05-03 15:29:11 +08:00
|
|
|
@c This is part of the GAS manual.
|
|
|
|
@c For copying conditions, see the file as.texinfo.
|
|
|
|
|
|
|
|
@ifset GENERIC
|
|
|
|
@page
|
|
|
|
@node ARM-Dependent
|
|
|
|
@chapter ARM Dependent Features
|
|
|
|
@end ifset
|
|
|
|
|
|
|
|
@ifclear GENERIC
|
|
|
|
@node Machine Dependencies
|
|
|
|
@chapter ARM Dependent Features
|
|
|
|
@end ifclear
|
|
|
|
|
|
|
|
@cindex ARM support
|
|
|
|
@cindex Thumb support
|
|
|
|
@menu
|
|
|
|
* ARM Options:: Options
|
|
|
|
* ARM Syntax:: Syntax
|
|
|
|
* ARM Floating Point:: Floating Point
|
|
|
|
* ARM Directives:: ARM Machine Directives
|
|
|
|
* ARM Opcodes:: Opcodes
|
2003-11-13 22:19:01 +08:00
|
|
|
* ARM Mapping Symbols:: Mapping Symbols
|
2008-08-27 00:02:59 +08:00
|
|
|
* ARM Unwinding Tutorial:: Unwinding
|
1999-05-03 15:29:11 +08:00
|
|
|
@end menu
|
|
|
|
|
|
|
|
@node ARM Options
|
|
|
|
@section Options
|
|
|
|
@cindex ARM options (none)
|
|
|
|
@cindex options for ARM (none)
|
2000-04-25 07:57:30 +08:00
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
@table @code
|
2000-04-25 07:57:30 +08:00
|
|
|
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
@cindex @code{-mcpu=} command line option, ARM
|
2002-01-21 08:20:58 +08:00
|
|
|
@item -mcpu=@var{processor}[+@var{extension}@dots{}]
|
1999-05-03 15:29:11 +08:00
|
|
|
This option specifies the target processor. The assembler will issue an
|
|
|
|
error message if an attempt is made to assemble an instruction which
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
will not execute on the target processor. The following processor names are
|
2013-01-11 03:51:55 +08:00
|
|
|
recognized:
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
@code{arm1},
|
|
|
|
@code{arm2},
|
|
|
|
@code{arm250},
|
|
|
|
@code{arm3},
|
|
|
|
@code{arm6},
|
|
|
|
@code{arm60},
|
|
|
|
@code{arm600},
|
|
|
|
@code{arm610},
|
|
|
|
@code{arm620},
|
|
|
|
@code{arm7},
|
|
|
|
@code{arm7m},
|
|
|
|
@code{arm7d},
|
|
|
|
@code{arm7dm},
|
|
|
|
@code{arm7di},
|
|
|
|
@code{arm7dmi},
|
|
|
|
@code{arm70},
|
|
|
|
@code{arm700},
|
|
|
|
@code{arm700i},
|
|
|
|
@code{arm710},
|
|
|
|
@code{arm710t},
|
|
|
|
@code{arm720},
|
|
|
|
@code{arm720t},
|
|
|
|
@code{arm740t},
|
|
|
|
@code{arm710c},
|
|
|
|
@code{arm7100},
|
|
|
|
@code{arm7500},
|
|
|
|
@code{arm7500fe},
|
|
|
|
@code{arm7t},
|
|
|
|
@code{arm7tdmi},
|
2004-09-02 00:34:29 +08:00
|
|
|
@code{arm7tdmi-s},
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
@code{arm8},
|
|
|
|
@code{arm810},
|
|
|
|
@code{strongarm},
|
|
|
|
@code{strongarm1},
|
|
|
|
@code{strongarm110},
|
|
|
|
@code{strongarm1100},
|
|
|
|
@code{strongarm1110},
|
|
|
|
@code{arm9},
|
|
|
|
@code{arm920},
|
|
|
|
@code{arm920t},
|
|
|
|
@code{arm922t},
|
|
|
|
@code{arm940t},
|
|
|
|
@code{arm9tdmi},
|
2008-05-21 16:20:17 +08:00
|
|
|
@code{fa526} (Faraday FA526 processor),
|
|
|
|
@code{fa626} (Faraday FA626 processor),
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
@code{arm9e},
|
2003-12-30 00:43:37 +08:00
|
|
|
@code{arm926e},
|
2004-09-02 00:34:29 +08:00
|
|
|
@code{arm926ej-s},
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
@code{arm946e-r0},
|
|
|
|
@code{arm946e},
|
2005-09-27 21:23:38 +08:00
|
|
|
@code{arm946e-s},
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
@code{arm966e-r0},
|
|
|
|
@code{arm966e},
|
2005-09-27 21:23:38 +08:00
|
|
|
@code{arm966e-s},
|
|
|
|
@code{arm968e-s},
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
@code{arm10t},
|
2005-09-27 21:23:38 +08:00
|
|
|
@code{arm10tdmi},
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
@code{arm10e},
|
|
|
|
@code{arm1020},
|
|
|
|
@code{arm1020t},
|
2003-12-30 00:43:37 +08:00
|
|
|
@code{arm1020e},
|
2005-09-27 21:23:38 +08:00
|
|
|
@code{arm1022e},
|
2004-09-02 00:34:29 +08:00
|
|
|
@code{arm1026ej-s},
|
2011-01-18 22:10:44 +08:00
|
|
|
@code{fa606te} (Faraday FA606TE processor),
|
|
|
|
@code{fa616te} (Faraday FA616TE processor),
|
2008-05-21 16:20:17 +08:00
|
|
|
@code{fa626te} (Faraday FA626TE processor),
|
2011-01-18 22:10:44 +08:00
|
|
|
@code{fmp626} (Faraday FMP626 processor),
|
2008-05-21 16:20:17 +08:00
|
|
|
@code{fa726te} (Faraday FA726TE processor),
|
2004-09-02 00:34:29 +08:00
|
|
|
@code{arm1136j-s},
|
|
|
|
@code{arm1136jf-s},
|
2005-09-27 21:23:38 +08:00
|
|
|
@code{arm1156t2-s},
|
|
|
|
@code{arm1156t2f-s},
|
2004-10-01 00:21:50 +08:00
|
|
|
@code{arm1176jz-s},
|
|
|
|
@code{arm1176jzf-s},
|
|
|
|
@code{mpcore},
|
|
|
|
@code{mpcorenovfp},
|
2009-10-29 23:37:53 +08:00
|
|
|
@code{cortex-a5},
|
2011-11-08 00:20:48 +08:00
|
|
|
@code{cortex-a7},
|
2006-02-24 Paul Brook <paul@codesourcery.com>
gas/
* config/arm/tc-arm.c (arm_ext_v6_notm, arm_ext_div, arm_ext_v7,
arm_ext_v7a, arm_ext_v7r, arm_ext_v7m): New variables.
(struct asm_barrier_opt): Define.
(arm_v7m_psr_hsh, arm_barrier_opt_hsh): New variables.
(parse_psr): Accept V7M psr names.
(parse_barrier): New function.
(enum operand_parse_code): Add OP_oBARRIER.
(parse_operands): Implement OP_oBARRIER.
(do_barrier): New function.
(do_dbg, do_pli, do_t_barrier, do_t_dbg, do_t_div): New functions.
(do_t_cpsi): Add V7M restrictions.
(do_t_mrs, do_t_msr): Validate V7M variants.
(md_assemble): Check for NULL variants.
(v7m_psrs, barrier_opt_names): New tables.
(insns): Add V7 instructions. Mark V6 instructions absent from V7M.
(md_begin): Initialize arm_v7m_psr_hsh and arm_barrier_opt_hsh.
(arm_cpu_option_table): Add Cortex-M3, R4 and A8.
(arm_arch_option_table): Add armv7, armv7a, armv7r and armv7m.
(struct cpu_arch_ver_table): Define.
(cpu_arch_ver): New.
(aeabi_set_public_attributes): Use cpu_arch_ver. Set
Tag_CPU_arch_profile.
* doc/c-arm.texi: Document new cpu and arch options.
gas/testsuite/
* gas/arm/thumb32.d: Fix expected msr and mrs output.
* gas/arm/arch7.d: New test.
* gas/arm/arch7.s: New test.
* gas/arm/arch7m-bad.l: New test.
* gas/arm/arch7m-bad.d: New test.
* gas/arm/arch7m-bad.s: New test.
include/opcode/
* arm.h: Add V7 feature bits.
opcodes/
* arm-dis.c (arm_opcodes): Add V7 instructions.
(thumb32_opcodes): Ditto. Handle V7M MSR/MRS variants.
(print_arm_address): New function.
(print_insn_arm): Use it. Add 'P' and 'U' cases.
(psr_name): New function.
(print_insn_thumb32): Add 'U', 'C' and 'D' cases.
2006-02-24 23:36:36 +08:00
|
|
|
@code{cortex-a8},
|
2008-03-09 23:20:31 +08:00
|
|
|
@code{cortex-a9},
|
2010-09-09 20:08:13 +08:00
|
|
|
@code{cortex-a15},
|
2006-02-24 Paul Brook <paul@codesourcery.com>
gas/
* config/arm/tc-arm.c (arm_ext_v6_notm, arm_ext_div, arm_ext_v7,
arm_ext_v7a, arm_ext_v7r, arm_ext_v7m): New variables.
(struct asm_barrier_opt): Define.
(arm_v7m_psr_hsh, arm_barrier_opt_hsh): New variables.
(parse_psr): Accept V7M psr names.
(parse_barrier): New function.
(enum operand_parse_code): Add OP_oBARRIER.
(parse_operands): Implement OP_oBARRIER.
(do_barrier): New function.
(do_dbg, do_pli, do_t_barrier, do_t_dbg, do_t_div): New functions.
(do_t_cpsi): Add V7M restrictions.
(do_t_mrs, do_t_msr): Validate V7M variants.
(md_assemble): Check for NULL variants.
(v7m_psrs, barrier_opt_names): New tables.
(insns): Add V7 instructions. Mark V6 instructions absent from V7M.
(md_begin): Initialize arm_v7m_psr_hsh and arm_barrier_opt_hsh.
(arm_cpu_option_table): Add Cortex-M3, R4 and A8.
(arm_arch_option_table): Add armv7, armv7a, armv7r and armv7m.
(struct cpu_arch_ver_table): Define.
(cpu_arch_ver): New.
(aeabi_set_public_attributes): Use cpu_arch_ver. Set
Tag_CPU_arch_profile.
* doc/c-arm.texi: Document new cpu and arch options.
gas/testsuite/
* gas/arm/thumb32.d: Fix expected msr and mrs output.
* gas/arm/arch7.d: New test.
* gas/arm/arch7.s: New test.
* gas/arm/arch7m-bad.l: New test.
* gas/arm/arch7m-bad.d: New test.
* gas/arm/arch7m-bad.s: New test.
include/opcode/
* arm.h: Add V7 feature bits.
opcodes/
* arm-dis.c (arm_opcodes): Add V7 instructions.
(thumb32_opcodes): Ditto. Handle V7M MSR/MRS variants.
(print_arm_address): New function.
(print_insn_arm): Use it. Add 'P' and 'U' cases.
(psr_name): New function.
(print_insn_thumb32): Add 'U', 'C' and 'D' cases.
2006-02-24 23:36:36 +08:00
|
|
|
@code{cortex-r4},
|
2009-09-08 00:34:39 +08:00
|
|
|
@code{cortex-r4f},
|
2013-02-25 10:53:41 +08:00
|
|
|
@code{cortex-r5},
|
|
|
|
@code{cortex-r7},
|
2010-09-14 17:16:21 +08:00
|
|
|
@code{cortex-m4},
|
2006-02-24 Paul Brook <paul@codesourcery.com>
gas/
* config/arm/tc-arm.c (arm_ext_v6_notm, arm_ext_div, arm_ext_v7,
arm_ext_v7a, arm_ext_v7r, arm_ext_v7m): New variables.
(struct asm_barrier_opt): Define.
(arm_v7m_psr_hsh, arm_barrier_opt_hsh): New variables.
(parse_psr): Accept V7M psr names.
(parse_barrier): New function.
(enum operand_parse_code): Add OP_oBARRIER.
(parse_operands): Implement OP_oBARRIER.
(do_barrier): New function.
(do_dbg, do_pli, do_t_barrier, do_t_dbg, do_t_div): New functions.
(do_t_cpsi): Add V7M restrictions.
(do_t_mrs, do_t_msr): Validate V7M variants.
(md_assemble): Check for NULL variants.
(v7m_psrs, barrier_opt_names): New tables.
(insns): Add V7 instructions. Mark V6 instructions absent from V7M.
(md_begin): Initialize arm_v7m_psr_hsh and arm_barrier_opt_hsh.
(arm_cpu_option_table): Add Cortex-M3, R4 and A8.
(arm_arch_option_table): Add armv7, armv7a, armv7r and armv7m.
(struct cpu_arch_ver_table): Define.
(cpu_arch_ver): New.
(aeabi_set_public_attributes): Use cpu_arch_ver. Set
Tag_CPU_arch_profile.
* doc/c-arm.texi: Document new cpu and arch options.
gas/testsuite/
* gas/arm/thumb32.d: Fix expected msr and mrs output.
* gas/arm/arch7.d: New test.
* gas/arm/arch7.s: New test.
* gas/arm/arch7m-bad.l: New test.
* gas/arm/arch7m-bad.d: New test.
* gas/arm/arch7m-bad.s: New test.
include/opcode/
* arm.h: Add V7 feature bits.
opcodes/
* arm-dis.c (arm_opcodes): Add V7 instructions.
(thumb32_opcodes): Ditto. Handle V7M MSR/MRS variants.
(print_arm_address): New function.
(print_insn_arm): Use it. Add 'P' and 'U' cases.
(psr_name): New function.
(print_insn_thumb32): Add 'U', 'C' and 'D' cases.
2006-02-24 23:36:36 +08:00
|
|
|
@code{cortex-m3},
|
2009-04-02 17:43:56 +08:00
|
|
|
@code{cortex-m1},
|
|
|
|
@code{cortex-m0},
|
2012-03-29 18:28:40 +08:00
|
|
|
@code{cortex-m0plus},
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
@code{ep9312} (ARM920 with Cirrus Maverick coprocessor),
|
|
|
|
@code{i80200} (Intel XScale processor)
|
2003-03-26 04:56:01 +08:00
|
|
|
@code{iwmmxt} (Intel(r) XScale processor with Wireless MMX(tm) technology coprocessor)
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
and
|
2013-01-11 03:51:55 +08:00
|
|
|
@code{xscale}.
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
The special name @code{all} may be used to allow the
|
|
|
|
assembler to accept instructions valid for any ARM processor.
|
|
|
|
|
2013-01-11 03:51:55 +08:00
|
|
|
In addition to the basic instruction set, the assembler can be told to
|
|
|
|
accept various extension mnemonics that extend the processor using the
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
co-processor instruction space. For example, @code{-mcpu=arm920+maverick}
|
2013-01-11 03:51:55 +08:00
|
|
|
is equivalent to specifying @code{-mcpu=ep9312}.
|
2010-09-23 23:11:56 +08:00
|
|
|
|
2013-01-11 03:51:55 +08:00
|
|
|
Multiple extensions may be specified, separated by a @code{+}. The
|
2010-09-23 23:11:56 +08:00
|
|
|
extensions should be specified in ascending alphabetical order.
|
|
|
|
|
2013-01-11 03:51:55 +08:00
|
|
|
Some extensions may be restricted to particular architectures; this is
|
2010-09-23 23:18:19 +08:00
|
|
|
documented in the list of extensions below.
|
|
|
|
|
2013-01-11 03:51:55 +08:00
|
|
|
Extension mnemonics may also be removed from those the assembler accepts.
|
|
|
|
This is done be prepending @code{no} to the option that adds the extension.
|
|
|
|
Extensions that are removed should be listed after all extensions which have
|
|
|
|
been added, again in ascending alphabetical order. For example,
|
2010-09-23 23:11:56 +08:00
|
|
|
@code{-mcpu=ep9312+nomaverick} is equivalent to specifying @code{-mcpu=arm920}.
|
|
|
|
|
|
|
|
|
2010-09-23 23:37:45 +08:00
|
|
|
The following extensions are currently supported:
|
2012-08-24 15:50:38 +08:00
|
|
|
@code{crypto} (Cryptography Extensions for v8-A architecture, implies @code{fp+simd}),
|
|
|
|
@code{fp} (Floating Point Extensions for v8-A architecture),
|
|
|
|
@code{idiv} (Integer Divide Extensions for v7-A and v7-R architectures),
|
2010-09-23 23:11:56 +08:00
|
|
|
@code{iwmmxt},
|
|
|
|
@code{iwmmxt2},
|
|
|
|
@code{maverick},
|
2010-09-23 23:18:19 +08:00
|
|
|
@code{mp} (Multiprocessing Extensions for v7-A and v7-R architectures),
|
2010-09-23 23:31:34 +08:00
|
|
|
@code{os} (Operating System for v6M architecture),
|
2010-09-23 23:26:24 +08:00
|
|
|
@code{sec} (Security Extensions for v6K and v7-A architectures),
|
2012-08-24 15:50:38 +08:00
|
|
|
@code{simd} (Advanced SIMD Extensions for v8-A architecture, implies @code{fp}),
|
2013-01-11 03:51:55 +08:00
|
|
|
@code{virt} (Virtualization Extensions for v7-A architecture, implies
|
2010-09-23 23:52:19 +08:00
|
|
|
@code{idiv}),
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
and
|
2010-09-23 23:11:56 +08:00
|
|
|
@code{xscale}.
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
|
|
|
|
@cindex @code{-march=} command line option, ARM
|
2002-01-21 08:20:58 +08:00
|
|
|
@item -march=@var{architecture}[+@var{extension}@dots{}]
|
1999-05-03 15:29:11 +08:00
|
|
|
This option specifies the target architecture. The assembler will issue
|
|
|
|
an error message if an attempt is made to assemble an instruction which
|
2013-01-11 03:51:55 +08:00
|
|
|
will not execute on the target architecture. The following architecture
|
|
|
|
names are recognized:
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
@code{armv1},
|
|
|
|
@code{armv2},
|
|
|
|
@code{armv2a},
|
|
|
|
@code{armv2s},
|
|
|
|
@code{armv3},
|
|
|
|
@code{armv3m},
|
|
|
|
@code{armv4},
|
|
|
|
@code{armv4xm},
|
|
|
|
@code{armv4t},
|
|
|
|
@code{armv4txm},
|
|
|
|
@code{armv5},
|
|
|
|
@code{armv5t},
|
|
|
|
@code{armv5txm},
|
|
|
|
@code{armv5te},
|
2003-12-06 09:25:29 +08:00
|
|
|
@code{armv5texp},
|
2003-12-24 02:48:02 +08:00
|
|
|
@code{armv6},
|
2003-12-18 13:45:13 +08:00
|
|
|
@code{armv6j},
|
2004-10-01 00:21:50 +08:00
|
|
|
@code{armv6k},
|
|
|
|
@code{armv6z},
|
|
|
|
@code{armv6zk},
|
2010-09-23 23:31:34 +08:00
|
|
|
@code{armv6-m},
|
|
|
|
@code{armv6s-m},
|
2006-02-24 Paul Brook <paul@codesourcery.com>
gas/
* config/arm/tc-arm.c (arm_ext_v6_notm, arm_ext_div, arm_ext_v7,
arm_ext_v7a, arm_ext_v7r, arm_ext_v7m): New variables.
(struct asm_barrier_opt): Define.
(arm_v7m_psr_hsh, arm_barrier_opt_hsh): New variables.
(parse_psr): Accept V7M psr names.
(parse_barrier): New function.
(enum operand_parse_code): Add OP_oBARRIER.
(parse_operands): Implement OP_oBARRIER.
(do_barrier): New function.
(do_dbg, do_pli, do_t_barrier, do_t_dbg, do_t_div): New functions.
(do_t_cpsi): Add V7M restrictions.
(do_t_mrs, do_t_msr): Validate V7M variants.
(md_assemble): Check for NULL variants.
(v7m_psrs, barrier_opt_names): New tables.
(insns): Add V7 instructions. Mark V6 instructions absent from V7M.
(md_begin): Initialize arm_v7m_psr_hsh and arm_barrier_opt_hsh.
(arm_cpu_option_table): Add Cortex-M3, R4 and A8.
(arm_arch_option_table): Add armv7, armv7a, armv7r and armv7m.
(struct cpu_arch_ver_table): Define.
(cpu_arch_ver): New.
(aeabi_set_public_attributes): Use cpu_arch_ver. Set
Tag_CPU_arch_profile.
* doc/c-arm.texi: Document new cpu and arch options.
gas/testsuite/
* gas/arm/thumb32.d: Fix expected msr and mrs output.
* gas/arm/arch7.d: New test.
* gas/arm/arch7.s: New test.
* gas/arm/arch7m-bad.l: New test.
* gas/arm/arch7m-bad.d: New test.
* gas/arm/arch7m-bad.s: New test.
include/opcode/
* arm.h: Add V7 feature bits.
opcodes/
* arm-dis.c (arm_opcodes): Add V7 instructions.
(thumb32_opcodes): Ditto. Handle V7M MSR/MRS variants.
(print_arm_address): New function.
(print_insn_arm): Use it. Add 'P' and 'U' cases.
(psr_name): New function.
(print_insn_thumb32): Add 'U', 'C' and 'D' cases.
2006-02-24 23:36:36 +08:00
|
|
|
@code{armv7},
|
2006-12-14 00:06:39 +08:00
|
|
|
@code{armv7-a},
|
|
|
|
@code{armv7-r},
|
|
|
|
@code{armv7-m},
|
2009-11-18 00:31:56 +08:00
|
|
|
@code{armv7e-m},
|
2012-08-24 15:50:38 +08:00
|
|
|
@code{armv8-a},
|
2003-03-26 04:56:01 +08:00
|
|
|
@code{iwmmxt}
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
and
|
|
|
|
@code{xscale}.
|
|
|
|
If both @code{-mcpu} and
|
|
|
|
@code{-march} are specified, the assembler will use
|
|
|
|
the setting for @code{-mcpu}.
|
|
|
|
|
|
|
|
The architecture option can be extended with the same instruction set
|
|
|
|
extension options as the @code{-mcpu} option.
|
|
|
|
|
|
|
|
@cindex @code{-mfpu=} command line option, ARM
|
|
|
|
@item -mfpu=@var{floating-point-format}
|
|
|
|
|
|
|
|
This option specifies the floating point format to assemble for. The
|
|
|
|
assembler will issue an error message if an attempt is made to assemble
|
2013-01-11 03:51:55 +08:00
|
|
|
an instruction which will not execute on the target floating point unit.
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
The following format options are recognized:
|
|
|
|
@code{softfpa},
|
|
|
|
@code{fpe},
|
2002-01-19 20:48:32 +08:00
|
|
|
@code{fpe2},
|
|
|
|
@code{fpe3},
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
@code{fpa},
|
|
|
|
@code{fpa10},
|
|
|
|
@code{fpa11},
|
|
|
|
@code{arm7500fe},
|
|
|
|
@code{softvfp},
|
|
|
|
@code{softvfp+vfp},
|
|
|
|
@code{vfp},
|
|
|
|
@code{vfp10},
|
|
|
|
@code{vfp10-r0},
|
|
|
|
@code{vfp9},
|
|
|
|
@code{vfpxd},
|
2009-11-02 Paul Brook <paul@codesourcery.com>
ld/testsuite/
* ld-arm/arm-elf.exp: Add new attr-merge-vfp tests.
* ld-arm/attr-merge-vfp-1.d: New test.
* ld-arm/attr-merge-vfp-1r.d: New test.
* ld-arm/attr-merge-vfp-2.d: New test.
* ld-arm/attr-merge-vfp-2r.d: New test.
* ld-arm/attr-merge-vfp-3.d: New test.
* ld-arm/attr-merge-vfp-3r.d: New test.
* ld-arm/attr-merge-vfp-4.d: New test.
* ld-arm/attr-merge-vfp-4r.d: New test.
* ld-arm/attr-merge-vfp-5.d: New test.
* ld-arm/attr-merge-vfp-5r.d: New test.
* ld-arm/attr-merge-vfp-2.s: New test.
* ld-arm/attr-merge-vfp-3.s: New test.
* ld-arm/attr-merge-vfp-3-d16.s: New test.
* ld-arm/attr-merge-vfp-4.s: New test.
* ld-arm/attr-merge-vfp-4-d16.s: New test.
gas/
* doc/c-arm.texi: Document new -mfpu options.
* config/tc-arm.c (fpu_vfp_ext_v3xd, fpu_vfp_fp16, fpu_neon_ext_fma,
fpu_vfp_ext_fma): New.
(NEON_ENC_TAB): Add vfma, vfms, vfnma and vfnms.
(do_vfp_nsyn_fma_fms, do_neon_fmac): New functions.
(insns): Move double precision load/store. Split out double
precision VFPv3 instrucitons. Add VFPv4 instructions.
(arm_fpus): Add VFPv3-FP16, VFPv3xD and VFPv4 variants.
(aeabi_set_public_attributes): Set VFPv4 variants
gas/testsuite/
* gas/arm/attr-mfpu-vfpv4.d: New test.
* gas/arm/attr-mfpu-vfpv4-d16.d: New test.
* gas/arm/neon-fma-cov.d: New test.
* gas/arm/neon-fma-cov.s: New test.
* gas/arm/vfp-fma-inc.s: New test.
* gas/arm/vfp-fma-arm.d: New test.
* gas/arm/vfp-fma-arm.s: New test.
* gas/arm/vfp-fma-thumb.d: New test.
* gas/arm/vfp-fma-thumb.s: New test.
* gas/arm/vfma1.d: New test.
* gas/arm/vfma1.s: New test.
* gas/arm/vfpv3xd.d: New test.
* gas/arm/vfpv3xd.s: New test.
include/opcode/
* arm.h (FPU_VFP_EXT_V3xD, FPU_VFP_EXT_FP16, FPU_NEON_EXT_FMA,
FPU_VFP_EXT_FMA, FPU_VFP_V3xD, FPU_VFP_V4D16, FPU_VFP_V4): Define.
(FPU_ARCH_VFP_V3D16_FP16, FPU_ARCH_VFP_V3_FP16, FPU_ARCH_VFP_V3xD,
FPU_ARCH_VFP_V3xD_FP16, FPU_ARCH_VFP_V4, FPU_ARCH_VFP_V4D16,
FPU_ARCH_NEON_VFP_V4): Define.
binutils/
* readelf.c (arm_attr_tag_VFP_arch): Add VFPv4 and VFPv4-D16.
bfd/
* elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle VFPv4
attributes.
opcodes/
* arm-dis.c (coprocessor_opcodes): Update to use new feature flags.
Add VFPv4 instructions.
2009-11-02 21:44:05 +08:00
|
|
|
@code{vfpv2},
|
|
|
|
@code{vfpv3},
|
|
|
|
@code{vfpv3-fp16},
|
|
|
|
@code{vfpv3-d16},
|
|
|
|
@code{vfpv3-d16-fp16},
|
|
|
|
@code{vfpv3xd},
|
|
|
|
@code{vfpv3xd-d16},
|
|
|
|
@code{vfpv4},
|
|
|
|
@code{vfpv4-d16},
|
2010-08-21 04:53:28 +08:00
|
|
|
@code{fpv4-sp-d16},
|
2012-08-24 15:50:38 +08:00
|
|
|
@code{fp-armv8},
|
2003-12-06 09:25:29 +08:00
|
|
|
@code{arm1020t},
|
|
|
|
@code{arm1020e},
|
2008-03-09 21:23:29 +08:00
|
|
|
@code{arm1136jf-s},
|
2009-11-02 Paul Brook <paul@codesourcery.com>
ld/testsuite/
* ld-arm/arm-elf.exp: Add new attr-merge-vfp tests.
* ld-arm/attr-merge-vfp-1.d: New test.
* ld-arm/attr-merge-vfp-1r.d: New test.
* ld-arm/attr-merge-vfp-2.d: New test.
* ld-arm/attr-merge-vfp-2r.d: New test.
* ld-arm/attr-merge-vfp-3.d: New test.
* ld-arm/attr-merge-vfp-3r.d: New test.
* ld-arm/attr-merge-vfp-4.d: New test.
* ld-arm/attr-merge-vfp-4r.d: New test.
* ld-arm/attr-merge-vfp-5.d: New test.
* ld-arm/attr-merge-vfp-5r.d: New test.
* ld-arm/attr-merge-vfp-2.s: New test.
* ld-arm/attr-merge-vfp-3.s: New test.
* ld-arm/attr-merge-vfp-3-d16.s: New test.
* ld-arm/attr-merge-vfp-4.s: New test.
* ld-arm/attr-merge-vfp-4-d16.s: New test.
gas/
* doc/c-arm.texi: Document new -mfpu options.
* config/tc-arm.c (fpu_vfp_ext_v3xd, fpu_vfp_fp16, fpu_neon_ext_fma,
fpu_vfp_ext_fma): New.
(NEON_ENC_TAB): Add vfma, vfms, vfnma and vfnms.
(do_vfp_nsyn_fma_fms, do_neon_fmac): New functions.
(insns): Move double precision load/store. Split out double
precision VFPv3 instrucitons. Add VFPv4 instructions.
(arm_fpus): Add VFPv3-FP16, VFPv3xD and VFPv4 variants.
(aeabi_set_public_attributes): Set VFPv4 variants
gas/testsuite/
* gas/arm/attr-mfpu-vfpv4.d: New test.
* gas/arm/attr-mfpu-vfpv4-d16.d: New test.
* gas/arm/neon-fma-cov.d: New test.
* gas/arm/neon-fma-cov.s: New test.
* gas/arm/vfp-fma-inc.s: New test.
* gas/arm/vfp-fma-arm.d: New test.
* gas/arm/vfp-fma-arm.s: New test.
* gas/arm/vfp-fma-thumb.d: New test.
* gas/arm/vfp-fma-thumb.s: New test.
* gas/arm/vfma1.d: New test.
* gas/arm/vfma1.s: New test.
* gas/arm/vfpv3xd.d: New test.
* gas/arm/vfpv3xd.s: New test.
include/opcode/
* arm.h (FPU_VFP_EXT_V3xD, FPU_VFP_EXT_FP16, FPU_NEON_EXT_FMA,
FPU_VFP_EXT_FMA, FPU_VFP_V3xD, FPU_VFP_V4D16, FPU_VFP_V4): Define.
(FPU_ARCH_VFP_V3D16_FP16, FPU_ARCH_VFP_V3_FP16, FPU_ARCH_VFP_V3xD,
FPU_ARCH_VFP_V3xD_FP16, FPU_ARCH_VFP_V4, FPU_ARCH_VFP_V4D16,
FPU_ARCH_NEON_VFP_V4): Define.
binutils/
* readelf.c (arm_attr_tag_VFP_arch): Add VFPv4 and VFPv4-D16.
bfd/
* elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle VFPv4
attributes.
opcodes/
* arm-dis.c (coprocessor_opcodes): Update to use new feature flags.
Add VFPv4 instructions.
2009-11-02 21:44:05 +08:00
|
|
|
@code{maverick},
|
|
|
|
@code{neon},
|
2012-08-24 15:50:38 +08:00
|
|
|
@code{neon-vfpv4},
|
|
|
|
@code{neon-fp-armv8},
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
and
|
2012-08-24 15:50:38 +08:00
|
|
|
@code{crypto-neon-fp-armv8}.
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
|
|
|
|
In addition to determining which instructions are assembled, this option
|
|
|
|
also affects the way in which the @code{.double} assembler directive behaves
|
|
|
|
when assembling little-endian code.
|
|
|
|
|
2013-01-11 03:51:55 +08:00
|
|
|
The default is dependent on the processor selected. For Architecture 5 or
|
|
|
|
later, the default is to assembler for VFP instructions; for earlier
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
architectures the default is to assemble for FPA instructions.
|
2000-04-25 07:57:30 +08:00
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
@cindex @code{-mthumb} command line option, ARM
|
|
|
|
@item -mthumb
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
This option specifies that the assembler should start assembling Thumb
|
2013-01-11 03:51:55 +08:00
|
|
|
instructions; that is, it should behave as though the file starts with a
|
* NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types. Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.
Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-19 01:01:55 +08:00
|
|
|
@code{.code 16} directive.
|
2000-04-25 07:57:30 +08:00
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
@cindex @code{-mthumb-interwork} command line option, ARM
|
|
|
|
@item -mthumb-interwork
|
|
|
|
This option specifies that the output generated by the assembler should
|
|
|
|
be marked as supporting interworking.
|
2000-04-25 07:57:30 +08:00
|
|
|
|
2009-07-15 23:08:55 +08:00
|
|
|
@cindex @code{-mimplicit-it} command line option, ARM
|
|
|
|
@item -mimplicit-it=never
|
|
|
|
@itemx -mimplicit-it=always
|
|
|
|
@itemx -mimplicit-it=arm
|
|
|
|
@itemx -mimplicit-it=thumb
|
|
|
|
The @code{-mimplicit-it} option controls the behavior of the assembler when
|
|
|
|
conditional instructions are not enclosed in IT blocks.
|
|
|
|
There are four possible behaviors.
|
|
|
|
If @code{never} is specified, such constructs cause a warning in ARM
|
|
|
|
code and an error in Thumb-2 code.
|
|
|
|
If @code{always} is specified, such constructs are accepted in both
|
|
|
|
ARM and Thumb-2 code, where the IT instruction is added implicitly.
|
|
|
|
If @code{arm} is specified, such constructs are accepted in ARM code
|
|
|
|
and cause an error in Thumb-2 code.
|
|
|
|
If @code{thumb} is specified, such constructs cause a warning in ARM
|
|
|
|
code and are accepted in Thumb-2 code. If you omit this option, the
|
|
|
|
behavior is equivalent to @code{-mimplicit-it=arm}.
|
2009-06-22 22:40:28 +08:00
|
|
|
|
2009-10-07 21:46:55 +08:00
|
|
|
@cindex @code{-mapcs-26} command line option, ARM
|
|
|
|
@cindex @code{-mapcs-32} command line option, ARM
|
|
|
|
@item -mapcs-26
|
|
|
|
@itemx -mapcs-32
|
|
|
|
These options specify that the output generated by the assembler should
|
1999-05-03 15:29:11 +08:00
|
|
|
be marked as supporting the indicated version of the Arm Procedure.
|
|
|
|
Calling Standard.
|
2000-04-25 07:57:30 +08:00
|
|
|
|
2000-11-25 08:21:40 +08:00
|
|
|
@cindex @code{-matpcs} command line option, ARM
|
|
|
|
@item -matpcs
|
2013-01-11 03:51:55 +08:00
|
|
|
This option specifies that the output generated by the assembler should
|
2000-11-25 08:21:40 +08:00
|
|
|
be marked as supporting the Arm/Thumb Procedure Calling Standard. If
|
|
|
|
enabled this option will cause the assembler to create an empty
|
|
|
|
debugging section in the object file called .arm.atpcs. Debuggers can
|
|
|
|
use this to determine the ABI being used by.
|
|
|
|
|
2000-04-25 07:57:30 +08:00
|
|
|
@cindex @code{-mapcs-float} command line option, ARM
|
1999-05-03 15:29:11 +08:00
|
|
|
@item -mapcs-float
|
2003-11-06 19:58:58 +08:00
|
|
|
This indicates the floating point variant of the APCS should be
|
1999-05-03 15:29:11 +08:00
|
|
|
used. In this variant floating point arguments are passed in FP
|
2000-01-11 06:22:56 +08:00
|
|
|
registers rather than integer registers.
|
2000-04-25 07:57:30 +08:00
|
|
|
|
|
|
|
@cindex @code{-mapcs-reentrant} command line option, ARM
|
1999-05-03 15:29:11 +08:00
|
|
|
@item -mapcs-reentrant
|
|
|
|
This indicates that the reentrant variant of the APCS should be used.
|
|
|
|
This variant supports position independent code.
|
2000-04-25 07:57:30 +08:00
|
|
|
|
2003-12-10 20:11:26 +08:00
|
|
|
@cindex @code{-mfloat-abi=} command line option, ARM
|
|
|
|
@item -mfloat-abi=@var{abi}
|
|
|
|
This option specifies that the output generated by the assembler should be
|
|
|
|
marked as using specified floating point ABI.
|
|
|
|
The following values are recognized:
|
|
|
|
@code{soft},
|
|
|
|
@code{softfp}
|
|
|
|
and
|
|
|
|
@code{hard}.
|
|
|
|
|
2004-03-24 07:05:52 +08:00
|
|
|
@cindex @code{-eabi=} command line option, ARM
|
|
|
|
@item -meabi=@var{ver}
|
|
|
|
This option specifies which EABI version the produced object files should
|
|
|
|
conform to.
|
2006-07-24 21:49:50 +08:00
|
|
|
The following values are recognized:
|
2006-03-11 01:20:30 +08:00
|
|
|
@code{gnu},
|
|
|
|
@code{4}
|
2004-03-24 07:05:52 +08:00
|
|
|
and
|
2006-03-11 01:20:30 +08:00
|
|
|
@code{5}.
|
2004-03-24 07:05:52 +08:00
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
@cindex @code{-EB} command line option, ARM
|
|
|
|
@item -EB
|
|
|
|
This option specifies that the output generated by the assembler should
|
|
|
|
be marked as being encoded for a big-endian processor.
|
2000-04-25 07:57:30 +08:00
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
@cindex @code{-EL} command line option, ARM
|
|
|
|
@item -EL
|
|
|
|
This option specifies that the output generated by the assembler should
|
|
|
|
be marked as being encoded for a little-endian processor.
|
2000-04-25 07:57:30 +08:00
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
@cindex @code{-k} command line option, ARM
|
|
|
|
@cindex PIC code generation for ARM
|
|
|
|
@item -k
|
2001-01-14 06:39:55 +08:00
|
|
|
This option specifies that the output of the assembler should be marked
|
|
|
|
as position-independent code (PIC).
|
2000-04-25 07:57:30 +08:00
|
|
|
|
2008-02-20 23:17:56 +08:00
|
|
|
@cindex @code{--fix-v4bx} command line option, ARM
|
|
|
|
@item --fix-v4bx
|
|
|
|
Allow @code{BX} instructions in ARMv4 code. This is intended for use with
|
|
|
|
the linker option of the same name.
|
|
|
|
|
2009-01-24 01:46:21 +08:00
|
|
|
@cindex @code{-mwarn-deprecated} command line option, ARM
|
|
|
|
@item -mwarn-deprecated
|
|
|
|
@itemx -mno-warn-deprecated
|
|
|
|
Enable or disable warnings about using deprecated options or
|
|
|
|
features. The default is to warn.
|
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
@end table
|
|
|
|
|
|
|
|
|
|
|
|
@node ARM Syntax
|
|
|
|
@section Syntax
|
|
|
|
@menu
|
2009-07-30 16:54:49 +08:00
|
|
|
* ARM-Instruction-Set:: Instruction Set
|
1999-05-03 15:29:11 +08:00
|
|
|
* ARM-Chars:: Special Characters
|
|
|
|
* ARM-Regs:: Register Names
|
2006-05-11 23:17:34 +08:00
|
|
|
* ARM-Relocations:: Relocations
|
2009-12-29 02:27:42 +08:00
|
|
|
* ARM-Neon-Alignment:: NEON Alignment Specifiers
|
1999-05-03 15:29:11 +08:00
|
|
|
@end menu
|
|
|
|
|
2009-07-30 16:54:49 +08:00
|
|
|
@node ARM-Instruction-Set
|
|
|
|
@subsection Instruction Set Syntax
|
|
|
|
Two slightly different syntaxes are support for ARM and THUMB
|
|
|
|
instructions. The default, @code{divided}, uses the old style where
|
|
|
|
ARM and THUMB instructions had their own, separate syntaxes. The new,
|
|
|
|
@code{unified} syntax, which can be selected via the @code{.syntax}
|
|
|
|
directive, and has the following main features:
|
|
|
|
|
2013-03-15 00:17:45 +08:00
|
|
|
@itemize @bullet
|
|
|
|
@item
|
2009-07-30 16:54:49 +08:00
|
|
|
Immediate operands do not require a @code{#} prefix.
|
|
|
|
|
2013-03-15 00:17:45 +08:00
|
|
|
@item
|
2009-07-30 16:54:49 +08:00
|
|
|
The @code{IT} instruction may appear, and if it does it is validated
|
|
|
|
against subsequent conditional affixes. In ARM mode it does not
|
|
|
|
generate machine code, in THUMB mode it does.
|
|
|
|
|
2013-03-15 00:17:45 +08:00
|
|
|
@item
|
2009-07-30 16:54:49 +08:00
|
|
|
For ARM instructions the conditional affixes always appear at the end
|
|
|
|
of the instruction. For THUMB instructions conditional affixes can be
|
|
|
|
used, but only inside the scope of an @code{IT} instruction.
|
|
|
|
|
2013-03-15 00:17:45 +08:00
|
|
|
@item
|
2009-07-30 16:54:49 +08:00
|
|
|
All of the instructions new to the V6T2 architecture (and later) are
|
|
|
|
available. (Only a few such instructions can be written in the
|
|
|
|
@code{divided} syntax).
|
|
|
|
|
2013-03-15 00:17:45 +08:00
|
|
|
@item
|
2009-07-30 16:54:49 +08:00
|
|
|
The @code{.N} and @code{.W} suffixes are recognized and honored.
|
|
|
|
|
2013-03-15 00:17:45 +08:00
|
|
|
@item
|
2009-07-30 16:54:49 +08:00
|
|
|
All instructions set the flags if and only if they have an @code{s}
|
|
|
|
affix.
|
2013-03-15 00:17:45 +08:00
|
|
|
@end itemize
|
2009-07-30 16:54:49 +08:00
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
@node ARM-Chars
|
|
|
|
@subsection Special Characters
|
|
|
|
|
|
|
|
@cindex line comment character, ARM
|
|
|
|
@cindex ARM line comment character
|
2011-01-18 21:37:39 +08:00
|
|
|
The presence of a @samp{@@} anywhere on a line indicates the start of
|
|
|
|
a comment that extends to the end of that line.
|
|
|
|
|
|
|
|
If a @samp{#} appears as the first character of a line then the whole
|
|
|
|
line is treated as a comment, but in this case the line could also be
|
|
|
|
a logical line number directive (@pxref{Comments}) or a preprocessor
|
|
|
|
control command (@pxref{Preprocessing}).
|
2000-01-11 06:22:56 +08:00
|
|
|
|
|
|
|
@cindex line separator, ARM
|
|
|
|
@cindex statement separator, ARM
|
|
|
|
@cindex ARM line separator
|
2001-01-14 06:39:55 +08:00
|
|
|
The @samp{;} character can be used instead of a newline to separate
|
|
|
|
statements.
|
2000-01-11 06:22:56 +08:00
|
|
|
|
|
|
|
@cindex immediate character, ARM
|
|
|
|
@cindex ARM immediate character
|
|
|
|
Either @samp{#} or @samp{$} can be used to indicate immediate operands.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
|
|
|
@cindex identifiers, ARM
|
|
|
|
@cindex ARM identifiers
|
|
|
|
*TODO* Explain about /data modifier on symbols.
|
|
|
|
|
|
|
|
@node ARM-Regs
|
|
|
|
@subsection Register Names
|
|
|
|
|
|
|
|
@cindex ARM register names
|
|
|
|
@cindex register names, ARM
|
|
|
|
*TODO* Explain about ARM register naming, and the predefined names.
|
|
|
|
|
2006-05-11 23:17:34 +08:00
|
|
|
@node ARM-Relocations
|
|
|
|
@subsection ARM relocation generation
|
|
|
|
|
|
|
|
@cindex data relocations, ARM
|
|
|
|
@cindex ARM data relocations
|
|
|
|
Specific data relocations can be generated by putting the relocation name
|
|
|
|
in parentheses after the symbol name. For example:
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
.word foo(TARGET1)
|
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
This will generate an @samp{R_ARM_TARGET1} relocation against the symbol
|
|
|
|
@var{foo}.
|
|
|
|
The following relocations are supported:
|
|
|
|
@code{GOT},
|
|
|
|
@code{GOTOFF},
|
|
|
|
@code{TARGET1},
|
|
|
|
@code{TARGET2},
|
|
|
|
@code{SBREL},
|
|
|
|
@code{TLSGD},
|
|
|
|
@code{TLSLDM},
|
|
|
|
@code{TLSLDO},
|
bfd/
* reloc.c (BFD_RELOC_ARM_TLS_GOTDESC, BFD_RELOC_ARM_TLS_CALL,
BFD_RELOC_ARM_THM_TLS_CALL, BFD_RELOC_ARM_TLS_DESCSEQ,
BFD_RELOC_ARM_THM_TLS_DESCSEQ, BFD_RELOC_ARM_TLS_DESC): New
relocations.
* libbfd.h: Rebuilt.
* bfd-in2.h: Rebuilt.
* elf32-arm.c (elf32_arm_howto_table_1): Add new relocations.
(elf32_arm_reloc_map): Likewise.
(tls_trampoline, dl_tlsdesc_lazy_trampoline): New PLT templates.
(elf32_arm_stub_long_branch_any_tls_pic,
elf32_arm_stub_long_branch_v4t_thumb_tls_pic): New stub templates.
(DEF_STUBS): Add new stubs.
(struct_elf_arm_obj_data): Add local_tlsdesc_gotent field.
(elf32_arm_local_tlsdesc_gotent): New.
(GOT_TLS_GDESC): New mask.
(GOT_TLS_GD_ANY): Define.
(struct elf32_arm_link_hash_entry): Add tlsdesc_got field.
(elf32_arm_compute_jump_table_size): New.
(struct elf32_arm_link_hash_table): Add next_tls_desc_index,
num_tls_desc, dt_tlsdesc_plt, dt_tlsdesc_got, tls_trampoline,
sgotplt_jump_table_size fields.
(elf32_arm_link_hash_newfunc): Initialize tlsdesc_got field.
(elf32_arm_link_hash_table_create): Initialize new fields.
(arm_type_of_stub): Check TLS desc relocs too.
(elf32_arm_stub_name): TLS desc relocs can be shared.
(elf32_arm_tls_transition): Determine relaxation.
(arm_stub_required_alignment): Add tls stubs.
(elf32_arm_size_stubs): Likewise.
(elf32_arm_tls_relax): Perform TLS relaxing.
(elf32_arm_final_link_relocate): Process TLS DESC relocations.
(IS_ARM_TLS_GNU_RELOC): New.
(IS_ARM_TLS_RELOC): Use it.
(elf32_arm_relocate_section): Perform TLS relaxing.
(elf32_arm_check_relocs): Anticipate TLS relaxing, process tls
desc relocations.
(allocate_dynrelocs): Allocate tls desc relcoations.
(elf32_arm_output_arch_local_syms): Emit tls trampoline mapping
symbols.
(elf32_arm_size_dynamic_sections): Allocate tls trampolines and
got slots.
(elf32_arm_always_size_sections): New. Create _TLS_MODULE_BASE
symbol.
(elf32_arm_finish_dynamic_symbol): Adjust.
(arm_put_trampoline): New.
(elf32_arm_finish_dynamic_sections): Emit new dynamic tags and tls
trampolines.
(elf_backend_always_size_sections): Define.
include/elf/
* arm.h (R_ARM_TLS_DESC, R_ARM_TLS_GOTDESC, R_ARM_TLS_CALL,
R_ARM_TLS_DESCSEQ, T_ARM_THM_TLS_CALL, R_ARM_THM_TLS_DESCSEQ): New
relocations.
gas/
* doc/c-arm.texi: Document TLSDESC and TLSCALL relocations, and
.tlsdescseq directive.
* config/tc-arm.c (arm_typed_reg_parse): Check for potential reloc
following a symbol.
(s_arm_tls_descseq): New directive.
(md_pseudo_table): Add it.
(encode_branch): Allow TLS_CALL relocs too.
(do_t_blx, do_t_branch23): Use encode_branch.
(reloc_names): Add tlsdesc and tlscall.
(md_apply_fix): Process tls desc relocations.
(tc_gen_reloc): Likewise.
(arm_fix_adjustable): Likewise.
gas/testsuite/
* gas/arm/tls.s: Add tlsdesc tests.
* gas/arm/tls.d: Adjust.
ld/testsuite/
* ld-arm/arm-elf.exp: Added tests for new TLS handling
relocations.
* ld-arm/tls-descrelax-be32.d: New.
* ld-arm/tls-descrelax-be32.s: New.
* ld-arm/tls-descrelax-be8.d: New.
* ld-arm/tls-descrelax-be8.s: New.
* ld-arm/tls-descrelax-v7.d: New.
* ld-arm/tls-descrelax-v7.s: New.
* ld-arm/tls-descrelax.d: New.
* ld-arm/tls-descrelax.s: New.
* ld-arm/tls-descseq.d: New.
* ld-arm/tls-descseq.r: New.
* ld-arm/tls-descseq.s: New.
* ld-arm/tls-gdesc-got.d: New.
* ld-arm/tls-gdesc-got.s: New.
* ld-arm/tls-gdesc-nlazy.g: New.
* ld-arm/tls-gdesc-nlazy.s: New.
* ld-arm/tls-gdesc.d: New.
* ld-arm/tls-gdesc.r: New.
* ld-arm/tls-gdesc.s: New.
* ld-arm/tls-gdierelax.d: New.
* ld-arm/tls-gdierelax.s: New.
* ld-arm/tls-gdierelax2.d: New.
* ld-arm/tls-gdierelax2.s: New.
* ld-arm/tls-gdlerelax.d: New.
* ld-arm/tls-gdlerelax.s: New.
* ld-arm/tls-lib-loc.d: New.
* ld-arm/tls-lib-loc.r: New.
* ld-arm/tls-lib-loc.s: New.
* ld-arm/tls-longplt-lib.d: New.
* ld-arm/tls-longplt-lib.s: New.
* ld-arm/tls-longplt.d: New.
* ld-arm/tls-longplt.s: New.
* ld-arm/tls-mixed.r: New.
* ld-arm/tls-mixed.s: New.
* ld-arm/tls-thumb1.d: New.
* ld-arm/tls-thumb1.s: New.
* ld-arm/arm-elf.exp: New.
2011-01-10 16:40:19 +08:00
|
|
|
@code{TLSDESC},
|
|
|
|
@code{TLSCALL},
|
2010-03-18 19:22:46 +08:00
|
|
|
@code{GOTTPOFF},
|
|
|
|
@code{GOT_PREL}
|
2006-05-11 23:17:34 +08:00
|
|
|
and
|
|
|
|
@code{TPOFF}.
|
|
|
|
|
|
|
|
For compatibility with older toolchains the assembler also accepts
|
2011-11-02 19:13:59 +08:00
|
|
|
@code{(PLT)} after branch targets. On legacy targets this will
|
|
|
|
generate the deprecated @samp{R_ARM_PLT32} relocation. On EABI
|
|
|
|
targets it will encode either the @samp{R_ARM_CALL} or
|
|
|
|
@samp{R_ARM_JUMP24} relocation, as appropriate.
|
2006-05-11 23:17:34 +08:00
|
|
|
|
|
|
|
@cindex MOVW and MOVT relocations, ARM
|
|
|
|
Relocations for @samp{MOVW} and @samp{MOVT} instructions can be generated
|
|
|
|
by prefixing the value with @samp{#:lower16:} and @samp{#:upper16}
|
2006-07-24 21:49:50 +08:00
|
|
|
respectively. For example to load the 32-bit address of foo into r0:
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2006-05-11 23:17:34 +08:00
|
|
|
@smallexample
|
|
|
|
MOVW r0, #:lower16:foo
|
|
|
|
MOVT r0, #:upper16:foo
|
|
|
|
@end smallexample
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2013-03-14 18:00:46 +08:00
|
|
|
@node ARM-Neon-Alignment
|
|
|
|
@subsection NEON Alignment Specifiers
|
|
|
|
|
|
|
|
@cindex alignment for NEON instructions
|
|
|
|
Some NEON load/store instructions allow an optional address
|
|
|
|
alignment qualifier.
|
|
|
|
The ARM documentation specifies that this is indicated by
|
|
|
|
@samp{@@ @var{align}}. However GAS already interprets
|
|
|
|
the @samp{@@} character as a "line comment" start,
|
|
|
|
so @samp{: @var{align}} is used instead. For example:
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
vld1.8 @{q0@}, [r0, :128]
|
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
@node ARM Floating Point
|
|
|
|
@section Floating Point
|
|
|
|
|
|
|
|
@cindex floating point, ARM (@sc{ieee})
|
|
|
|
@cindex ARM floating point (@sc{ieee})
|
|
|
|
The ARM family uses @sc{ieee} floating-point numbers.
|
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
@node ARM Directives
|
|
|
|
@section ARM Machine Directives
|
|
|
|
|
|
|
|
@cindex machine directives, ARM
|
|
|
|
@cindex ARM machine directives
|
|
|
|
@table @code
|
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@c AAAAAAAAAAAAAAAAAAAAAAAAA
|
|
|
|
|
|
|
|
@cindex @code{.2byte} directive, ARM
|
|
|
|
@cindex @code{.4byte} directive, ARM
|
|
|
|
@cindex @code{.8byte} directive, ARM
|
|
|
|
@item .2byte @var{expression} [, @var{expression}]*
|
|
|
|
@itemx .4byte @var{expression} [, @var{expression}]*
|
|
|
|
@itemx .8byte @var{expression} [, @var{expression}]*
|
|
|
|
These directives write 2, 4 or 8 byte values to the output section.
|
|
|
|
|
|
|
|
@cindex @code{.align} directive, ARM
|
2000-04-25 07:57:30 +08:00
|
|
|
@item .align @var{expression} [, @var{expression}]
|
|
|
|
This is the generic @var{.align} directive. For the ARM however if the
|
|
|
|
first argument is zero (ie no alignment is needed) the assembler will
|
|
|
|
behave as if the argument had been 2 (ie pad to the next four byte
|
2002-12-19 09:11:31 +08:00
|
|
|
boundary). This is for compatibility with ARM's own assembler.
|
2000-04-25 07:57:30 +08:00
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@cindex @code{.arch} directive, ARM
|
|
|
|
@item .arch @var{name}
|
|
|
|
Select the target architecture. Valid values for @var{name} are the same as
|
|
|
|
for the @option{-march} commandline option.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2013-01-11 03:51:55 +08:00
|
|
|
Specifying @code{.arch} clears any previously selected architecture
|
2010-09-23 23:11:56 +08:00
|
|
|
extensions.
|
|
|
|
|
|
|
|
@cindex @code{.arch_extension} directive, ARM
|
|
|
|
@item .arch_extension @var{name}
|
2013-01-11 03:51:55 +08:00
|
|
|
Add or remove an architecture extension to the target architecture. Valid
|
|
|
|
values for @var{name} are the same as those accepted as architectural
|
2010-09-23 23:11:56 +08:00
|
|
|
extensions by the @option{-mcpu} commandline option.
|
|
|
|
|
|
|
|
@code{.arch_extension} may be used multiple times to add or remove extensions
|
|
|
|
incrementally to the architecture being compiled for.
|
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@cindex @code{.arm} directive, ARM
|
|
|
|
@item .arm
|
|
|
|
This performs the same action as @var{.code 32}.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@anchor{arm_pad}
|
|
|
|
@cindex @code{.pad} directive, ARM
|
|
|
|
@item .pad #@var{count}
|
|
|
|
Generate unwinder annotations for a stack adjustment of @var{count} bytes.
|
|
|
|
A positive value indicates the function prologue allocated stack space by
|
|
|
|
decrementing the stack pointer.
|
* config/tc-arm.texi (struct reg_entry): Add new field 'builtin'.
(rn_table, iwmmxt_table, cp_table, cn_table, fn_table, sn_table,
dn_table, mav_mvf_table, mac_mvd_table, mav_mvfx_table,
mav_mvax_table, mav_dspc_table): Initialise new field.
(insert_reg_alias): Initialise new field.
(md_pseudo_table): Add "unreq" entry.
(s_unreq): New function: Undo the effects of a previous .req.
* doc/c-arm.texi: Document new pseudo op.
* NEWS: Mention new feature.
* testsuite/gas/arm/req.s: New test file. Check .req and .unreq psuedo ops.
* testsuite/gas/arm/req.l: Expected error output from req.s test.
* testsuite/gas/arm/copro.d: Set target architecture for objdump so that the
test will work on architectures which cannot encode higher arm architecture
types in their file headers.
* testsuite/gas/arm/arm.exp: Run new req.s test.
Skip thumb instruction test for PE targets which do not support
thumb relocations.
* testsuite/gas/elf/elf.exp: Skip special handling of section2 test for XScale
targets - it is no longer needed.
2003-11-06 23:30:05 +08:00
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@c BBBBBBBBBBBBBBBBBBBBBBBBBB
|
* config/tc-arm.texi (struct reg_entry): Add new field 'builtin'.
(rn_table, iwmmxt_table, cp_table, cn_table, fn_table, sn_table,
dn_table, mav_mvf_table, mac_mvd_table, mav_mvfx_table,
mav_mvax_table, mav_dspc_table): Initialise new field.
(insert_reg_alias): Initialise new field.
(md_pseudo_table): Add "unreq" entry.
(s_unreq): New function: Undo the effects of a previous .req.
* doc/c-arm.texi: Document new pseudo op.
* NEWS: Mention new feature.
* testsuite/gas/arm/req.s: New test file. Check .req and .unreq psuedo ops.
* testsuite/gas/arm/req.l: Expected error output from req.s test.
* testsuite/gas/arm/copro.d: Set target architecture for objdump so that the
test will work on architectures which cannot encode higher arm architecture
types in their file headers.
* testsuite/gas/arm/arm.exp: Run new req.s test.
Skip thumb instruction test for PE targets which do not support
thumb relocations.
* testsuite/gas/elf/elf.exp: Skip special handling of section2 test for XScale
targets - it is no longer needed.
2003-11-06 23:30:05 +08:00
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@cindex @code{.bss} directive, ARM
|
|
|
|
@item .bss
|
|
|
|
This directive switches to the @code{.bss} section.
|
* config/tc-arm.texi (struct reg_entry): Add new field 'builtin'.
(rn_table, iwmmxt_table, cp_table, cn_table, fn_table, sn_table,
dn_table, mav_mvf_table, mac_mvd_table, mav_mvfx_table,
mav_mvax_table, mav_dspc_table): Initialise new field.
(insert_reg_alias): Initialise new field.
(md_pseudo_table): Add "unreq" entry.
(s_unreq): New function: Undo the effects of a previous .req.
* doc/c-arm.texi: Document new pseudo op.
* NEWS: Mention new feature.
* testsuite/gas/arm/req.s: New test file. Check .req and .unreq psuedo ops.
* testsuite/gas/arm/req.l: Expected error output from req.s test.
* testsuite/gas/arm/copro.d: Set target architecture for objdump so that the
test will work on architectures which cannot encode higher arm architecture
types in their file headers.
* testsuite/gas/arm/arm.exp: Run new req.s test.
Skip thumb instruction test for PE targets which do not support
thumb relocations.
* testsuite/gas/elf/elf.exp: Skip special handling of section2 test for XScale
targets - it is no longer needed.
2003-11-06 23:30:05 +08:00
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@c CCCCCCCCCCCCCCCCCCCCCCCCCC
|
|
|
|
|
|
|
|
@cindex @code{.cantunwind} directive, ARM
|
|
|
|
@item .cantunwind
|
|
|
|
Prevents unwinding through the current function. No personality routine
|
|
|
|
or exception table data is required or permitted.
|
|
|
|
|
|
|
|
@cindex @code{.code} directive, ARM
|
|
|
|
@item .code @code{[16|32]}
|
|
|
|
This directive selects the instruction set being generated. The value 16
|
|
|
|
selects Thumb, with the value 32 selecting ARM.
|
|
|
|
|
|
|
|
@cindex @code{.cpu} directive, ARM
|
|
|
|
@item .cpu @var{name}
|
|
|
|
Select the target processor. Valid values for @var{name} are the same as
|
|
|
|
for the @option{-mcpu} commandline option.
|
|
|
|
|
2013-01-11 03:51:55 +08:00
|
|
|
Specifying @code{.cpu} clears any previously selected architecture
|
2010-09-23 23:11:56 +08:00
|
|
|
extensions.
|
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@c DDDDDDDDDDDDDDDDDDDDDDDDDD
|
|
|
|
|
|
|
|
@cindex @code{.dn} and @code{.qn} directives, ARM
|
2007-08-23 10:05:58 +08:00
|
|
|
@item @var{name} .dn @var{register name} [@var{.type}] [[@var{index}]]
|
2010-06-21 18:49:41 +08:00
|
|
|
@itemx @var{name} .qn @var{register name} [@var{.type}] [[@var{index}]]
|
2007-03-26 22:39:35 +08:00
|
|
|
|
|
|
|
The @code{dn} and @code{qn} directives are used to create typed
|
|
|
|
and/or indexed register aliases for use in Advanced SIMD Extension
|
|
|
|
(Neon) instructions. The former should be used to create aliases
|
|
|
|
of double-precision registers, and the latter to create aliases of
|
|
|
|
quad-precision registers.
|
|
|
|
|
|
|
|
If these directives are used to create typed aliases, those aliases can
|
|
|
|
be used in Neon instructions instead of writing types after the mnemonic
|
|
|
|
or after each operand. For example:
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
x .dn d2.f32
|
|
|
|
y .dn d3.f32
|
|
|
|
z .dn d4.f32[1]
|
|
|
|
vmul x,y,z
|
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
This is equivalent to writing the following:
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
vmul.f32 d2,d3,d4[1]
|
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
Aliases created using @code{dn} or @code{qn} can be destroyed using
|
|
|
|
@code{unreq}.
|
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@c EEEEEEEEEEEEEEEEEEEEEEEEEE
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@cindex @code{.eabi_attribute} directive, ARM
|
|
|
|
@item .eabi_attribute @var{tag}, @var{value}
|
|
|
|
Set the EABI object attribute @var{tag} to @var{value}.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
The @var{tag} is either an attribute number, or one of the following:
|
|
|
|
@code{Tag_CPU_raw_name}, @code{Tag_CPU_name}, @code{Tag_CPU_arch},
|
|
|
|
@code{Tag_CPU_arch_profile}, @code{Tag_ARM_ISA_use},
|
2010-04-15 18:56:39 +08:00
|
|
|
@code{Tag_THUMB_ISA_use}, @code{Tag_FP_arch}, @code{Tag_WMMX_arch},
|
2009-01-29 15:08:12 +08:00
|
|
|
@code{Tag_Advanced_SIMD_arch}, @code{Tag_PCS_config},
|
|
|
|
@code{Tag_ABI_PCS_R9_use}, @code{Tag_ABI_PCS_RW_data},
|
|
|
|
@code{Tag_ABI_PCS_RO_data}, @code{Tag_ABI_PCS_GOT_use},
|
|
|
|
@code{Tag_ABI_PCS_wchar_t}, @code{Tag_ABI_FP_rounding},
|
|
|
|
@code{Tag_ABI_FP_denormal}, @code{Tag_ABI_FP_exceptions},
|
|
|
|
@code{Tag_ABI_FP_user_exceptions}, @code{Tag_ABI_FP_number_model},
|
2010-04-15 18:56:39 +08:00
|
|
|
@code{Tag_ABI_align_needed}, @code{Tag_ABI_align_preserved},
|
2009-01-29 15:08:12 +08:00
|
|
|
@code{Tag_ABI_enum_size}, @code{Tag_ABI_HardFP_use},
|
|
|
|
@code{Tag_ABI_VFP_args}, @code{Tag_ABI_WMMX_args},
|
|
|
|
@code{Tag_ABI_optimization_goals}, @code{Tag_ABI_FP_optimization_goals},
|
|
|
|
@code{Tag_compatibility}, @code{Tag_CPU_unaligned_access},
|
2010-04-15 18:56:39 +08:00
|
|
|
@code{Tag_FP_HP_extension}, @code{Tag_ABI_FP_16bit_format},
|
2010-02-18 18:56:28 +08:00
|
|
|
@code{Tag_MPextension_use}, @code{Tag_DIV_use},
|
2009-01-29 15:08:12 +08:00
|
|
|
@code{Tag_nodefaults}, @code{Tag_also_compatible_with},
|
|
|
|
@code{Tag_conformance}, @code{Tag_T2EE_use},
|
2010-02-18 18:56:28 +08:00
|
|
|
@code{Tag_Virtualization_use}
|
2009-01-29 15:08:12 +08:00
|
|
|
|
|
|
|
The @var{value} is either a @code{number}, @code{"string"}, or
|
|
|
|
@code{number, "string"} depending on the tag.
|
|
|
|
|
2010-04-15 18:56:39 +08:00
|
|
|
Note - the following legacy values are also accepted by @var{tag}:
|
2013-01-11 03:51:55 +08:00
|
|
|
@code{Tag_VFP_arch}, @code{Tag_ABI_align8_needed},
|
2010-04-15 18:56:39 +08:00
|
|
|
@code{Tag_ABI_align8_preserved}, @code{Tag_VFP_HP_extension},
|
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@cindex @code{.even} directive, ARM
|
|
|
|
@item .even
|
|
|
|
This directive aligns to an even-numbered address.
|
|
|
|
|
|
|
|
@cindex @code{.extend} directive, ARM
|
|
|
|
@cindex @code{.ldouble} directive, ARM
|
|
|
|
@item .extend @var{expression} [, @var{expression}]*
|
|
|
|
@itemx .ldouble @var{expression} [, @var{expression}]*
|
|
|
|
These directives write 12byte long double floating-point values to the
|
|
|
|
output section. These are not compatible with current ARM processors
|
|
|
|
or ABIs.
|
|
|
|
|
|
|
|
@c FFFFFFFFFFFFFFFFFFFFFFFFFF
|
|
|
|
|
|
|
|
@anchor{arm_fnend}
|
|
|
|
@cindex @code{.fnend} directive, ARM
|
|
|
|
@item .fnend
|
|
|
|
Marks the end of a function with an unwind table entry. The unwind index
|
|
|
|
table entry is created when this directive is processed.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
If no personality routine has been specified then standard personality
|
|
|
|
routine 0 or 1 will be used, depending on the number of unwind opcodes
|
|
|
|
required.
|
|
|
|
|
|
|
|
@anchor{arm_fnstart}
|
|
|
|
@cindex @code{.fnstart} directive, ARM
|
|
|
|
@item .fnstart
|
|
|
|
Marks the start of a function with an unwind table entry.
|
|
|
|
|
|
|
|
@cindex @code{.force_thumb} directive, ARM
|
1999-05-03 15:29:11 +08:00
|
|
|
@item .force_thumb
|
|
|
|
This directive forces the selection of Thumb instructions, even if the
|
|
|
|
target processor does not support those instructions
|
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@cindex @code{.fpu} directive, ARM
|
|
|
|
@item .fpu @var{name}
|
|
|
|
Select the floating-point unit to assemble for. Valid values for @var{name}
|
|
|
|
are the same as for the @option{-mfpu} commandline option.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@c GGGGGGGGGGGGGGGGGGGGGGGGGG
|
|
|
|
@c HHHHHHHHHHHHHHHHHHHHHHHHHH
|
2006-11-30 01:53:39 +08:00
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@cindex @code{.handlerdata} directive, ARM
|
|
|
|
@item .handlerdata
|
|
|
|
Marks the end of the current function, and the start of the exception table
|
|
|
|
entry for that function. Anything between this directive and the
|
|
|
|
@code{.fnend} directive will be added to the exception table entry.
|
|
|
|
|
|
|
|
Must be preceded by a @code{.personality} or @code{.personalityindex}
|
|
|
|
directive.
|
|
|
|
|
|
|
|
@c IIIIIIIIIIIIIIIIIIIIIIIIII
|
2009-07-09 15:52:37 +08:00
|
|
|
|
|
|
|
@cindex @code{.inst} directive, ARM
|
|
|
|
@item .inst @var{opcode} [ , @dots{} ]
|
2010-06-21 18:49:41 +08:00
|
|
|
@itemx .inst.n @var{opcode} [ , @dots{} ]
|
|
|
|
@itemx .inst.w @var{opcode} [ , @dots{} ]
|
2009-07-09 15:52:37 +08:00
|
|
|
Generates the instruction corresponding to the numerical value @var{opcode}.
|
|
|
|
@code{.inst.n} and @code{.inst.w} allow the Thumb instruction size to be
|
|
|
|
specified explicitly, overriding the normal encoding rules.
|
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@c JJJJJJJJJJJJJJJJJJJJJJJJJJ
|
|
|
|
@c KKKKKKKKKKKKKKKKKKKKKKKKKK
|
|
|
|
@c LLLLLLLLLLLLLLLLLLLLLLLLLL
|
|
|
|
|
|
|
|
@item .ldouble @var{expression} [, @var{expression}]*
|
|
|
|
See @code{.extend}.
|
1999-07-08 09:49:09 +08:00
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
@cindex @code{.ltorg} directive, ARM
|
|
|
|
@item .ltorg
|
|
|
|
This directive causes the current contents of the literal pool to be
|
|
|
|
dumped into the current section (which is assumed to be the .text
|
|
|
|
section) at the current location (aligned to a word boundary).
|
2002-07-30 18:56:04 +08:00
|
|
|
@code{GAS} maintains a separate literal pool for each section and each
|
|
|
|
sub-section. The @code{.ltorg} directive will only affect the literal
|
|
|
|
pool of the current section and sub-section. At the end of assembly
|
|
|
|
all remaining, un-empty literal pools will automatically be dumped.
|
|
|
|
|
|
|
|
Note - older versions of @code{GAS} would dump the current literal
|
|
|
|
pool any time a section change occurred. This is no longer done, since
|
|
|
|
it prevents accurate control of the placement of literal pools.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@c MMMMMMMMMMMMMMMMMMMMMMMMMM
|
1999-05-03 15:29:11 +08:00
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@cindex @code{.movsp} directive, ARM
|
|
|
|
@item .movsp @var{reg} [, #@var{offset}]
|
|
|
|
Tell the unwinder that @var{reg} contains an offset from the current
|
|
|
|
stack pointer. If @var{offset} is not specified then it is assumed to be
|
|
|
|
zero.
|
2004-10-05 21:51:40 +08:00
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@c NNNNNNNNNNNNNNNNNNNNNNNNNN
|
|
|
|
@c OOOOOOOOOOOOOOOOOOOOOOOOOO
|
2004-10-05 21:51:40 +08:00
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@cindex @code{.object_arch} directive, ARM
|
|
|
|
@item .object_arch @var{name}
|
|
|
|
Override the architecture recorded in the EABI object attribute section.
|
|
|
|
Valid values for @var{name} are the same as for the @code{.arch} directive.
|
|
|
|
Typically this is useful when code uses runtime detection of CPU features.
|
2004-10-05 21:51:40 +08:00
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@c PPPPPPPPPPPPPPPPPPPPPPPPPP
|
|
|
|
|
|
|
|
@cindex @code{.packed} directive, ARM
|
|
|
|
@item .packed @var{expression} [, @var{expression}]*
|
|
|
|
This directive writes 12-byte packed floating-point values to the
|
|
|
|
output section. These are not compatible with current ARM processors
|
|
|
|
or ABIs.
|
|
|
|
|
|
|
|
@cindex @code{.pad} directive, ARM
|
|
|
|
@item .pad #@var{count}
|
|
|
|
Generate unwinder annotations for a stack adjustment of @var{count} bytes.
|
|
|
|
A positive value indicates the function prologue allocated stack space by
|
|
|
|
decrementing the stack pointer.
|
2004-10-05 21:51:40 +08:00
|
|
|
|
|
|
|
@cindex @code{.personality} directive, ARM
|
|
|
|
@item .personality @var{name}
|
|
|
|
Sets the personality routine for the current function to @var{name}.
|
|
|
|
|
|
|
|
@cindex @code{.personalityindex} directive, ARM
|
|
|
|
@item .personalityindex @var{index}
|
|
|
|
Sets the personality routine for the current function to the EABI standard
|
|
|
|
routine number @var{index}
|
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@cindex @code{.pool} directive, ARM
|
|
|
|
@item .pool
|
|
|
|
This is a synonym for .ltorg.
|
2004-10-05 21:51:40 +08:00
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@c QQQQQQQQQQQQQQQQQQQQQQQQQQ
|
|
|
|
@c RRRRRRRRRRRRRRRRRRRRRRRRRR
|
|
|
|
|
|
|
|
@cindex @code{.req} directive, ARM
|
|
|
|
@item @var{name} .req @var{register name}
|
|
|
|
This creates an alias for @var{register name} called @var{name}. For
|
|
|
|
example:
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
foo .req r0
|
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
@c SSSSSSSSSSSSSSSSSSSSSSSSSS
|
2004-10-05 21:51:40 +08:00
|
|
|
|
2008-08-27 00:02:59 +08:00
|
|
|
@anchor{arm_save}
|
2004-10-05 21:51:40 +08:00
|
|
|
@cindex @code{.save} directive, ARM
|
|
|
|
@item .save @var{reglist}
|
|
|
|
Generate unwinder annotations to restore the registers in @var{reglist}.
|
|
|
|
The format of @var{reglist} is the same as the corresponding store-multiple
|
|
|
|
instruction.
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
@exdent @emph{core registers}
|
|
|
|
.save @{r4, r5, r6, lr@}
|
|
|
|
stmfd sp!, @{r4, r5, r6, lr@}
|
|
|
|
@exdent @emph{FPA registers}
|
|
|
|
.save f4, 2
|
|
|
|
sfmfd f4, 2, [sp]!
|
|
|
|
@exdent @emph{VFP registers}
|
|
|
|
.save @{d8, d9, d10@}
|
2006-06-21 22:20:25 +08:00
|
|
|
fstmdx sp!, @{d8, d9, d10@}
|
2004-10-05 21:51:40 +08:00
|
|
|
@exdent @emph{iWMMXt registers}
|
|
|
|
.save @{wr10, wr11@}
|
|
|
|
wstrd wr11, [sp, #-8]!
|
|
|
|
wstrd wr10, [sp, #-8]!
|
|
|
|
or
|
|
|
|
.save wr11
|
|
|
|
wstrd wr11, [sp, #-8]!
|
|
|
|
.save wr10
|
|
|
|
wstrd wr10, [sp, #-8]!
|
|
|
|
@end smallexample
|
|
|
|
|
2008-08-27 00:02:59 +08:00
|
|
|
@anchor{arm_setfp}
|
2004-10-05 21:51:40 +08:00
|
|
|
@cindex @code{.setfp} directive, ARM
|
|
|
|
@item .setfp @var{fpreg}, @var{spreg} [, #@var{offset}]
|
2009-01-29 15:08:12 +08:00
|
|
|
Make all unwinder annotations relative to a frame pointer. Without this
|
2004-10-05 21:51:40 +08:00
|
|
|
the unwinder will use offsets from the stack pointer.
|
|
|
|
|
2010-03-18 23:34:47 +08:00
|
|
|
The syntax of this directive is the same as the @code{add} or @code{mov}
|
2004-10-05 21:51:40 +08:00
|
|
|
instruction used to set the frame pointer. @var{spreg} must be either
|
|
|
|
@code{sp} or mentioned in a previous @code{.movsp} directive.
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
.movsp ip
|
|
|
|
mov ip, sp
|
|
|
|
@dots{}
|
|
|
|
.setfp fp, ip, #4
|
2010-03-18 23:34:47 +08:00
|
|
|
add fp, ip, #4
|
2004-10-05 21:51:40 +08:00
|
|
|
@end smallexample
|
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@cindex @code{.secrel32} directive, ARM
|
|
|
|
@item .secrel32 @var{expression} [, @var{expression}]*
|
|
|
|
This directive emits relocations that evaluate to the section-relative
|
|
|
|
offset of each expression's symbol. This directive is only supported
|
|
|
|
for PE targets.
|
|
|
|
|
2009-07-30 16:54:49 +08:00
|
|
|
@cindex @code{.syntax} directive, ARM
|
|
|
|
@item .syntax [@code{unified} | @code{divided}]
|
|
|
|
This directive sets the Instruction Set Syntax as described in the
|
|
|
|
@ref{ARM-Instruction-Set} section.
|
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@c TTTTTTTTTTTTTTTTTTTTTTTTTT
|
|
|
|
|
|
|
|
@cindex @code{.thumb} directive, ARM
|
|
|
|
@item .thumb
|
|
|
|
This performs the same action as @var{.code 16}.
|
|
|
|
|
|
|
|
@cindex @code{.thumb_func} directive, ARM
|
|
|
|
@item .thumb_func
|
|
|
|
This directive specifies that the following symbol is the name of a
|
|
|
|
Thumb encoded function. This information is necessary in order to allow
|
|
|
|
the assembler and linker to generate correct code for interworking
|
|
|
|
between Arm and Thumb instructions and should be used even if
|
|
|
|
interworking is not going to be performed. The presence of this
|
|
|
|
directive also implies @code{.thumb}
|
|
|
|
|
|
|
|
This directive is not neccessary when generating EABI objects. On these
|
|
|
|
targets the encoding is implicit when generating Thumb code.
|
|
|
|
|
|
|
|
@cindex @code{.thumb_set} directive, ARM
|
|
|
|
@item .thumb_set
|
|
|
|
This performs the equivalent of a @code{.set} directive in that it
|
|
|
|
creates a symbol which is an alias for another symbol (possibly not yet
|
|
|
|
defined). This directive also has the added property in that it marks
|
|
|
|
the aliased symbol as being a thumb function entry point, in the same
|
|
|
|
way that the @code{.thumb_func} directive does.
|
|
|
|
|
bfd/
* reloc.c (BFD_RELOC_ARM_TLS_GOTDESC, BFD_RELOC_ARM_TLS_CALL,
BFD_RELOC_ARM_THM_TLS_CALL, BFD_RELOC_ARM_TLS_DESCSEQ,
BFD_RELOC_ARM_THM_TLS_DESCSEQ, BFD_RELOC_ARM_TLS_DESC): New
relocations.
* libbfd.h: Rebuilt.
* bfd-in2.h: Rebuilt.
* elf32-arm.c (elf32_arm_howto_table_1): Add new relocations.
(elf32_arm_reloc_map): Likewise.
(tls_trampoline, dl_tlsdesc_lazy_trampoline): New PLT templates.
(elf32_arm_stub_long_branch_any_tls_pic,
elf32_arm_stub_long_branch_v4t_thumb_tls_pic): New stub templates.
(DEF_STUBS): Add new stubs.
(struct_elf_arm_obj_data): Add local_tlsdesc_gotent field.
(elf32_arm_local_tlsdesc_gotent): New.
(GOT_TLS_GDESC): New mask.
(GOT_TLS_GD_ANY): Define.
(struct elf32_arm_link_hash_entry): Add tlsdesc_got field.
(elf32_arm_compute_jump_table_size): New.
(struct elf32_arm_link_hash_table): Add next_tls_desc_index,
num_tls_desc, dt_tlsdesc_plt, dt_tlsdesc_got, tls_trampoline,
sgotplt_jump_table_size fields.
(elf32_arm_link_hash_newfunc): Initialize tlsdesc_got field.
(elf32_arm_link_hash_table_create): Initialize new fields.
(arm_type_of_stub): Check TLS desc relocs too.
(elf32_arm_stub_name): TLS desc relocs can be shared.
(elf32_arm_tls_transition): Determine relaxation.
(arm_stub_required_alignment): Add tls stubs.
(elf32_arm_size_stubs): Likewise.
(elf32_arm_tls_relax): Perform TLS relaxing.
(elf32_arm_final_link_relocate): Process TLS DESC relocations.
(IS_ARM_TLS_GNU_RELOC): New.
(IS_ARM_TLS_RELOC): Use it.
(elf32_arm_relocate_section): Perform TLS relaxing.
(elf32_arm_check_relocs): Anticipate TLS relaxing, process tls
desc relocations.
(allocate_dynrelocs): Allocate tls desc relcoations.
(elf32_arm_output_arch_local_syms): Emit tls trampoline mapping
symbols.
(elf32_arm_size_dynamic_sections): Allocate tls trampolines and
got slots.
(elf32_arm_always_size_sections): New. Create _TLS_MODULE_BASE
symbol.
(elf32_arm_finish_dynamic_symbol): Adjust.
(arm_put_trampoline): New.
(elf32_arm_finish_dynamic_sections): Emit new dynamic tags and tls
trampolines.
(elf_backend_always_size_sections): Define.
include/elf/
* arm.h (R_ARM_TLS_DESC, R_ARM_TLS_GOTDESC, R_ARM_TLS_CALL,
R_ARM_TLS_DESCSEQ, T_ARM_THM_TLS_CALL, R_ARM_THM_TLS_DESCSEQ): New
relocations.
gas/
* doc/c-arm.texi: Document TLSDESC and TLSCALL relocations, and
.tlsdescseq directive.
* config/tc-arm.c (arm_typed_reg_parse): Check for potential reloc
following a symbol.
(s_arm_tls_descseq): New directive.
(md_pseudo_table): Add it.
(encode_branch): Allow TLS_CALL relocs too.
(do_t_blx, do_t_branch23): Use encode_branch.
(reloc_names): Add tlsdesc and tlscall.
(md_apply_fix): Process tls desc relocations.
(tc_gen_reloc): Likewise.
(arm_fix_adjustable): Likewise.
gas/testsuite/
* gas/arm/tls.s: Add tlsdesc tests.
* gas/arm/tls.d: Adjust.
ld/testsuite/
* ld-arm/arm-elf.exp: Added tests for new TLS handling
relocations.
* ld-arm/tls-descrelax-be32.d: New.
* ld-arm/tls-descrelax-be32.s: New.
* ld-arm/tls-descrelax-be8.d: New.
* ld-arm/tls-descrelax-be8.s: New.
* ld-arm/tls-descrelax-v7.d: New.
* ld-arm/tls-descrelax-v7.s: New.
* ld-arm/tls-descrelax.d: New.
* ld-arm/tls-descrelax.s: New.
* ld-arm/tls-descseq.d: New.
* ld-arm/tls-descseq.r: New.
* ld-arm/tls-descseq.s: New.
* ld-arm/tls-gdesc-got.d: New.
* ld-arm/tls-gdesc-got.s: New.
* ld-arm/tls-gdesc-nlazy.g: New.
* ld-arm/tls-gdesc-nlazy.s: New.
* ld-arm/tls-gdesc.d: New.
* ld-arm/tls-gdesc.r: New.
* ld-arm/tls-gdesc.s: New.
* ld-arm/tls-gdierelax.d: New.
* ld-arm/tls-gdierelax.s: New.
* ld-arm/tls-gdierelax2.d: New.
* ld-arm/tls-gdierelax2.s: New.
* ld-arm/tls-gdlerelax.d: New.
* ld-arm/tls-gdlerelax.s: New.
* ld-arm/tls-lib-loc.d: New.
* ld-arm/tls-lib-loc.r: New.
* ld-arm/tls-lib-loc.s: New.
* ld-arm/tls-longplt-lib.d: New.
* ld-arm/tls-longplt-lib.s: New.
* ld-arm/tls-longplt.d: New.
* ld-arm/tls-longplt.s: New.
* ld-arm/tls-mixed.r: New.
* ld-arm/tls-mixed.s: New.
* ld-arm/tls-thumb1.d: New.
* ld-arm/tls-thumb1.s: New.
* ld-arm/arm-elf.exp: New.
2011-01-10 16:40:19 +08:00
|
|
|
@cindex @code{.tlsdescseq} directive, ARM
|
|
|
|
@item .tlsdescseq @var{tls-variable}
|
|
|
|
This directive is used to annotate parts of an inlined TLS descriptor
|
|
|
|
trampoline. Normally the trampoline is provided by the linker, and
|
|
|
|
this directive is not needed.
|
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@c UUUUUUUUUUUUUUUUUUUUUUUUUU
|
|
|
|
|
|
|
|
@cindex @code{.unreq} directive, ARM
|
|
|
|
@item .unreq @var{alias-name}
|
|
|
|
This undefines a register alias which was previously defined using the
|
|
|
|
@code{req}, @code{dn} or @code{qn} directives. For example:
|
|
|
|
|
|
|
|
@smallexample
|
|
|
|
foo .req r0
|
|
|
|
.unreq foo
|
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
An error occurs if the name is undefined. Note - this pseudo op can
|
|
|
|
be used to delete builtin in register name aliases (eg 'r0'). This
|
|
|
|
should only be done if it is really necessary.
|
|
|
|
|
2004-10-05 21:51:40 +08:00
|
|
|
@cindex @code{.unwind_raw} directive, ARM
|
2009-01-29 15:08:12 +08:00
|
|
|
@item .unwind_raw @var{offset}, @var{byte1}, @dots{}
|
2004-10-05 21:51:40 +08:00
|
|
|
Insert one of more arbitary unwind opcode bytes, which are known to adjust
|
|
|
|
the stack pointer by @var{offset} bytes.
|
|
|
|
|
|
|
|
For example @code{.unwind_raw 4, 0xb1, 0x01} is equivalent to
|
|
|
|
@code{.save @{r0@}}
|
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@c VVVVVVVVVVVVVVVVVVVVVVVVVV
|
2005-10-08 Paul Brook <paul@codesourcery.com>
bfd/
* elf32-arm.c: Move #include "elf/arm.h" after libbfd.h.
(NUM_KNOWN_ATTRIBUTES): Define.
(aeabi_attribute, aeabi_attribute_list): Define.
(elf32_arm_obj_tdata): Add known_eabi_attributes and
other_eabi_attributes.
(uleb128_size, is_default_attr, eabi_attr_size,
elf32_arm_eabi_attr_size, write_uleb128, write_eabi_attribute,
elf32_arm_set_eabi_attr_contents, elf32_arm_bfd_final_link,
elf32_arm_new_eabi_attr, attr_strdup, elf32_arm_add_eabi_attr_int,
elf32_arm_add_eabi_attr_compat, copy_eabi_attributes,
elf32_arm_merge_eabi_attributes): New functions.
(elf32_arm_copy_private_bfd_data): Copy EABI object attributes.
(elf32_arm_fake_sections): Handle .ARM.attributes.
(elf32_arm_parse_attributes): New function.
(elf32_arm_section_from_shdr): Use it.
(bfd_elf32_bfd_final_link): Define.
gas/
* config/tc-arm.c: Don't provide fallback default for CPU_DEFAULT.
(arm_arch_used, thumb_arch_used, selected_cpu, selected_cpu_name):
New variables.
(arm_cpu_option_table): Add canonical_name.
(arm_cpus): Populate canonical_name field.
(s_arm_eabi_attribute, s_arm_arch, s_arm_cpu, s_arm_fpu,
aeabi_set_public_attributes, arm_md_end): New functions.
(md_pseudo_table): Add "cpu", "arch", "fpu" and "eabi_attribute".
(md_assemble): Set thumb_arch_used and arm_arch_used.
(md_begin): Set defaut cpu if CPU_DEFAULT not defined.
* config/tc-arm.h (md_end): Define.
* doc/c-arm.texi: Document .cpu, .arch, .fpu and .eabi_attribute.
gas/testsuite/
* gas/arm/eabi_attr_1.s: New test.
* gas/arm/eabi_attr_1.d: New test.
* gas/arm/arm7t.d: Only disassemble code sections.
* gas/arm/bignum1.d: Ignore Arm object attribute sections.
* gas/arm/mapping.d: Ditto.
* gas/arm/unwind.d: Ditto.
* gas/elf/section0.d: Ditto.
* gas/elf/section1.d: Ditto.
* gas/elf/elf.exp: Set target_machine for Arm EABI based targets.
* gas/elf/section2.e-armeabi: New file.
include/elf/
* arm.h: Add prototypes for BFD object attribute routines.
ld/testsuite/
* ld-arm/arm-rel31.d: Ignore Arm object attribute sections.
* ld-arm/arm-target1-abs.d: Ditto.
* ld-arm/arm-target1-rel.d: Ditto.
* ld-arm/arm-target2-abs.d: Ditto.
* ld-arm/arm-target2-got-rel.d: Ditto.
* ld-arm/arm-target2-rel.d: Ditto.
2005-10-09 01:07:19 +08:00
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@cindex @code{.vsave} directive, ARM
|
|
|
|
@item .vsave @var{vfp-reglist}
|
|
|
|
Generate unwinder annotations to restore the VFP registers in @var{vfp-reglist}
|
|
|
|
using FLDMD. Also works for VFPv3 registers
|
|
|
|
that are to be restored using VLDM.
|
|
|
|
The format of @var{vfp-reglist} is the same as the corresponding store-multiple
|
|
|
|
instruction.
|
2005-10-08 Paul Brook <paul@codesourcery.com>
bfd/
* elf32-arm.c: Move #include "elf/arm.h" after libbfd.h.
(NUM_KNOWN_ATTRIBUTES): Define.
(aeabi_attribute, aeabi_attribute_list): Define.
(elf32_arm_obj_tdata): Add known_eabi_attributes and
other_eabi_attributes.
(uleb128_size, is_default_attr, eabi_attr_size,
elf32_arm_eabi_attr_size, write_uleb128, write_eabi_attribute,
elf32_arm_set_eabi_attr_contents, elf32_arm_bfd_final_link,
elf32_arm_new_eabi_attr, attr_strdup, elf32_arm_add_eabi_attr_int,
elf32_arm_add_eabi_attr_compat, copy_eabi_attributes,
elf32_arm_merge_eabi_attributes): New functions.
(elf32_arm_copy_private_bfd_data): Copy EABI object attributes.
(elf32_arm_fake_sections): Handle .ARM.attributes.
(elf32_arm_parse_attributes): New function.
(elf32_arm_section_from_shdr): Use it.
(bfd_elf32_bfd_final_link): Define.
gas/
* config/tc-arm.c: Don't provide fallback default for CPU_DEFAULT.
(arm_arch_used, thumb_arch_used, selected_cpu, selected_cpu_name):
New variables.
(arm_cpu_option_table): Add canonical_name.
(arm_cpus): Populate canonical_name field.
(s_arm_eabi_attribute, s_arm_arch, s_arm_cpu, s_arm_fpu,
aeabi_set_public_attributes, arm_md_end): New functions.
(md_pseudo_table): Add "cpu", "arch", "fpu" and "eabi_attribute".
(md_assemble): Set thumb_arch_used and arm_arch_used.
(md_begin): Set defaut cpu if CPU_DEFAULT not defined.
* config/tc-arm.h (md_end): Define.
* doc/c-arm.texi: Document .cpu, .arch, .fpu and .eabi_attribute.
gas/testsuite/
* gas/arm/eabi_attr_1.s: New test.
* gas/arm/eabi_attr_1.d: New test.
* gas/arm/arm7t.d: Only disassemble code sections.
* gas/arm/bignum1.d: Ignore Arm object attribute sections.
* gas/arm/mapping.d: Ditto.
* gas/arm/unwind.d: Ditto.
* gas/elf/section0.d: Ditto.
* gas/elf/section1.d: Ditto.
* gas/elf/elf.exp: Set target_machine for Arm EABI based targets.
* gas/elf/section2.e-armeabi: New file.
include/elf/
* arm.h: Add prototypes for BFD object attribute routines.
ld/testsuite/
* ld-arm/arm-rel31.d: Ignore Arm object attribute sections.
* ld-arm/arm-target1-abs.d: Ditto.
* ld-arm/arm-target1-rel.d: Ditto.
* ld-arm/arm-target2-abs.d: Ditto.
* ld-arm/arm-target2-got-rel.d: Ditto.
* ld-arm/arm-target2-rel.d: Ditto.
2005-10-09 01:07:19 +08:00
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@smallexample
|
|
|
|
@exdent @emph{VFP registers}
|
|
|
|
.vsave @{d8, d9, d10@}
|
|
|
|
fstmdd sp!, @{d8, d9, d10@}
|
|
|
|
@exdent @emph{VFPv3 registers}
|
|
|
|
.vsave @{d15, d16, d17@}
|
|
|
|
vstm sp!, @{d15, d16, d17@}
|
|
|
|
@end smallexample
|
2009-01-16 18:26:49 +08:00
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
Since FLDMX and FSTMX are now deprecated, this directive should be
|
|
|
|
used in favour of @code{.save} for saving VFP registers for ARMv6 and above.
|
2009-01-16 18:26:49 +08:00
|
|
|
|
2009-01-29 15:08:12 +08:00
|
|
|
@c WWWWWWWWWWWWWWWWWWWWWWWWWW
|
|
|
|
@c XXXXXXXXXXXXXXXXXXXXXXXXXX
|
|
|
|
@c YYYYYYYYYYYYYYYYYYYYYYYYYY
|
|
|
|
@c ZZZZZZZZZZZZZZZZZZZZZZZZZZ
|
2005-10-08 Paul Brook <paul@codesourcery.com>
bfd/
* elf32-arm.c: Move #include "elf/arm.h" after libbfd.h.
(NUM_KNOWN_ATTRIBUTES): Define.
(aeabi_attribute, aeabi_attribute_list): Define.
(elf32_arm_obj_tdata): Add known_eabi_attributes and
other_eabi_attributes.
(uleb128_size, is_default_attr, eabi_attr_size,
elf32_arm_eabi_attr_size, write_uleb128, write_eabi_attribute,
elf32_arm_set_eabi_attr_contents, elf32_arm_bfd_final_link,
elf32_arm_new_eabi_attr, attr_strdup, elf32_arm_add_eabi_attr_int,
elf32_arm_add_eabi_attr_compat, copy_eabi_attributes,
elf32_arm_merge_eabi_attributes): New functions.
(elf32_arm_copy_private_bfd_data): Copy EABI object attributes.
(elf32_arm_fake_sections): Handle .ARM.attributes.
(elf32_arm_parse_attributes): New function.
(elf32_arm_section_from_shdr): Use it.
(bfd_elf32_bfd_final_link): Define.
gas/
* config/tc-arm.c: Don't provide fallback default for CPU_DEFAULT.
(arm_arch_used, thumb_arch_used, selected_cpu, selected_cpu_name):
New variables.
(arm_cpu_option_table): Add canonical_name.
(arm_cpus): Populate canonical_name field.
(s_arm_eabi_attribute, s_arm_arch, s_arm_cpu, s_arm_fpu,
aeabi_set_public_attributes, arm_md_end): New functions.
(md_pseudo_table): Add "cpu", "arch", "fpu" and "eabi_attribute".
(md_assemble): Set thumb_arch_used and arm_arch_used.
(md_begin): Set defaut cpu if CPU_DEFAULT not defined.
* config/tc-arm.h (md_end): Define.
* doc/c-arm.texi: Document .cpu, .arch, .fpu and .eabi_attribute.
gas/testsuite/
* gas/arm/eabi_attr_1.s: New test.
* gas/arm/eabi_attr_1.d: New test.
* gas/arm/arm7t.d: Only disassemble code sections.
* gas/arm/bignum1.d: Ignore Arm object attribute sections.
* gas/arm/mapping.d: Ditto.
* gas/arm/unwind.d: Ditto.
* gas/elf/section0.d: Ditto.
* gas/elf/section1.d: Ditto.
* gas/elf/elf.exp: Set target_machine for Arm EABI based targets.
* gas/elf/section2.e-armeabi: New file.
include/elf/
* arm.h: Add prototypes for BFD object attribute routines.
ld/testsuite/
* ld-arm/arm-rel31.d: Ignore Arm object attribute sections.
* ld-arm/arm-target1-abs.d: Ditto.
* ld-arm/arm-target1-rel.d: Ditto.
* ld-arm/arm-target2-abs.d: Ditto.
* ld-arm/arm-target2-got-rel.d: Ditto.
* ld-arm/arm-target2-rel.d: Ditto.
2005-10-09 01:07:19 +08:00
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
@end table
|
|
|
|
|
|
|
|
@node ARM Opcodes
|
|
|
|
@section Opcodes
|
|
|
|
|
|
|
|
@cindex ARM opcodes
|
|
|
|
@cindex opcodes for ARM
|
1999-07-05 15:39:01 +08:00
|
|
|
@code{@value{AS}} implements all the standard ARM opcodes. It also
|
|
|
|
implements several pseudo opcodes, including several synthetic load
|
2013-01-11 03:51:55 +08:00
|
|
|
instructions.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
1999-07-05 15:39:01 +08:00
|
|
|
@table @code
|
|
|
|
|
|
|
|
@cindex @code{NOP} pseudo op, ARM
|
|
|
|
@item NOP
|
|
|
|
@smallexample
|
|
|
|
nop
|
|
|
|
@end smallexample
|
1999-05-03 15:29:11 +08:00
|
|
|
|
1999-07-05 15:39:01 +08:00
|
|
|
This pseudo op will always evaluate to a legal ARM instruction that does
|
|
|
|
nothing. Currently it will evaluate to MOV r0, r0.
|
1999-05-03 15:29:11 +08:00
|
|
|
|
1999-07-05 15:39:01 +08:00
|
|
|
@cindex @code{LDR reg,=<label>} pseudo op, ARM
|
2013-01-11 03:51:55 +08:00
|
|
|
@item LDR
|
1999-05-03 15:29:11 +08:00
|
|
|
@smallexample
|
|
|
|
ldr <register> , = <expression>
|
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
If expression evaluates to a numeric constant then a MOV or MVN
|
|
|
|
instruction will be used in place of the LDR instruction, if the
|
|
|
|
constant can be generated by either of these instructions. Otherwise
|
|
|
|
the constant will be placed into the nearest literal pool (if it not
|
|
|
|
already there) and a PC relative LDR instruction will be generated.
|
|
|
|
|
1999-07-05 15:39:01 +08:00
|
|
|
@cindex @code{ADR reg,<label>} pseudo op, ARM
|
|
|
|
@item ADR
|
|
|
|
@smallexample
|
|
|
|
adr <register> <label>
|
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
This instruction will load the address of @var{label} into the indicated
|
|
|
|
register. The instruction will evaluate to a PC relative ADD or SUB
|
|
|
|
instruction depending upon where the label is located. If the label is
|
|
|
|
out of range, or if it is not defined in the same file (and section) as
|
|
|
|
the ADR instruction, then an error will be generated. This instruction
|
|
|
|
will not make use of the literal pool.
|
|
|
|
|
|
|
|
@cindex @code{ADRL reg,<label>} pseudo op, ARM
|
2013-01-11 03:51:55 +08:00
|
|
|
@item ADRL
|
1999-07-05 15:39:01 +08:00
|
|
|
@smallexample
|
|
|
|
adrl <register> <label>
|
|
|
|
@end smallexample
|
|
|
|
|
|
|
|
This instruction will load the address of @var{label} into the indicated
|
2001-01-14 06:39:55 +08:00
|
|
|
register. The instruction will evaluate to one or two PC relative ADD
|
1999-07-05 15:39:01 +08:00
|
|
|
or SUB instructions depending upon where the label is located. If a
|
|
|
|
second instruction is not needed a NOP instruction will be generated in
|
|
|
|
its place, so that this instruction is always 8 bytes long.
|
|
|
|
|
|
|
|
If the label is out of range, or if it is not defined in the same file
|
|
|
|
(and section) as the ADRL instruction, then an error will be generated.
|
|
|
|
This instruction will not make use of the literal pool.
|
|
|
|
|
|
|
|
@end table
|
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
For information on the ARM or Thumb instruction sets, see @cite{ARM
|
|
|
|
Software Development Toolkit Reference Manual}, Advanced RISC Machines
|
|
|
|
Ltd.
|
|
|
|
|
2003-11-13 22:19:01 +08:00
|
|
|
@node ARM Mapping Symbols
|
|
|
|
@section Mapping Symbols
|
|
|
|
|
|
|
|
The ARM ELF specification requires that special symbols be inserted
|
|
|
|
into object files to mark certain features:
|
|
|
|
|
|
|
|
@table @code
|
|
|
|
|
|
|
|
@cindex @code{$a}
|
|
|
|
@item $a
|
|
|
|
At the start of a region of code containing ARM instructions.
|
|
|
|
|
|
|
|
@cindex @code{$t}
|
|
|
|
@item $t
|
|
|
|
At the start of a region of code containing THUMB instructions.
|
|
|
|
|
|
|
|
@cindex @code{$d}
|
|
|
|
@item $d
|
|
|
|
At the start of a region of data.
|
|
|
|
|
|
|
|
@end table
|
|
|
|
|
|
|
|
The assembler will automatically insert these symbols for you - there
|
|
|
|
is no need to code them yourself. Support for tagging symbols ($b,
|
|
|
|
$f, $p and $m) which is also mentioned in the current ARM ELF
|
|
|
|
specification is not implemented. This is because they have been
|
|
|
|
dropped from the new EABI and so tools cannot rely upon their
|
|
|
|
presence.
|
|
|
|
|
2008-08-27 00:02:59 +08:00
|
|
|
@node ARM Unwinding Tutorial
|
|
|
|
@section Unwinding
|
|
|
|
|
|
|
|
The ABI for the ARM Architecture specifies a standard format for
|
|
|
|
exception unwind information. This information is used when an
|
|
|
|
exception is thrown to determine where control should be transferred.
|
|
|
|
In particular, the unwind information is used to determine which
|
|
|
|
function called the function that threw the exception, and which
|
|
|
|
function called that one, and so forth. This information is also used
|
|
|
|
to restore the values of callee-saved registers in the function
|
|
|
|
catching the exception.
|
|
|
|
|
|
|
|
If you are writing functions in assembly code, and those functions
|
|
|
|
call other functions that throw exceptions, you must use assembly
|
|
|
|
pseudo ops to ensure that appropriate exception unwind information is
|
|
|
|
generated. Otherwise, if one of the functions called by your assembly
|
|
|
|
code throws an exception, the run-time library will be unable to
|
|
|
|
unwind the stack through your assembly code and your program will not
|
|
|
|
behave correctly.
|
|
|
|
|
|
|
|
To illustrate the use of these pseudo ops, we will examine the code
|
|
|
|
that G++ generates for the following C++ input:
|
|
|
|
|
|
|
|
@verbatim
|
|
|
|
void callee (int *);
|
|
|
|
|
2013-01-11 03:51:55 +08:00
|
|
|
int
|
|
|
|
caller ()
|
2008-08-27 00:02:59 +08:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
callee (&i);
|
2013-01-11 03:51:55 +08:00
|
|
|
return i;
|
2008-08-27 00:02:59 +08:00
|
|
|
}
|
|
|
|
@end verbatim
|
|
|
|
|
|
|
|
This example does not show how to throw or catch an exception from
|
|
|
|
assembly code. That is a much more complex operation and should
|
|
|
|
always be done in a high-level language, such as C++, that directly
|
|
|
|
supports exceptions.
|
|
|
|
|
|
|
|
The code generated by one particular version of G++ when compiling the
|
|
|
|
example above is:
|
|
|
|
|
|
|
|
@verbatim
|
|
|
|
_Z6callerv:
|
|
|
|
.fnstart
|
|
|
|
.LFB2:
|
|
|
|
@ Function supports interworking.
|
|
|
|
@ args = 0, pretend = 0, frame = 8
|
|
|
|
@ frame_needed = 1, uses_anonymous_args = 0
|
|
|
|
stmfd sp!, {fp, lr}
|
|
|
|
.save {fp, lr}
|
|
|
|
.LCFI0:
|
|
|
|
.setfp fp, sp, #4
|
|
|
|
add fp, sp, #4
|
|
|
|
.LCFI1:
|
|
|
|
.pad #8
|
|
|
|
sub sp, sp, #8
|
|
|
|
.LCFI2:
|
|
|
|
sub r3, fp, #8
|
|
|
|
mov r0, r3
|
|
|
|
bl _Z6calleePi
|
|
|
|
ldr r3, [fp, #-8]
|
|
|
|
mov r0, r3
|
|
|
|
sub sp, fp, #4
|
|
|
|
ldmfd sp!, {fp, lr}
|
|
|
|
bx lr
|
|
|
|
.LFE2:
|
|
|
|
.fnend
|
|
|
|
@end verbatim
|
|
|
|
|
|
|
|
Of course, the sequence of instructions varies based on the options
|
|
|
|
you pass to GCC and on the version of GCC in use. The exact
|
|
|
|
instructions are not important since we are focusing on the pseudo ops
|
|
|
|
that are used to generate unwind information.
|
|
|
|
|
|
|
|
An important assumption made by the unwinder is that the stack frame
|
|
|
|
does not change during the body of the function. In particular, since
|
|
|
|
we assume that the assembly code does not itself throw an exception,
|
|
|
|
the only point where an exception can be thrown is from a call, such
|
|
|
|
as the @code{bl} instruction above. At each call site, the same saved
|
|
|
|
registers (including @code{lr}, which indicates the return address)
|
|
|
|
must be located in the same locations relative to the frame pointer.
|
|
|
|
|
|
|
|
The @code{.fnstart} (@pxref{arm_fnstart,,.fnstart pseudo op}) pseudo
|
|
|
|
op appears immediately before the first instruction of the function
|
|
|
|
while the @code{.fnend} (@pxref{arm_fnend,,.fnend pseudo op}) pseudo
|
|
|
|
op appears immediately after the last instruction of the function.
|
2013-01-11 03:51:55 +08:00
|
|
|
These pseudo ops specify the range of the function.
|
2008-08-27 00:02:59 +08:00
|
|
|
|
|
|
|
Only the order of the other pseudos ops (e.g., @code{.setfp} or
|
|
|
|
@code{.pad}) matters; their exact locations are irrelevant. In the
|
|
|
|
example above, the compiler emits the pseudo ops with particular
|
|
|
|
instructions. That makes it easier to understand the code, but it is
|
|
|
|
not required for correctness. It would work just as well to emit all
|
|
|
|
of the pseudo ops other than @code{.fnend} in the same order, but
|
|
|
|
immediately after @code{.fnstart}.
|
|
|
|
|
|
|
|
The @code{.save} (@pxref{arm_save,,.save pseudo op}) pseudo op
|
|
|
|
indicates registers that have been saved to the stack so that they can
|
|
|
|
be restored before the function returns. The argument to the
|
|
|
|
@code{.save} pseudo op is a list of registers to save. If a register
|
|
|
|
is ``callee-saved'' (as specified by the ABI) and is modified by the
|
|
|
|
function you are writing, then your code must save the value before it
|
|
|
|
is modified and restore the original value before the function
|
|
|
|
returns. If an exception is thrown, the run-time library restores the
|
|
|
|
values of these registers from their locations on the stack before
|
|
|
|
returning control to the exception handler. (Of course, if an
|
|
|
|
exception is not thrown, the function that contains the @code{.save}
|
|
|
|
pseudo op restores these registers in the function epilogue, as is
|
|
|
|
done with the @code{ldmfd} instruction above.)
|
|
|
|
|
|
|
|
You do not have to save callee-saved registers at the very beginning
|
|
|
|
of the function and you do not need to use the @code{.save} pseudo op
|
|
|
|
immediately following the point at which the registers are saved.
|
|
|
|
However, if you modify a callee-saved register, you must save it on
|
|
|
|
the stack before modifying it and before calling any functions which
|
|
|
|
might throw an exception. And, you must use the @code{.save} pseudo
|
|
|
|
op to indicate that you have done so.
|
|
|
|
|
|
|
|
The @code{.pad} (@pxref{arm_pad,,.pad}) pseudo op indicates a
|
|
|
|
modification of the stack pointer that does not save any registers.
|
|
|
|
The argument is the number of bytes (in decimal) that are subtracted
|
|
|
|
from the stack pointer. (On ARM CPUs, the stack grows downwards, so
|
|
|
|
subtracting from the stack pointer increases the size of the stack.)
|
|
|
|
|
|
|
|
The @code{.setfp} (@pxref{arm_setfp,,.setfp pseudo op}) pseudo op
|
|
|
|
indicates the register that contains the frame pointer. The first
|
|
|
|
argument is the register that is set, which is typically @code{fp}.
|
|
|
|
The second argument indicates the register from which the frame
|
|
|
|
pointer takes its value. The third argument, if present, is the value
|
|
|
|
(in decimal) added to the register specified by the second argument to
|
|
|
|
compute the value of the frame pointer. You should not modify the
|
|
|
|
frame pointer in the body of the function.
|
|
|
|
|
|
|
|
If you do not use a frame pointer, then you should not use the
|
|
|
|
@code{.setfp} pseudo op. If you do not use a frame pointer, then you
|
|
|
|
should avoid modifying the stack pointer outside of the function
|
|
|
|
prologue. Otherwise, the run-time library will be unable to find
|
|
|
|
saved registers when it is unwinding the stack.
|
|
|
|
|
|
|
|
The pseudo ops described above are sufficient for writing assembly
|
|
|
|
code that calls functions which may throw exceptions. If you need to
|
|
|
|
know more about the object-file format used to represent unwind
|
|
|
|
information, you may consult the @cite{Exception Handling ABI for the
|
|
|
|
ARM Architecture} available from @uref{http://infocenter.arm.com}.
|