当前位置:   article > 正文

gcc针对CPU类型aarch64和arm编译选项区别_-mtls-dialect=trad

-mtls-dialect=trad

1、CPU为aarch64

  1. https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc/AArch64-Options.html#AArch64-Options
  2. 3.18.1 AArch64 Options
  3. These options are defined for AArch64 implementations:
  4. -mabi=name
  5. Generate code for the specified data model. Permissible values are ‘ilp32for SysV-like data model where int, long int and pointers are 32 bits, and ‘lp64for SysV-like data model where int is 32 bits, but long int and pointers are 64 bits.
  6. The default depends on the specific target configuration. Note that the LP64 and ILP32 ABIs are not link-compatible; you must compile your entire program with the same ABI, and link with a compatible set of libraries.
  7. -mbig-endian
  8. Generate big-endian code. This is the default when GCC is configured for an ‘aarch64_be-*-*’ target.
  9. -mgeneral-regs-only
  10. Generate code which uses only the general-purpose registers. This will prevent the compiler from using floating-point and Advanced SIMD registers but will not impose any restrictions on the assembler.
  11. -mlittle-endian
  12. Generate little-endian code. This is the default when GCC is configured for an ‘aarch64-*-*’ but not an ‘aarch64_be-*-*’ target.
  13. -mcmodel=tiny
  14. Generate code for the tiny code model. The program and its statically defined symbols must be within 1MB of each other. Programs can be statically or dynamically linked.
  15. -mcmodel=small
  16. Generate code for the small code model. The program and its statically defined symbols must be within 4GB of each other. Programs can be statically or dynamically linked. This is the default code model.
  17. -mcmodel=large
  18. Generate code for the large code model. This makes no assumptions about addresses and sizes of sections. Programs can be statically linked only.
  19. -mstrict-align
  20. Avoid generating memory accesses that may not be aligned on a natural object boundary as described in the architecture specification.
  21. -momit-leaf-frame-pointer
  22. -mno-omit-leaf-frame-pointer
  23. Omit or keep the frame pointer in leaf functions. The former behavior is the default.
  24. -mtls-dialect=desc
  25. Use TLS descriptors as the thread-local storage mechanism for dynamic accesses of TLS variables. This is the default.
  26. -mtls-dialect=traditional
  27. Use traditional TLS as the thread-local storage mechanism for dynamic accesses of TLS variables.
  28. -mtls-size=size
  29. Specify bit size of immediate TLS offsets. Valid values are 12, 24, 32, 48. This option requires binutils 2.26 or newer.
  30. -mfix-cortex-a53-835769
  31. -mno-fix-cortex-a53-835769
  32. Enable or disable the workaround for the ARM Cortex-A53 erratum number 835769. This involves inserting a NOP instruction between memory instructions and 64-bit integer multiply-accumulate instructions.
  33. -mfix-cortex-a53-843419
  34. -mno-fix-cortex-a53-843419
  35. Enable or disable the workaround for the ARM Cortex-A53 erratum number 843419. This erratum workaround is made at link time and this will only pass the corresponding flag to the linker.
  36. -mlow-precision-recip-sqrt
  37. -mno-low-precision-recip-sqrt
  38. Enable or disable the reciprocal square root approximation. This option only has an effect if -ffast-math or -funsafe-math-optimizations is used as well. Enabling this reduces precision of reciprocal square root results to about 16 bits for single precision and to 32 bits for double precision.
  39. -mlow-precision-sqrt
  40. -mno-low-precision-sqrt
  41. Enable or disable the square root approximation. This option only has an effect if -ffast-math or -funsafe-math-optimizations is used as well. Enabling this reduces precision of square root results to about 16 bits for single precision and to 32 bits for double precision. If enabled, it implies -mlow-precision-recip-sqrt.
  42. -mlow-precision-div
  43. -mno-low-precision-div
  44. Enable or disable the division approximation. This option only has an effect if -ffast-math or -funsafe-math-optimizations is used as well. Enabling this reduces precision of division results to about 16 bits for single precision and to 32 bits for double precision.
  45. -march=name
  46. Specify the name of the target architecture and, optionally, one or more feature modifiers. This option has the form -march=arch{+[no]feature}*.
  47. The permissible values for arch are ‘armv8-a’, ‘armv8.1-a’, ‘armv8.2-a’, ‘armv8.3-a’ or native.
  48. The value ‘armv8.3-a’ implies ‘armv8.2-a’ and enables compiler support for the ARMv8.3-A architecture extensions.
  49. The value ‘armv8.2-a’ implies ‘armv8.1-a’ and enables compiler support for the ARMv8.2-A architecture extensions.
  50. The value ‘armv8.1-a’ implies ‘armv8-a’ and enables compiler support for the ARMv8.1-A architecture extension. In particular, it enables the ‘+crc’ and+lse’ features.
  51. The valuenativeis available on native AArch64 GNU/Linux and causes the compiler to pick the architecture of the host system. This option has no effect if the compiler is unable to recognize the architecture of the host system,
  52. The permissible values for feature are listed in the sub-section on -march and -mcpu Feature Modifiers. Where conflicting feature modifiers are specified, the right-most feature is used.
  53. GCC uses name to determine what kind of instructions it can emit when generating assembly code. If -march is specified without either of -mtune or -mcpu also being specified, the code is tuned to perform well across a range of target processors implementing the target architecture.
  54. -mtune=name
  55. Specify the name of the target processor for which GCC should tune the performance of the code. Permissible values for this option are: ‘generic’, ‘cortex-a35’, ‘cortex-a53’, ‘cortex-a57’, ‘cortex-a72’, ‘cortex-a73’, ‘exynos-m1’, ‘falkor’, ‘qdf24xx’, ‘xgene1’, ‘vulcan’, ‘thunderx’, ‘thunderxt88’, ‘thunderxt88p1’, ‘thunderxt81’, ‘thunderxt83’, ‘thunderx2t99’, ‘cortex-a57.cortex-a53’, ‘cortex-a72.cortex-a53’, ‘cortex-a73.cortex-a35’, ‘cortex-a73.cortex-a53’, ‘native’.
  56. The values ‘cortex-a57.cortex-a53’, ‘cortex-a72.cortex-a53’, ‘cortex-a73.cortex-a35’, ‘cortex-a73.cortex-a53’ specify that GCC should tune for a big.LITTLE system.
  57. Additionally on native AArch64 GNU/Linux systems the valuenative’ tunes performance to the host system. This option has no effect if the compiler is unable to recognize the processor of the host system.
  58. Where none of -mtune=, -mcpu= or -march= are specified, the code is tuned to perform well across a range of target processors.
  59. This option cannot be suffixed by feature modifiers.
  60. -mcpu=name
  61. Specify the name of the target processor, optionally suffixed by one or more feature modifiers. This option has the form -mcpu=cpu{+[no]feature}*, where the permissible values for cpu are the same as those available for -mtune. The permissible values for feature are documented in the sub-section on -march and -mcpu Feature Modifiers. Where conflicting feature modifiers are specified, the right-most feature is used.
  62. GCC uses name to determine what kind of instructions it can emit when generating assembly code (as if by -march) and to determine the target processor for which to tune for performance (as if by -mtune). Where this option is used in conjunction with -march or -mtune, those options take precedence over the appropriate part of this option.
  63. -moverride=string
  64. Override tuning decisions made by the back-end in response to a -mtune= switch. The syntax, semantics, and accepted values for string in this option are not guaranteed to be consistent across releases.
  65. This option is only intended to be useful when developing GCC.
  66. -mpc-relative-literal-loads
  67. Enable PC-relative literal loads. With this option literal pools are accessed using a single instruction and emitted after each function. This limits the maximum size of functions to 1MB. This is enabled by default for -mcmodel=tiny.
  68. -msign-return-address=scope
  69. Select the function scope on which return address signing will be applied. Permissible values are ‘none’, which disables return address signing, ‘non-leaf’, which enables pointer signing for functions which are not leaf functions, andall’, which enables pointer signing for all functions. The default value is ‘none’.
  70. 3.18.1.1 -march and -mcpu Feature Modifiers
  71. Feature modifiers used with -march and -mcpu can be any of the following and their inverses nofeature:
  72. ‘crc’
  73. Enable CRC extension. This is on by default for -march=armv8.1-a.
  74. ‘crypto’
  75. Enable Crypto extension. This also enables Advanced SIMD and floating-point instructions.
  76. ‘fp’
  77. Enable floating-point instructions. This is on by default for all possible values for options -march and -mcpu.
  78. ‘simd’
  79. Enable Advanced SIMD instructions. This also enables floating-point instructions. This is on by default for all possible values for options -march and -mcpu.
  80. ‘lse’
  81. Enable Large System Extension instructions. This is on by default for -march=armv8.1-a.
  82. ‘fp16
  83. Enable FP16 extension. This also enables floating-point instructions.
  84. Feature crypto implies simd, which implies fp. Conversely, nofp implies nosimd, which implies nocrypto.

