Asm
This is aimed at implementing an inline assembler.
Currently, it provides the following:
is_int64macro that can be used inwhenclauses to judge that a value is within INT64.max_intis the constant value of maxium of INT64.min_intis the constant value of minimum of INT64.max_uintis the constant value of maxium of UINT64.min_uintis the constant value of minimum of UINT64.
BigNum module is also provided. This module is used for passing an integer by BigNum from/to NIF.
Installation
The package can be installed
by adding asm to your list of dependencies in mix.exs:
def deps do
[
{:asm, "~> 0.0.9"}
]
endUsage
defmodule Foo do
require Asm
import Asm
def add(a, b) when is_int64(a) and is_int64(b) do
a + b
end
endDocumentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/asm.