Module Arm64_ast.Ast
Typed DSL for AArch64 assembly instructions.
The same physical register has different names in the assembly encoding of instructions. The name determines the type of data the instruction operates on.
module Element_to_GP : sig ... endConstraint tying vector element width to GP register width for INS and UMOV.
module Smov_element_to_GP : sig ... endConstraint tying vector element width to GP register width for SMOV.
module Neon_reg_name : sig ... endmodule GP_reg_name : sig ... endmodule Reg_name : sig ... endmodule Reg : sig ... endmodule Symbol : sig ... endSymbol references and relocations.
module Float_cond : sig ... endmodule Cond : sig ... endmodule Branch_cond : sig ... endCondition codes for B.cond instruction. Unifies integer and floating-point conditions - architecturally it's the same instruction, but we preserve the distinction for semantic clarity.
module Simd_int_cmp : sig ... endCondition codes for AdvSIMD integer compare instructions. These map to CMEQ, CMGE, CMGT, CMLE, CMLT, CMHI, CMHS instructions. Unlike Cond.t, this excludes conditions that don't have corresponding SIMD compare instructions (NE, CS, CC, MI, PL, VS, VC, LS).
module Immediate : sig ... endImmediates used in instruction operands.
module Addressing_offset : sig ... endOffsets used in addressing modes.
module Addressing_mode : sig ... endmodule Operand : sig ... endmodule Rounding_mode : sig ... endmodule Memory_barrier : sig ... endmodule Widen : sig ... endWitness types for widening vector operations. Widening: element count stays the same, element size doubles. 8B->8H, 4H->4S, 2S->2D
module Narrow : sig ... endWitness types for narrowing vector operations. Narrowing: element count stays the same, element size halves. 8H->8B, 4S->4H, 2D->2S
module Narrow2 : sig ... endWitness types for narrowing to upper half (XTN2, etc). 16B->8H, 8H->4S, 4S->2D
module Widen_mul : sig ... endWitness types for widening multiply (SMULL, UMULL). Sources are narrow, dest is wide. 8B,8B->8H, 4H,4H->4S, 2S,2S->2D
module Widen_mul2 : sig ... endWitness types for widening multiply upper half (SMULL2, UMULL2). Sources are 128-bit, dest is wide. 16B,16B->8H, 8H,8H->4S, 4S,4S->2D
module LDP_STP_width : sig ... endWitness types for LDP/STP register width. Both registers in a pair must be the same width class.
module Instruction_name : sig ... endThe intention is that none of these are aliases. Expansions of instructions that are aliases are done by the "ins_*" functions below.
module Instruction : sig ... endmodule DSL : sig ... end