13.8 Machine Code Insertions
This Reference Manual output has not been verified, and may contain omissions or errors. Report any problems on the tracking issue
code_statement is only allowed in the
handled_sequence_of_statements of a
subprogram_body. If a
subprogram_body contains any
code_statements, then within this
subprogram_body the only allowed form of
statement is a
code_statement (labeled or not), the only allowed
use_clauses, and no
exception_handler is allowed (
pragmas are allowed as usual).
Name Resolution Rules4
qualified_expression is expected to be of any type.
qualified_expression shall be of a type declared in package System.Machine_Code.
The contents of the library package System.Machine_Code (if provided) are implementation defined. The meaning of
code_statements is implementation defined. [Typically, each
qualified_expression represents a machine instruction or assembly directive.]
An implementation may place restrictions on
code_statements. An implementation is not required to provide package System.Machine_Code.
code_statements are allowed.
Example of a code statement:
M : Mask; procedure Set_Mask with Inline; 14procedure Set_Mask is use System.Machine_Code; -- assume “with System.Machine_Code;” appears somewhere above begin SI_Format'(Code => SSM, B => M'Base_Reg, D => M'Disp); -- Base_Reg and Disp are implementation-defined attributes end Set_Mask;