26 Commits

Author SHA1 Message Date
Andrei Safronov
393bc0cc9f
[Xtensa] Fix lowering FP compare operations. (#156740)
Implement lowering of the SETONE/SETOGT/SETOGE/SETUGT/SETUGE operations.
This fixes f32 "copysign" and "ueq" tests.

This PR fixes
https://github.com/llvm/llvm-project/issues/149666#event-18712363149
2025-09-08 20:42:52 +03:00
Andrei Safronov
48da8489f2
[Xtensa] Add esp32/esp8266 cpus implementation. (#152409)
Add Xtensa esp32 and esp8266 cpus. Implement target parser to recognise
Xtensa hardware features.
2025-08-12 15:17:36 +03:00
Andrei Safronov
3ffaaf6db6
[Xtensa] Implement Xtensa S32C1I Option and atomics lowering. (#137134)
Implement Xtensa S32C1I Option. Implement atomic_cmp_swap_32 operation
using s32c1i instruction. Use atomic_cmp_swap_32 operation and AtomicExpand
pass to implement atomics operations.
2025-08-06 17:43:27 +03:00
Andrei Safronov
3dc09fbf29
[Xtensa] Implement THREADPTR and DFPAccel Xtensa Options. (#145543)
Implment base support of the TLS functionality using Xtensa THREADPTR
Option. Implement basic functionality of the DFPAccel Option(registers
support).
2025-07-02 17:47:07 +03:00
Andrei Safronov
a2c9f7dbcc
[Xtensa] Implement lowering SELECT_CC/BRCC for Xtensa FP Option. (#145544)
Also minor format changes in disassembler test for Xtensa FP Option.
2025-07-02 13:48:49 +03:00
Andrei Safronov
4154ada1d4
[Xtensa] Implement Xtensa Floating Point Option. (#136086)
Implement Xtensa FP Option instructions and lowering 
of the base FP operations with tests. Implement UR registers parsing.
 Fix loading from constant pool callee, basic block, globaladdress and
jumptable addresses. Also fixed potential memory leakage when several
similar XtensaConstantPoolValue objects are created Fix lowering i32 immediate.
2025-06-23 01:18:04 +03:00
Andrei Safronov
5ad32fa697
[Xtensa] Implement Xtensa Mul and Div Options. (#132157)
Implement Xtensa Mul16, Mul32, Mul32High and Div32 Options. Also fix callw test.
2025-04-18 20:22:03 +03:00
Andrei Safronov
68806b9c2c
[Xtensa] Implement SEXT, NSA, MINMAX and Loop Xtensa Options. (#133818)
Implement basic support of the several simple Xtensa Options with 1-4
instructions for each option. The Sign Extend Option (SEXT). The NSA
Option. The Minimum/Maximum Integer 32-bit Option and Loop Option.
Fixed address operands, added OPERAND_PCREL to operands descriptions.
2025-04-15 00:53:46 +03:00
Andrei Safronov
89c25c54f9
[Xtensa] Implement windowed register call ABI. (#130001)
Implement base windowed register call ABI. By defaullt use
rotation window by 8 registers.
2025-03-31 22:24:59 +03:00
Fangrui Song
5712e293fb [CodeGen] Clean up tests that depend on implicit .text in MCAsmStreamer 2024-12-22 21:11:32 -08:00
Andrei Safronov
be4a18387c
[Xtensa] Implement vararg support. (#117126) 2024-12-12 03:19:31 +03:00
Sergei Barannikov
b3363104d3
[UTC] Add support for Xtensa (#117441)
Regenerate the failing test as well.
2024-11-23 20:43:05 +03:00
Andrei Safronov
3b1b1271fb
[Xtensa] Implement support for the BranchRelaxation. (#113450) 2024-11-08 01:50:42 +03:00
Andrei Safronov
1e9a296557
[Xtensa] Implement branch analysis. (#110959) 2024-10-22 11:59:37 +03:00
Alex Rønne Petersen
ad4a582fd9
[llvm] Consistently respect naked fn attribute in TargetFrameLowering::hasFP() (#106014)
Some targets (e.g. PPC and Hexagon) already did this. I think it's best
to do this consistently so that frontend authors don't run into
inconsistent results when they emit `naked` functions. For example, in
Zig, we had to change our emit code to also set `frame-pointer=none` to
get reliable results across targets.

Note: I don't have commit access.
2024-10-18 09:35:42 +04:00
Andrei Safronov
56736c7937
[Xtensa] Implement volatile load/store. (#110292)
Add a memory wait "MEMW" instruction before volatile load/store
operations, as implemented in GCC.
2024-10-03 08:35:27 +03:00
Andrei Safronov
dc2d0d5e1a
[Xtensa] Add basic support for inline asm constraints. (#108986) 2024-09-25 14:02:58 +03:00
Andrei Safronov
0ba8b247dd
[Xtensa] Lowering FRAMEADDR/RETURNADDR operations. (#107363) 2024-09-13 21:33:54 +03:00
Andrei Safronov
ea625f48ab
[Xtensa] Implement sextload i8 (#106053) 2024-08-26 17:21:34 +02:00
Fangrui Song
c5a0c37b42 [Xtensa,test] Fix div.ll after #99981 2024-08-22 10:30:31 -07:00
Andrei Safronov
fab515ca7f
[Xtensa] Implement lowering Mul/Div/Shift operations. (#99981)
Implement lowering of the Mul/Div operations and also shift parts
operations. Implement lowering of the bit manipulations, like
ROT/SWAP/CTPOP/CTTZ/CTLZ.
2024-08-22 10:34:21 +02:00
Andrei Safronov
ce92b2f594
[Xtensa] Implement lowering SELECT_CC, SETCC. (#97017) 2024-07-11 09:46:24 +02:00
Andrei Safronov
cc8fdd60c2
[Xtensa] Lower GlobalAddress/BlockAddress/JumpTable (#95256)
This patch implements lowering of the GlobalAddress, BlockAddress,
JumpTable and BR_JT. Also patch adds legal support of the BR_CC
operation for i32 type.
2024-06-25 12:21:33 +02:00
Andrei Safronov
78f5d9cdba
[PATCH] [Xtensa] Implement FrameLowering methods and stack operation lowering. (#92960)
Implement emitPrologue/emitEpilogue methods, determine/spill/restore
callee saved registers functionality with test. Also implement lowering
of the DYNAMIC_STACKALLOC/STACKSAVE/STACKRESTORE stack operations with
tests.
2024-06-04 16:44:59 +02:00
Andrei Safronov
36209d366d
[Xtensa] Implement base CallConvention. (#83280)
Implement base Calling Convention functionality. 
Implement stack load/store register operations.
Implement call lowering.
2024-04-24 00:00:59 +02:00
Andrei Safronov
b5046a7fa9
[Xtensa] Initial codegen support from IR (#78548)
This PR provides implementation of the basic codegen infra such as
TargetFrameLowering, MCInstLower,
AsmPrinter, RegisterInfo, InstructionInfo, TargetLowering,
SelectionDAGISel.

Migrated from https://reviews.llvm.org/D145658
2024-02-12 17:41:59 +01:00