ISLE

1 program Added 2026-03-13T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: Instruction Selection Lowering and Encoding
Provenance: commit e508ab1651 · authored 2026-03-13T06:22:40+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

Instruction List (0.25)ISPS (0.21)AWL (0.20)ASSIST (0.19)Quil (0.18)

LLM-contributed programs

Integer Arithmetic Lowering Rules

Provenance: commit e508ab1651 · authored 2026-03-13T06:22:40+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.isle · license: Apache-2.0 · added: 2026-03-13T10:00:00Z
;; ISLE (Instruction Selection Lowering and Encoding) example
;; Demonstrates type declarations, term declarations, and lowering rules

;; Declare external types used in the instruction selector
(type Reg extern)
(type Type extern)
(type InstOutput extern)

;; Declare pure extractors for instruction inputs
(decl pure fits_in_64 (Type) Type)
(decl pure fits_in_32 (Type) Type)

;; Declare arithmetic lowering terms
(decl x64_add (Type Reg Reg) Reg)
(extern constructor x64_add x64_add_impl)

(decl x64_sub (Type Reg Reg) Reg)
(extern constructor x64_sub x64_sub_impl)

(decl x64_imul (Type Reg Reg) Reg)
(extern constructor x64_imul x64_imul_impl)

(decl x64_and (Type Reg Reg) Reg)
(extern constructor x64_and x64_and_impl)

(decl x64_or (Type Reg Reg) Reg)
(extern constructor x64_or x64_or_impl)

(decl x64_xor (Type Reg Reg) Reg)
(extern constructor x64_xor x64_xor_impl)

;; Lowering rules: map CLIF instructions to target machine instructions

;; Integer addition
(rule (lower (iadd (fits_in_64 ty) x y))
  (value_reg (x64_add ty x y)))

;; Integer subtraction
(rule (lower (isub (fits_in_64 ty) x y))
  (value_reg (x64_sub ty x y)))

;; Integer multiplication
(rule (lower (imul (fits_in_64 ty) x y))
  (value_reg (x64_imul ty x y)))

;; Bitwise AND
(rule (lower (band (fits_in_64 ty) x y))
  (value_reg (x64_and ty x y)))

;; Bitwise OR
(rule (lower (bor (fits_in_64 ty) x y))
  (value_reg (x64_or ty x y)))

;; Bitwise XOR
(rule (lower (bxor (fits_in_64 ty) x y))
  (value_reg (x64_xor ty x y)))

Contribute — propose a file extension

Tell us where to find evidence about ISLE (mapped to pl/isle). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/ISLE/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Island ISLISP →