Next: , Previous: , Up: Instruction Set   [Contents][Index]

#### 9.3.7.14 Comparison Instructions

Instruction: u64=? s12:a s12:b

Set the comparison result to EQUAL if the `u64` values a and b are the same, or `NONE` otherwise.

Instruction: u64<? s12:a s12:b

Set the comparison result to `LESS_THAN` if the `u64` value a is less than the `u64` value b are the same, or `NONE` otherwise.

Instruction: s64<? s12:a s12:b

Set the comparison result to `LESS_THAN` if the `s64` value a is less than the `s64` value b are the same, or `NONE` otherwise.

Instruction: s64-imm=? s12:a z12:b

Set the comparison result to EQUAL if the `s64` value a is equal to the immediate `s64` value b, or `NONE` otherwise.

Instruction: u64-imm<? s12:a c12:b

Set the comparison result to `LESS_THAN` if the `u64` value a is less than the immediate `u64` value b, or `NONE` otherwise.

Instruction: imm-u64<? s12:a s12:b

Set the comparison result to `LESS_THAN` if the `u64` immediate b is less than the `u64` value a, or `NONE` otherwise.

Instruction: s64-imm<? s12:a z12:b

Set the comparison result to `LESS_THAN` if the `s64` value a is less than the immediate `s64` value b, or `NONE` otherwise.

Instruction: imm-s64<? s12:a z12:b

Set the comparison result to `LESS_THAN` if the `s64` immediate b is less than the `s64` value a, or `NONE` otherwise.

Instruction: f64=? s12:a s12:b

Set the comparison result to EQUAL if the f64 value a is equal to the f64 value b, or `NONE` otherwise.

Instruction: f64<? s12:a s12:b

Set the comparison result to `LESS_THAN` if the f64 value a is less than the f64 value b, `NONE` if a is greater than or equal to b, or `INVALID` otherwise.

Instruction: =? s12:a s12:b

Set the comparison result to EQUAL if the SCM values a and b are numerically equal, in the sense of the Scheme `=` operator. Set to `NONE` otherwise.

Instruction: heap-numbers-equal? s12:a s12:b

Set the comparison result to EQUAL if the SCM values a and b are numerically equal, in the sense of Scheme `=`. Set to `NONE` otherwise. It is known that both a and b are heap numbers.

Instruction: <? s12:a s12:b

Set the comparison result to `LESS_THAN` if the SCM value a is less than the SCM value b, `NONE` if a is greater than or equal to b, or `INVALID` otherwise.

Set the comparison result to EQUAL if the result of a bitwise `and` between the bits of `scm` value a and the immediate mask is tag, or `NONE` otherwise.

Set the comparison result to EQUAL if the result of a bitwise `and` between the first word of `scm` value a and the immediate mask is tag, or `NONE` otherwise.

Instruction: eq? s12:a s12:b

Set the comparison result to EQUAL if the SCM values a and b are `eq?`, or `NONE` otherwise.

There are a set of macro-instructions for `immediate-tag=?` and `heap-tag=?` as well that abstract away the precise type tag values. See The SCM Type in Guile.

Macro Instruction: fixnum? x
Macro Instruction: heap-object? x
Macro Instruction: char? x
Macro Instruction: eq-false? x
Macro Instruction: eq-nil? x
Macro Instruction: eq-null? x
Macro Instruction: eq-true? x
Macro Instruction: unspecified? x
Macro Instruction: undefined? x
Macro Instruction: eof-object? x
Macro Instruction: null? x
Macro Instruction: false? x
Macro Instruction: nil? x

Emit a `immediate-tag=?` instruction that will set the comparison result to `EQUAL` if x would pass the corresponding predicate (e.g. `null?`), or `NONE` otherwise.

Macro Instruction: pair? x
Macro Instruction: struct? x
Macro Instruction: symbol? x
Macro Instruction: variable? x
Macro Instruction: vector? x
Macro Instruction: immutable-vector? x
Macro Instruction: mutable-vector? x
Macro Instruction: weak-vector? x
Macro Instruction: string? x
Macro Instruction: heap-number? x
Macro Instruction: hash-table? x
Macro Instruction: pointer? x
Macro Instruction: fluid? x
Macro Instruction: stringbuf? x
Macro Instruction: dynamic-state? x
Macro Instruction: frame? x
Macro Instruction: keyword? x
Macro Instruction: atomic-box? x
Macro Instruction: syntax? x
Macro Instruction: program? x
Macro Instruction: vm-continuation? x
Macro Instruction: bytevector? x
Macro Instruction: weak-set? x
Macro Instruction: weak-table? x
Macro Instruction: array? x
Macro Instruction: bitvector? x
Macro Instruction: smob? x
Macro Instruction: port? x
Macro Instruction: bignum? x
Macro Instruction: flonum? x
Macro Instruction: compnum? x
Macro Instruction: fracnum? x

Emit a `heap-tag=?` instruction that will set the comparison result to `EQUAL` if x would pass the corresponding predicate (e.g. `null?`), or `NONE` otherwise.

Next: , Previous: , Up: Instruction Set   [Contents][Index]