Page 1 of 1

Availability of Xtensa core extensions in ESP32-S3

Posted: Thu Jul 17, 2025 11:26 am
by alex000090
Dear all,

I have some misunderstanding about Xtensa core used in ESP32-S3.
According to Xtensa Instruction Set Architecture the boolean registers, boolean operations and some "TIE" extensions (like FLIX and SIMD) can be presented in some Xtensa LX chips. But as far as I understood, it is options.
May someone help me to understand, are these features presented in the Xtensa CPU into ESP32-S3 and how it can be used?

Briefly, I tried to simply use the line below to test compiler ability, but I caught "bad register name: b0" error which tells one nothing about hardware.

Code: Select all

asm volatile ("wsr b0, 1");

Re: Availability of Xtensa core extensions in ESP32-S3

Posted: Thu Jul 17, 2025 12:50 pm
by MicroController
See https://github.com/espressif/esp-idf/bl ... core-isa.h
The boolean registers are there (used by the FPU) (plus some other pretty cool stuff), no FLIX, but Espressif's own "Processor Instruction Extensions" ("PIE") SIMD are available, documented (only) in the ESP32-S3 TRM.
The boolean registers are used by the compiler automatically, e.g. for float (FPU) comparisons. The PIE/SIMD instructions aren't supported by the compiler, but they are by the assembler; so to make use of them you can employ either inline assembly or stand-alone assembly (.S) files/functions.

(Btw, I think you cannot explicitly write to a single boolean register. They all live inside the "Special Register BR", so "MOVI %[tmp], 0; WSR.BR %[tmp]" for example should clear them all.)

Re: Availability of Xtensa core extensions in ESP32-S3

Posted: Mon Jul 21, 2025 6:48 am
by alex000090
Thanks for the answer! Now it's clearer to me. And another question: I don't quite understand how many registers are in the ESP32-S3. For example, the TDS specifies the number of QRs for 8, but does that mean 8 per core or 8 per chip?

Re: Availability of Xtensa core extensions in ESP32-S3

Posted: Mon Jul 21, 2025 10:24 am
by MicroController
Each core has its own full set of CPU registers. This includes the core architecture's "address registers" as well as the FPU and PIE registers.

Re: Availability of Xtensa core extensions in ESP32-S3

Posted: Wed Feb 25, 2026 8:20 pm
by knutbrut
Sorry to restart an old thread. Does this mean that:

1. For the xtensa lx7 instruction set the boolean instructions like OLT.S, BT, BF, etc. are unavailable for the ESP32-S3. If so can you provide example code for the feature set that replaces this functionality?

2. You state that each core has it's own full set of CPU registers. Does this mean that each CPU has it's own dedicated FPU? I can't find this clearly stated in the documentation.

Thank you

Re: Availability of Xtensa core extensions in ESP32-S3

Posted: Thu Feb 26, 2026 10:16 am
by MicroController
Does this mean that:
... the boolean instructions like OLT.S, BT, BF, etc. are unavailable for the ESP32-S3.
No.
Does this mean that each CPU has it's own dedicated FPU?
I assume it does. Haven't actually benchmarked it, but I have also never seen anything mentioned anywhere about some synchronization/arbitration mechanics w.r.t. access to "the" FPU.

Re: Availability of Xtensa core extensions in ESP32-S3

Posted: Wed Mar 04, 2026 6:45 pm
by knutbrut
If so I would suggest correcting the Table 1.5-1 of the ESP32-s3 TRM. The BR registers are not listed here which is confusing.

Re: Availability of Xtensa core extensions in ESP32-S3

Posted: Thu Mar 05, 2026 5:16 pm
by MicroController
all kinds of registers related to ESP32-S3’s extended instruction set
The S3's PIE/ISA extensions don't use the BRs, so...
For the full list of (non-PIE) registers, you may refer to Cadence's ISA summary.

(Not hooking up the BRs to the PIE vector comparison instructions may actually have been an unfortunate oversight by Espressif.)