Skip to content

Add builtin functions for unary and binary Wasm operators #33

@SpaceManiac

Description

@SpaceManiac

Operations:

  • integer types
    • clz count leading zeroes
    • ctz count trailing zeroes
    • popcnt population count
    • rotl and rotr bitwise rotation
  • floating-point types
    • abs absolute value
    • ceil ceiling
    • floor floor
    • trunc
    • nearest
    • sqrt
    • min minimum (two args)
    • max maximum (two args)
    • copysign (two args)

Syntax possibilities:

  • Method: foo.count_leading_zeroes()
  • Global: count_leading_zeroes(foo)

Or maybe we should adopt a uniform function call syntax that makes the difference not matter?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlanguageRelating to language parser and compiler

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions