ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 913 microarchs · 15,555 chips · 105 sources
Arch:
Tier:

Valhall Immediates

T2 mali-gpu encoding_format encoding_format
Arm Mali Valhall Immediates Lookup Table (32 entries)
SourceArm Mali Valhall GPU ISA Specification (Mesa Panfrost) (mali_valhall_isa)
Reliability TierT2 — Compiler & Kernel Reference
ISA / Silicon ScopeArm Mali Valhall (G57–G720 / Immortalis)
Arm Mali Valhall (G57, G77, G78, G610, G710, Immortalis-G715/G720/G925)
License & VersionMIT
mesa/main
Upstreamhttps://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/panfrost/compiler/bifrost/valhall/ISA.xml

Summary

This immediates are accessible in (almost) any instruction, provided the immediate mode is kept to the default. They optimize for the most common immediate values; any immediate listed here may be used without taking up a uniform slot or a register. Most integer instructions can access separate half-words and individual bytes via swizzles on the source.

Syntax / Encoding

Valhall 64-bit inline Immediates

Bitfields (32)

BitsFieldDescription
idx=0imm[0]Zero
idx=1imm[1]All ones; integer $-1$
idx=2imm[2]Maximum integer; floating-point NaN
idx=3imm[3]Integers $(-2, -3, -4, -6)$
idx=4imm[4]16-bit integer $2^8$
idx=5imm[5]Multiples of 16 $(0, 32, 0, 128)$
idx=6imm[6]Multiples of 16 $(48, 80, 96, 112)$
idx=7imm[7]Multiples of 16 $(144, 160, 176, 192)$
idx=8imm[8]Integers $(0, 1, 2, 3)$
idx=9imm[9]Integers $(4, 5, 6, 7)$
idx=10imm[10]Integers $(8, 9, 10, 11)$
idx=11imm[11]Integers $(12, 13, 14, 15)$
idx=12imm[12]Integers $(16, 17, 18, 19)$
idx=13imm[13]Integers $(20, 21, 22, 23)$
idx=14imm[14]Integers $(24, 25, 26, 27)$
idx=15imm[15]Integers $(28, 29, 30, 31)$
idx=16imm[16]Float $1.0$
idx=17imm[17]Float $0.1$
idx=18imm[18]Float $1 / \pi$
idx=19imm[19]Float $\log(2)$
idx=20imm[20]Float $\pi$
idx=21imm[21]Float $0.0$
idx=22imm[22]Float $65535.0 = 2^{16} - 1$
idx=23imm[23]Half-float $(255.0, 256.0) = (2^8 - 1, 2^8)$
idx=24imm[24]Half-float $0.1 = 1 / 10$
idx=25imm[25]Half-float $0.25 = 2^{-2}$
idx=26imm[26]Half-float $0.5 = 2^{-1}$
idx=27imm[27]Half-float $1.0 = 2^0$
idx=28imm[28]Half-float $2.0 = 2^1$
idx=29imm[29]Half-float $4.0 = 2^2$
idx=30imm[30]Half-float $8.0 = 2^3$
idx=31imm[31]Half-float $\pi$