Skip to content

Commit 715b6bd

Browse files
bschommerxavierleroy
authored andcommitted
ARM: Print more eabi attributes in generated .s files
Emit the eabi attributes: * `Tag_ABI_FP_denormal` for subnormal support * `Tag_ABI_align_needed` to mark that one needs calls alignment * `Tag_ABI_align_preserved` to mark that the alignment is preserved * `Tag_ABI_enum_size` for the correct enum size * `Tag_ABI_PCS_wchar_t` for the correct `wchar_t` size.
1 parent b5c68c7 commit 715b6bd

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎arm/TargetPrinter.ml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,12 @@ struct
584584
(match Configuration.abi with
585585
| "hardfloat" -> 1
586586
| _ -> 0);
587+
fprintf oc " .eabi_attribute Tag_ABI_FP_denormal, 1\n"; (* allow subnormal numbers *)
588+
fprintf oc " .eabi_attribute Tag_ABI_FP_number_model, 3\n"; (* uses all the IEEE econdings *)
589+
fprintf oc " .eabi_attribute Tag_ABI_align_needed, 1\n"; (* calls depend on alignment *)
590+
fprintf oc " .eabi_attribute Tag_ABI_align_preserved, 1\n"; (* calls preserve alignment *)
591+
fprintf oc " .eabi_attribute Tag_ABI_enum_size, 2\n"; (* enums are 32-bit *)
592+
fprintf oc " .eabi_attribute Tag_ABI_PCS_wchar_t, 4\n"; (* size of wchar_t is 4 *)
587593
(* We must print that we use the idiv arch extension if we are either:
588594
* armv7a and the midiv option is set
589595
* armv7r and the midiv option is set but we are not in thumb mode *)

0 commit comments

Comments
 (0)