2、CPU为ARM

  1. https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc/ARM-Options.html#ARM-Options
  2. 3.18.4 ARM Options
  3. These ‘-m’ options are defined for the ARM port:
  4. -mabi=name
  5. Generate code for the specified ABI. Permissible values are: ‘apcs-gnu’, ‘atpcs’, ‘aapcs’, ‘aapcs-linux’ and ‘iwmmxt’.
  6. -mapcs-frame
  7. Generate a stack frame that is compliant with the ARM Procedure Call Standard for all functions, even if this is not strictly necessary for correct execution of the code. Specifying -fomit-frame-pointer with this option causes the stack frames not to be generated for leaf functions. The default is -mno-apcs-frame. This option is deprecated.
  8. -mapcs
  9. This is a synonym for -mapcs-frame and is deprecated.
  10. -mthumb-interwork
  11. Generate code that supports calling between the ARM and Thumb instruction sets. Without this option, on pre-v5 architectures, the two instruction sets cannot be reliably used inside one program. The default is -mno-thumb-interwork, since slightly larger code is generated when -mthumb-interwork is specified. In AAPCS configurations this option is meaningless.
  12. -mno-sched-prolog
  13. Prevent the reordering of instructions in the function prologue, or the merging of those instruction with the instructions in the function’s body. This means that all functions start with a recognizable set of instructions (or in fact one of a choice from a small set of different function prologues), and this information can be used to locate the start of functions inside an executable piece of code. The default is -msched-prolog.
  14. -mfloat-abi=name
  15. Specifies which floating-point ABI to use. Permissible values are: ‘soft’, ‘softfp’ and ‘hard’.
  16. Specifying ‘soft’ causes GCC to generate output containing library calls for floating-point operations. ‘softfp’ allows the generation of code using hardware floating-point instructions, but still uses the soft-float calling conventions. ‘hard’ allows generation of floating-point instructions and uses FPU-specific calling conventions.
  17. The default depends on the specific target configuration. Note that the hard-float and soft-float ABIs are not link-compatible; you must compile your entire program with the same ABI, and link with a compatible set of libraries.
  18. -mlittle-endian
  19. Generate code for a processor running in little-endian mode. This is the default for all standard configurations.
  20. -mbig-endian
  21. Generate code for a processor running in big-endian mode; the default is to compile code for a little-endian processor.
  22. -march=name
  23. This specifies the name of the target ARM architecture. GCC uses this name to determine what kind of instructions it can emit when generating assembly code. This option can be used in conjunction with or instead of the -mcpu= option. Permissible names are: ‘armv2’, ‘armv2a’, ‘armv3’, ‘armv3m’, ‘armv4’, ‘armv4t’, ‘armv5’, ‘armv5e’, ‘armv5t’, ‘armv5te’, ‘armv6’, ‘armv6-m’, ‘armv6j’, ‘armv6k’, ‘armv6kz’, ‘armv6s-m’, ‘armv6t2’, ‘armv6z’, ‘armv6zk’, ‘armv7’, ‘armv7-a’, ‘armv7-m’, ‘armv7-r’, ‘armv7e-m’, ‘armv7ve’, ‘armv8-a’, ‘armv8-a+crc’, ‘armv8.1-a’, ‘armv8.1-a+crc’, ‘armv8-m.base’, ‘armv8-m.main’, ‘armv8-m.main+dsp’, ‘iwmmxt’, ‘iwmmxt2’.
  24. Architecture revisions older than ‘armv4t’ are deprecated.
  25. -march=armv6s-m is the ‘armv6-m’ architecture with support for the (now mandatory) SVC instruction.
  26. -march=armv6zk is an alias for ‘armv6kz’, existing for backwards compatibility.
  27. -march=armv7ve is the ‘armv7-a’ architecture with virtualization extensions.
  28. -march=armv8-a+crc enables code generation for the ARMv8-A architecture together with the optional CRC32 extensions.
  29. -march=armv8.1-a enables compiler support for the ARMv8.1-A architecture. This also enables the features provided by -march=armv8-a+crc.
  30. -march=armv8.2-a enables compiler support for the ARMv8.2-A architecture. This also enables the features provided by -march=armv8.1-a.
  31. -march=armv8.2-a+fp16 enables compiler support for the ARMv8.2-A architecture with the optional FP16 instructions extension. This also enables the features provided by -march=armv8.1-a and implies -mfp16-format=ieee.
  32. -march=native causes the compiler to auto-detect the architecture of the build computer. At present, this feature is only supported on GNU/Linux, and not all architectures are recognized. If the auto-detect is unsuccessful the option has no effect.
  33. -mtune=name
  34. This option specifies the name of the target ARM processor for which GCC should tune the performance of the code. For some ARM implementations better performance can be obtained by using this option. Permissible names are: ‘arm2’, ‘arm250’, ‘arm3’, ‘arm6’, ‘arm60’, ‘arm600’, ‘arm610’, ‘arm620’, ‘arm7’, ‘arm7m’, ‘arm7d’, ‘arm7dm’, ‘arm7di’, ‘arm7dmi’, ‘arm70’, ‘arm700’, ‘arm700i’, ‘arm710’, ‘arm710c’, ‘arm7100’, ‘arm720’, ‘arm7500’, ‘arm7500fe’, ‘arm7tdmi’, ‘arm7tdmi-s’, ‘arm710t’, ‘arm720t’, ‘arm740t’, ‘strongarm’, ‘strongarm110’, ‘strongarm1100’, ‘strongarm1110’, ‘arm8’, ‘arm810’, ‘arm9’, ‘arm9e’, ‘arm920’, ‘arm920t’, ‘arm922t’, ‘arm946e-s’, ‘arm966e-s’, ‘arm968e-s’, ‘arm926ej-s’, ‘arm940t’, ‘arm9tdmi’, ‘arm10tdmi’, ‘arm1020t’, ‘arm1026ej-s’, ‘arm10e’, ‘arm1020e’, ‘arm1022e’, ‘arm1136j-s’, ‘arm1136jf-s’, ‘mpcore’, ‘mpcorenovfp’, ‘arm1156t2-s’, ‘arm1156t2f-s’, ‘arm1176jz-s’, ‘arm1176jzf-s’, ‘generic-armv7-a’, ‘cortex-a5’, ‘cortex-a7’, ‘cortex-a8’, ‘cortex-a9’, ‘cortex-a12’, ‘cortex-a15’, ‘cortex-a17’, ‘cortex-a32’, ‘cortex-a35’, ‘cortex-a53’, ‘cortex-a57’, ‘cortex-a72’, ‘cortex-a73’, ‘cortex-r4’, ‘cortex-r4f’, ‘cortex-r5’, ‘cortex-r7’, ‘cortex-r8’, ‘cortex-m33’, ‘cortex-m23’, ‘cortex-m7’, ‘cortex-m4’, ‘cortex-m3’, ‘cortex-m1’, ‘cortex-m0’, ‘cortex-m0plus’, ‘cortex-m1.small-multiply’, ‘cortex-m0.small-multiply’, ‘cortex-m0plus.small-multiply’, ‘exynos-m1’, ‘marvell-pj4’, ‘xscale’, ‘iwmmxt’, ‘iwmmxt2’, ‘ep9312’, ‘fa526’, ‘fa626’, ‘fa606te’, ‘fa626te’, ‘fmp626’, ‘fa726te’, ‘xgene1’.
  35. Additionally, this option can specify that GCC should tune the performance of the code for a big.LITTLE system. Permissible names are: ‘cortex-a15.cortex-a7’, ‘cortex-a17.cortex-a7’, ‘cortex-a57.cortex-a53’, ‘cortex-a72.cortex-a53’, ‘cortex-a72.cortex-a35’, ‘cortex-a73.cortex-a53’.
  36. -mtune=generic-arch specifies that GCC should tune the performance for a blend of processors within architecture arch. The aim is to generate code that run well on the current most popular processors, balancing between optimizations that benefit some CPUs in the range, and avoiding performance pitfalls of other CPUs. The effects of this option may change in future GCC versions as CPU models come and go.
  37. -mtune=native causes the compiler to auto-detect the CPU of the build computer. At present, this feature is only supported on GNU/Linux, and not all architectures are recognized. If the auto-detect is unsuccessful the option has no effect.
  38. -mcpu=name
  39. This specifies the name of the target ARM processor. GCC uses this name to derive the name of the target ARM architecture (as if specified by -march) and the ARM processor type for which to tune for performance (as if specified by -mtune). Where this option is used in conjunction with -march or -mtune, those options take precedence over the appropriate part of this option.
  40. Permissible names for this option are the same as those for -mtune.
  41. -mcpu=generic-arch is also permissible, and is equivalent to -march=arch -mtune=generic-arch. See -mtune for more information.
  42. -mcpu=native causes the compiler to auto-detect the CPU of the build computer. At present, this feature is only supported on GNU/Linux, and not all architectures are recognized. If the auto-detect is unsuccessful the option has no effect.
  43. -mfpu=name
  44. This specifies what floating-point hardware (or hardware emulation) is available on the target. Permissible names are: ‘vfpv2’, ‘vfpv3’, ‘vfpv3-fp16’, ‘vfpv3-d16’, ‘vfpv3-d16-fp16’, ‘vfpv3xd’, ‘vfpv3xd-fp16’, ‘neon-vfpv3’, ‘neon-fp16’, ‘vfpv4’, ‘vfpv4-d16’, ‘fpv4-sp-d16’, ‘neon-vfpv4’, ‘fpv5-d16’, ‘fpv5-sp-d16’, ‘fp-armv8’, ‘neon-fp-armv8and ‘crypto-neon-fp-armv8’. Note that ‘neon’ is an alias for ‘neon-vfpv3and ‘vfp’ is an alias for ‘vfpv2’.
  45. If -msoft-float is specified this specifies the format of floating-point values.
  46. If the selected floating-point hardware includes the NEON extension (e.g. -mfpu=‘neon’), note that floating-point operations are not generated by GCC’s auto-vectorization pass unless -funsafe-math-optimizations is also specified. This is because NEON hardware does not fully implement the IEEE 754 standard for floating-point arithmetic (in particular denormal values are treated as zero), so the use of NEON instructions may lead to a loss of precision.
  47. You can also set the fpu name at function level by using the target("fpu=") function attributes (see ARM Function Attributes) or pragmas (see Function Specific Option Pragmas).
  48. -mfp16-format=name
  49. Specify the format of the __fp16 half-precision floating-point type. Permissible names are ‘none’, ‘ieee’, and ‘alternative’; the default is ‘none’, in which case the __fp16 type is not defined. See Half-Precision, for more information.
  50. -mstructure-size-boundary=n
  51. The sizes of all structures and unions are rounded up to a multiple of the number of bits set by this option. Permissible values are 8, 32 and 64. The default value varies for different toolchains. For the COFF targeted toolchain the default value is 8. A value of 64 is only allowed if the underlying ABI supports it.
  52. Specifying a larger number can produce faster, more efficient code, but can also increase the size of the program. Different values are potentially incompatible. Code compiled with one value cannot necessarily expect to work with code or libraries compiled with another value, if they exchange information using structures or unions.
  53. -mabort-on-noreturn
  54. Generate a call to the function abort at the end of a noreturn function. It is executed if the function tries to return.
  55. -mlong-calls
  56. -mno-long-calls
  57. Tells the compiler to perform function calls by first loading the address of the function into a register and then performing a subroutine call on this register. This switch is needed if the target function lies outside of the 64-megabyte addressing range of the offset-based version of subroutine call instruction.
  58. Even if this switch is enabled, not all function calls are turned into long calls. The heuristic is that static functions, functions that have the short_call attribute, functions that are inside the scope of a #pragma no_long_calls directive, and functions whose definitions have already been compiled within the current compilation unit are not turned into long calls. The exceptions to this rule are that weak function definitions, functions with the long_call attribute or the section attribute, and functions that are within the scope of a #pragma long_calls directive are always turned into long calls.
  59. This feature is not enabled by default. Specifying -mno-long-calls restores the default behavior, as does placing the function calls within the scope of a #pragma long_calls_off directive. Note these switches have no effect on how the compiler generates code to handle function calls via function pointers.
  60. -msingle-pic-base
  61. Treat the register used for PIC addressing as read-only, rather than loading it in the prologue for each function. The runtime system is responsible for initializing this register with an appropriate value before execution begins.
  62. -mpic-register=reg
  63. Specify the register to be used for PIC addressing. For standard PIC base case, the default is any suitable register determined by compiler. For single PIC base case, the default is ‘R9if target is EABI based or stack-checking is enabled, otherwise the default is ‘R10’.
  64. -mpic-data-is-text-relative
  65. Assume that the displacement between the text and data segments is fixed at static link time. This permits using PC-relative addressing operations to access data known to be in the data segment. For non-VxWorks RTP targets, this option is enabled by default. When disabled on such targets, it will enable -msingle-pic-base by default.
  66. -mpoke-function-name
  67. Write the name of each function into the text section, directly preceding the function prologue. The generated code is similar to this:
  68. t0
  69. .ascii "arm_poke_function_name", 0
  70. .align
  71. t1
  72. .word 0xff000000 + (t1 - t0)
  73. arm_poke_function_name
  74. mov ip, sp
  75. stmfd sp!, {fp, ip, lr, pc}
  76. sub fp, ip, #4
  77. When performing a stack backtrace, code can inspect the value of pc stored at fp + 0. If the trace function then looks at location pc - 12 and the top 8 bits are set, then we know that there is a function name embedded immediately preceding this location and has length ((pc[-3]) & 0xff000000).
  78. -mthumb
  79. -marm
  80. Select between generating code that executes in ARM and Thumb states. The default for most configurations is to generate code that executes in ARM state, but the default can be changed by configuring GCC with the --with-mode=state configure option.
  81. You can also override the ARM and Thumb mode for each function by using the target("thumb") and target("arm") function attributes (see ARM Function Attributes) or pragmas (see Function Specific Option Pragmas).
  82. -mtpcs-frame
  83. Generate a stack frame that is compliant with the Thumb Procedure Call Standard for all non-leaf functions. (A leaf function is one that does not call any other functions.) The default is -mno-tpcs-frame.
  84. -mtpcs-leaf-frame
  85. Generate a stack frame that is compliant with the Thumb Procedure Call Standard for all leaf functions. (A leaf function is one that does not call any other functions.) The default is -mno-apcs-leaf-frame.
  86. -mcallee-super-interworking
  87. Gives all externally visible functions in the file being compiled an ARM instruction set header which switches to Thumb mode before executing the rest of the function. This allows these functions to be called from non-interworking code. This option is not valid in AAPCS configurations because interworking is enabled by default.
  88. -mcaller-super-interworking
  89. Allows calls via function pointers (including virtual functions) to execute correctly regardless of whether the target code has been compiled for interworking or not. There is a small overhead in the cost of executing a function pointer if this option is enabled. This option is not valid in AAPCS configurations because interworking is enabled by default.
  90. -mtp=name
  91. Specify the access model for the thread local storage pointer. The valid models are ‘soft’, which generates calls to __aeabi_read_tp, ‘cp15’, which fetches the thread pointer from cp15 directly (supported in the arm6k architecture), and ‘auto’, which uses the best available method for the selected processor. The default setting is ‘auto’.
  92. -mtls-dialect=dialect
  93. Specify the dialect to use for accessing thread local storage. Two dialects are supported—‘gnu’ and ‘gnu2’. The ‘gnu’ dialect selects the original GNU scheme for supporting local and global dynamic TLS models. The ‘gnu2’ dialect selects the GNU descriptor scheme, which provides better performance for shared libraries. The GNU descriptor scheme is compatible with the original scheme, but does require new assembler, linker and library support. Initial and local exec TLS models are unaffected by this option and always use the original scheme.
  94. -mword-relocations
  95. Only generate absolute relocations on word-sized values (i.e. R_ARM_ABS32). This is enabled by default on targets (uClinux, SymbianOS) where the runtime loader imposes this restriction, and when -fpic or -fPIC is specified.
  96. -mfix-cortex-m3-ldrd
  97. Some Cortex-M3 cores can cause data corruption when ldrd instructions with overlapping destination and base registers are used. This option avoids generating these instructions. This option is enabled by default when -mcpu=cortex-m3 is specified.
  98. -munaligned-access
  99. -mno-unaligned-access
  100. Enables (or disables) reading and writing of 16- and 32- bit values from addresses that are not 16- or 32- bit aligned. By default unaligned access is disabled for all pre-ARMv6, all ARMv6-M and for ARMv8-M Baseline architectures, and enabled for all other architectures. If unaligned access is not enabled then words in packed data structures are accessed a byte at a time.
  101. The ARM attribute Tag_CPU_unaligned_access is set in the generated object file to either true or false, depending upon the setting of this option. If unaligned access is enabled then the preprocessor symbol __ARM_FEATURE_UNALIGNED is also defined.
  102. -mneon-for-64bits
  103. Enables using Neon to handle scalar 64-bits operations. This is disabled by default since the cost of moving data from core registers to Neon is high.
  104. -mslow-flash-data
  105. Assume loading data from flash is slower than fetching instruction. Therefore literal load is minimized for better performance. This option is only supported when compiling for ARMv7 M-profile and off by default.
  106. -masm-syntax-unified
  107. Assume inline assembler is using unified asm syntax. The default is currently off which implies divided syntax. This option has no impact on Thumb2. However, this may change in future releases of GCC. Divided syntax should be considered deprecated.
  108. -mrestrict-it
  109. Restricts generation of IT blocks to conform to the rules of ARMv8. IT blocks can only contain a single 16-bit instruction from a select set of instructions. This option is on by default for ARMv8 Thumb mode.
  110. -mprint-tune-info
  111. Print CPU tuning information as comment in assembler file. This is an option used only for regression testing of the compiler and not intended for ordinary use in compiling code. This option is disabled by default.
  112. -mpure-code
  113. Do not allow constant data to be placed in code sections. Additionally, when compiling for ELF object format give all text sections the ELF processor-specific section attribute SHF_ARM_PURECODE. This option is only available when generating non-pic code for ARMv7-M targets.
  114. -mcmse
  115. Generate secure code as per the "ARMv8-M Security Extensions: Requirements on Development Tools Engineering Specification", which can be found on http://infocenter.arm.com/help/topic/com.arm.doc.ecm0359818/ECM0359818_armv8m_security_extensions_reqs_on_dev_tools_1_0.pdf.

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/104791
推荐阅读
相关标签
  

闽ICP备14008679号