[PATCH] xtensa: fix MAX_ISTACK for loopgtz L32R widening

Project / Subsystem

binutils / xtensa

Date

2026-08-11

Proposer

Alexey Lapshin <alexey.lapshin@espressif.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

—/10

Technical tradeoffs

  • • Increases memory usage slightly by enlarging the instruction stack.
  • • Fixes a bug that could lead to assembler crashes or incorrect code generation for out-of-range loops.

All attributes

project
binutils
subsystem
xtensa
patch_id
—
discussion_id
7cdc8d664a39bd2ce3e70f0d0c6d9e233e5eb1f4.camel@espressif.com
source_type
public_inbox
title
[PATCH] xtensa: fix MAX_ISTACK for loopgtz L32R widening
headline
xtensa: fix MAX_ISTACK for loopgtz L32R widening
tldr
Increase MAX_ISTACK in Xtensa gas to 16 to accommodate loopgtz relaxation.
proposer
Alexey Lapshin <alexey.lapshin@espressif.com>
consensus
Proposed
outcome
proposed
sentiment_score
—
technical_tradeoffs
  • • Increases memory usage slightly by enlarging the instruction stack.
  • • Fixes a bug that could lead to assembler crashes or incorrect code generation for out-of-range loops.
series_id
—
series_role
standalone
series_parts
[]
tags
  • • binutils
  • • gas
  • • xtensa
  • • assembler
  • • optimization
bugzilla_url
—
date
2026-08-11T00:00:00.000Z

[PATCH] xtensa: fix MAX_ISTACK for loopgtz L32R widening

Alexey Lapshin proposes increasing MAX_ISTACK in the Xtensa assembler configuration from 12 to 16. This is necessary because the loopgtz relaxation sequence, which uses L32R widening, requires 13 instruction stack entries, causing overflows with the current limit. The patch also enhances overflow reporting and adds a new test case.