* 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
|
|
|
@c Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003
|
2001-03-09 07:24:26 +08:00
|
|
|
@c 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
|
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
|
|
|
|
recognized:
|
|
|
|
@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},
|
|
|
|
@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},
|
|
|
|
@code{arm9e},
|
2003-12-30 00:43:37 +08:00
|
|
|
@code{arm926e},
|
|
|
|
@code{arm926ejs},
|
* 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},
|
|
|
|
@code{arm966e-r0},
|
|
|
|
@code{arm966e},
|
|
|
|
@code{arm10t},
|
|
|
|
@code{arm10e},
|
|
|
|
@code{arm1020},
|
|
|
|
@code{arm1020t},
|
2003-12-30 00:43:37 +08:00
|
|
|
@code{arm1020e},
|
|
|
|
@code{arm1026ejs},
|
2003-12-06 09:25:29 +08:00
|
|
|
@code{arm1136js},
|
|
|
|
@code{arm1136jfs},
|
* 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
|
|
|
|
@code{xscale}.
|
|
|
|
The special name @code{all} may be used to allow the
|
|
|
|
assembler to accept instructions valid for any ARM processor.
|
|
|
|
|
|
|
|
In addition to the basic instruction set, the assembler can be told to
|
|
|
|
accept various extension mnemonics that extend the processor using the
|
|
|
|
co-processor instruction space. For example, @code{-mcpu=arm920+maverick}
|
|
|
|
is equivalent to specifying @code{-mcpu=ep9312}. The following extensions
|
|
|
|
are currently supported:
|
|
|
|
@code{+maverick}
|
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}.
|
|
|
|
|
|
|
|
@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
|
* 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 architecture. The following architecture
|
|
|
|
names are recognized:
|
|
|
|
@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},
|
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
|
|
|
|
an instruction which will not execute on the target floating point unit.
|
|
|
|
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},
|
2003-12-06 09:25:29 +08:00
|
|
|
@code{arm1020t},
|
|
|
|
@code{arm1020e},
|
2003-12-10 20:11:26 +08:00
|
|
|
@code{arm1136jfs}
|
* 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
|
2003-12-10 20:11:26 +08:00
|
|
|
@code{maverick}.
|
* 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.
|
|
|
|
|
|
|
|
The default is dependent on the processor selected. For Architecture 5 or
|
|
|
|
later, the default is to assembler for VFP instructions; for earlier
|
|
|
|
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
|
|
|
|
instructions; that is, it should behave as though the file starts with a
|
|
|
|
@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
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
@cindex @code{-mapcs} command line option, ARM
|
2000-08-14 17:02:45 +08:00
|
|
|
@item -mapcs @code{[26|32]}
|
1999-05-03 15:29:11 +08:00
|
|
|
This option specifies that the output generated by the assembler should
|
|
|
|
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
|
|
|
|
This option specifies that the output generated by the assembler should
|
|
|
|
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}.
|
|
|
|
|
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
|
|
|
|
|
|
|
@cindex @code{-moabi} command line option, ARM
|
1999-05-03 15:29:11 +08:00
|
|
|
@item -moabi
|
|
|
|
This indicates that the code should be assembled using the old ARM ELF
|
|
|
|
conventions, based on a beta release release of the ARM-ELF
|
|
|
|
specifications, rather than the default conventions which are based on
|
|
|
|
the final release of the ARM-ELF specifications.
|
2000-04-25 07:57:30 +08:00
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
@end table
|
|
|
|
|
|
|
|
|
|
|
|
@node ARM Syntax
|
|
|
|
@section Syntax
|
|
|
|
@menu
|
|
|
|
* ARM-Chars:: Special Characters
|
|
|
|
* ARM-Regs:: Register Names
|
|
|
|
@end menu
|
|
|
|
|
|
|
|
@node ARM-Chars
|
|
|
|
@subsection Special Characters
|
|
|
|
|
|
|
|
@cindex line comment character, ARM
|
|
|
|
@cindex ARM line comment character
|
2000-01-11 06:22:56 +08:00
|
|
|
The presence of a @samp{@@} on a line indicates the start of a comment
|
|
|
|
that extends to the end of the current line. If a @samp{#} appears as
|
|
|
|
the first character of a line, the whole line is treated as a comment.
|
|
|
|
|
|
|
|
@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.
|
|
|
|
|
|
|
|
@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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@node ARM Directives
|
|
|
|
@section ARM Machine Directives
|
|
|
|
|
|
|
|
@cindex machine directives, ARM
|
|
|
|
@cindex ARM machine directives
|
|
|
|
@table @code
|
|
|
|
|
2000-04-25 07:57:30 +08:00
|
|
|
@cindex @code{align} directive, ARM
|
|
|
|
@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
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
@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
|
|
|
|
|
* 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
|
|
|
@cindex @code{unreq} directive, ARM
|
|
|
|
@item .unreq @var{alias-name}
|
|
|
|
This undefines a register alias which was previously defined using the
|
|
|
|
@code{req} directive. 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.
|
|
|
|
|
1999-05-03 15:29:11 +08:00
|
|
|
@cindex @code{code} directive, ARM
|
2000-08-14 17:02:45 +08:00
|
|
|
@item .code @code{[16|32]}
|
1999-05-03 15:29:11 +08:00
|
|
|
This directive selects the instruction set being generated. The value 16
|
|
|
|
selects Thumb, with the value 32 selecting ARM.
|
|
|
|
|
|
|
|
@cindex @code{thumb} directive, ARM
|
|
|
|
@item .thumb
|
|
|
|
This performs the same action as @var{.code 16}.
|
|
|
|
|
|
|
|
@cindex @code{arm} directive, ARM
|
|
|
|
@item .arm
|
|
|
|
This performs the same action as @var{.code 32}.
|
|
|
|
|
|
|
|
@cindex @code{force_thumb} directive, ARM
|
|
|
|
@item .force_thumb
|
|
|
|
This directive forces the selection of Thumb instructions, even if the
|
|
|
|
target processor does not support those instructions
|
|
|
|
|
|
|
|
@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
|
2000-06-26 01:59:22 +08:00
|
|
|
interworking is not going to be performed. The presence of this
|
|
|
|
directive also implies @code{.thumb}
|
1999-05-03 15:29:11 +08:00
|
|
|
|
1999-07-08 09:49:09 +08:00
|
|
|
@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.
|
|
|
|
|
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
|
|
|
|
|
|
|
@cindex @code{.pool} directive, ARM
|
|
|
|
@item .pool
|
|
|
|
This is a synonym for .ltorg.
|
|
|
|
|
|
|
|
@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
|
|
|
|
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
|
|
|
|
@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
|
|
|
|
@item ADRL
|
|
|
|
@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.
|
|
|
|
|