SEGLEA
Operation
Computes segment pre-translation of the effective-address point and reports bounds failure in FLAGS.
Assembler Syntax
SEGLEA.{B|W|L|Q}(z) <ea>(e), Rn(d)
SEGLEA.{B|W|L|Q}(z) Rn(s), Rn(d)
Privilege
Unprivileged
Repeat eligibility
REP eligible; REPcc observes computed
SEGLEA computes the source effective-address point and applies the selected segment's pre-translation to that point. The size suffix selects the index scale used during effective-address calculation. On success, SEGLEA writes the segment result to the destination and clears FLAGS. A failed segment-bound check sets FLAGS.V while clearing FLAGS.Z, FLAGS.N, and FLAGS.C, suppresses the destination write, commits effective-address auto-update effects, and completes without an exception. The B-sized 0 or 1 failure result supplies the REPcc observed value.
Let \(a\) be the source effective address before a memory read. The effective-address form selects a segment register image, which supplies the \(\mathit{base}\), \(\mathit{span}\), and \(\mathit{limit}\) quantities used by segment pre-translation. A zero mantissa disables bounds and returns \(a\). In translated mode, \(a\) must satisfy \(0 \le a < \mathit{span}\) and the result is \(\mathit{base}+a\). In bounds-only mode, \(a\) must satisfy \(\mathit{base} \le a < \mathit{limit}\) and the result remains \(a\). An out-of-bounds address writes FLAGS as FLAGS.Z=FLAGS.N=FLAGS.C=0 and FLAGS.V=1, in which case the destination is not written. A successful address writes FLAGS as FLAGS.Z=FLAGS.N=FLAGS.C=FLAGS.V=0.
2.75in
Encodings
SEGLEA.{B|W|L|Q}(z) <ea>(e), Rn(d)
Format: Instruction format for SEGLEA.{B|W|L|Q}(z) <ea>(e), Rn(d)
2.75in SEGLEA.{B|W|L|Q}(z) Rn(s), Rn(d)
Format: Instruction format for SEGLEA.{B|W|L|Q}(z) Rn(s), Rn(d)