class

Crystal::Macros::Asm

Inherits Crystal::Macros::ASTNode

An inline assembly expression.

Every assembly node is equivalent to:

asm(
  {{ node.text }} :
  {{ node.outputs.splat }} :
  {{ node.inputs.splat }} :
  {{ node.clobbers.splat }} :
  {% if node.volatile? %} "volatile", {% end %}
  {% if node.alignstack? %} "alignstack", {% end %}
  {% if node.intel? %} "intel", {% end %}
  {% if node.can_throw? %} "unwind", {% end %}
)

Instance methods

alignstack?

Returns whether the assembly expression requires stack alignment code.

Source
can_throw?

Returns whether the assembly expression might unwind the stack.

Source
clobbers

Returns an array of clobbered register names for this assembly expression.

Source
inputs

Returns an array of input operands for this assembly expression.

Source
intel?

Returns true if the template string uses the Intel syntax, false if it uses the AT&T syntax.

Source
outputs

Returns an array of output operands for this assembly expression.

Source
text

Returns the template string for this assembly expression.

Source
volatile?

Returns whether the assembly expression contains side effects that are not listed in #outputs, #inputs, and #clobbers.

Source