<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Target/SystemZ/SystemZOperands.td, branch users/nico/python-2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[SystemZ] Add support for new cpu architecture - arch15</title>
<updated>2025-01-20T18:30:21+00:00</updated>
<author>
<name>Ulrich Weigand</name>
<email>ulrich.weigand@de.ibm.com</email>
</author>
<published>2025-01-20T18:23:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8424bf207efd89eacf2fe893b67be98d535e1db6'/>
<id>8424bf207efd89eacf2fe893b67be98d535e1db6</id>
<content type='text'>
This patch adds support for the next-generation arch15
CPU architecture to the SystemZ backend.

This includes:
- Basic support for the new processor and its features.
- Detection of arch15 as host processor.
- Assembler/disassembler support for new instructions.
- Exploitation of new instructions for code generation.
- New vector (signed|unsigned|bool) __int128 data types.
- New LLVM intrinsics for certain new instructions.
- Support for low-level builtins mapped to new LLVM intrinsics.
- New high-level intrinsics in vecintrin.h.
- Indicate support by defining  __VEC__ == 10305.

Note: No currently available Z system supports the arch15
architecture.  Once new systems become available, the
official system name will be added as supported -march name.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds support for the next-generation arch15
CPU architecture to the SystemZ backend.

This includes:
- Basic support for the new processor and its features.
- Detection of arch15 as host processor.
- Assembler/disassembler support for new instructions.
- Exploitation of new instructions for code generation.
- New vector (signed|unsigned|bool) __int128 data types.
- New LLVM intrinsics for certain new instructions.
- Support for low-level builtins mapped to new LLVM intrinsics.
- New high-level intrinsics in vecintrin.h.
- Indicate support by defining  __VEC__ == 10305.

Note: No currently available Z system supports the arch15
architecture.  Once new systems become available, the
official system name will be added as supported -march name.
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][SystemZ] Use SExt for signed constants (#118803)</title>
<updated>2024-12-05T14:49:37+00:00</updated>
<author>
<name>Kai Nacke</name>
<email>kai.peter.nacke@ibm.com</email>
</author>
<published>2024-12-05T14:49:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3bd3fa64283ea4bb2a893ed5a8d4d0438e761aba'/>
<id>3bd3fa64283ea4bb2a893ed5a8d4d0438e761aba</id>
<content type='text'>
Use SExt instead of ZExt in XForms which produce a signed value. This is
only to make it clear that the XForm handles a signed value.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use SExt instead of ZExt in XForms which produce a signed value. This is
only to make it clear that the XForm handles a signed value.</pre>
</div>
</content>
</entry>
<entry>
<title>[SystemZ] SIMM32 is a signed constant (#118634)</title>
<updated>2024-12-05T13:35:27+00:00</updated>
<author>
<name>Kai Nacke</name>
<email>kai.peter.nacke@ibm.com</email>
</author>
<published>2024-12-05T13:35:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=f85be32613a3b7078d4a4618f0995bcab353d050'/>
<id>f85be32613a3b7078d4a4618f0995bcab353d050</id>
<content type='text'>
A follow-up to PR #117181: SIMM32 must use getSignedTargetConstant(),
too.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A follow-up to PR #117181: SIMM32 must use getSignedTargetConstant(),
too.</pre>
</div>
</content>
</entry>
<entry>
<title>[SystemZ] Use getSignedConstant() where necessary (#117181)</title>
<updated>2024-11-25T08:47:49+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>npopov@redhat.com</email>
</author>
<published>2024-11-25T08:47:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=815a1bb53a9bb753f9aea177135150b23012550f'/>
<id>815a1bb53a9bb753f9aea177135150b23012550f</id>
<content type='text'>
This will avoid assertion failures once we disable implicit truncation
in getConstant().

Inside adjustSubwordCmp() I ended up suppressing the issue with an
explicit cast, because this code deals with a mix of unsigned and signed
immediates.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will avoid assertion failures once we disable implicit truncation
in getConstant().

Inside adjustSubwordCmp() I ended up suppressing the issue with an
explicit cast, because this code deals with a mix of unsigned and signed
immediates.</pre>
</div>
</content>
</entry>
<entry>
<title>[SystemZ] Support i128 as legal type in VRs (#74625)</title>
<updated>2023-12-15T11:55:15+00:00</updated>
<author>
<name>Ulrich Weigand</name>
<email>ulrich.weigand@de.ibm.com</email>
</author>
<published>2023-12-15T11:55:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a65ccc1b9fe740c9f65d9cf2b627de50278aad56'/>
<id>a65ccc1b9fe740c9f65d9cf2b627de50278aad56</id>
<content type='text'>
On processors supporting vector registers and SIMD instructions, enable
i128 as legal type in VRs. This allows many operations to be implemented
via native instructions directly in VRs (including add, subtract,
logical operations and shifts). For a few other operations (e.g.
multiply and divide, as well as atomic operations), we need to move the
i128 value back to a GPR pair to use the corresponding instruction
there. Overall, this is still beneficial.

The patch includes the following LLVM changes:
- Enable i128 as legal type
- Set up legal operations (in SystemZInstrVector.td)
- Custom expansion for i128 add/subtract with carry
- Custom expansion for i128 comparisons and selects
- Support for moving i128 to/from GPR pairs when required
- Handle 128-bit integer constant values everywhere
- Use i128 as intrinsic operand type where appropriate
- Updated and new test cases

In addition, clang builtins are updated to reflect the intrinsic operand
type changes (which also improves compatibility with GCC).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On processors supporting vector registers and SIMD instructions, enable
i128 as legal type in VRs. This allows many operations to be implemented
via native instructions directly in VRs (including add, subtract,
logical operations and shifts). For a few other operations (e.g.
multiply and divide, as well as atomic operations), we need to move the
i128 value back to a GPR pair to use the corresponding instruction
there. Overall, this is still beneficial.

The patch includes the following LLVM changes:
- Enable i128 as legal type
- Set up legal operations (in SystemZInstrVector.td)
- Custom expansion for i128 add/subtract with carry
- Custom expansion for i128 comparisons and selects
- Support for moving i128 to/from GPR pairs when required
- Handle 128-bit integer constant values everywhere
- Use i128 as intrinsic operand type where appropriate
- Updated and new test cases

In addition, clang builtins are updated to reflect the intrinsic operand
type changes (which also improves compatibility with GCC).</pre>
</div>
</content>
</entry>
<entry>
<title>[SystemZ] Allow symbols in immediate asm operands</title>
<updated>2023-07-21T09:09:19+00:00</updated>
<author>
<name>Ilya Leoshkevich</name>
<email>iii@linux.ibm.com</email>
</author>
<published>2023-07-20T08:11:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a0eee6c971878b1f2edcc34fb2513e12a04a29ba'/>
<id>a0eee6c971878b1f2edcc34fb2513e12a04a29ba</id>
<content type='text'>
Currently mentioning any symbols in immediate asm operands is not
supported, for example:

    error: invalid operand for instruction
    lghi %r4,foo_end-foo

The immediate problem is that is*Imm() and print*Operand() functions do
not accept MCExprs, but simply relaxing these checks is not enough:
after symbol addresses are computed, range checks need to run against
resolved values.

Add a number of SystemZ::FixupKind members for each kind of immediate
value and process them in SystemZMCAsmBackend::applyFixup(). Only
perform the range checks, do not change anything.

Adjust the tests: move previously failing cases like the one shown
above out of insn-bad.s.

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D154899
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently mentioning any symbols in immediate asm operands is not
supported, for example:

    error: invalid operand for instruction
    lghi %r4,foo_end-foo

The immediate problem is that is*Imm() and print*Operand() functions do
not accept MCExprs, but simply relaxing these checks is not enough:
after symbol addresses are computed, range checks need to run against
resolved values.

Add a number of SystemZ::FixupKind members for each kind of immediate
value and process them in SystemZMCAsmBackend::applyFixup(). Only
perform the range checks, do not change anything.

Adjust the tests: move previously failing cases like the one shown
above out of insn-bad.s.

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D154899
</pre>
</div>
</content>
</entry>
<entry>
<title>[SystemZ] Use named MI sub-operands</title>
<updated>2023-07-14T15:05:19+00:00</updated>
<author>
<name>Ilya Leoshkevich</name>
<email>iii@linux.ibm.com</email>
</author>
<published>2023-07-14T15:04:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b159c5f958f747308987b4d48a2070c9394d3450'/>
<id>b159c5f958f747308987b4d48a2070c9394d3450</id>
<content type='text'>
Prepare for removing the MemOpsEmitted workaround for symbolic
displacements by letting TableGen know about the offsets of the
displacement sub-operands within the instruction.

There are alternative ways to do this that were tried and rejected:

- Creating encoders and decoders for each possible displacement offset.
  This is too repetitive.

- Use VarLenCodeEmitter [1]. The resulting diff is quite large.

Instead, use the named sub-operand support introduced by commit
a538d1f13a13 ("[TableGen][CodeEmitterGen] Allow local names for
sub-operands in a operand list.").

Describe instruction encodings in terms of sub-operands instead of
operands (e.g. B, D, L vs BDL) - this also better matches the pictures
from the Principles of Operation. Decompose operands into sub-operands
using the new (bdaddr12only $B1, $D1):$BD1 syntax. Replace the
encoders and the decoders of the operands with these of the
sub-operands.

Since DecodeADDR64BitRegisterClass() is now used for bases and indices,
change it to return NoRegister when decoding 0. This also changes the
disassembly of some instructions, e.g., br %r0 becomes br 0. Since this
better captures the instruction semantics, namely, that the value of
%r0 is not used, keep this change and update the tests.

[1] https://m680x0.github.io/blog/2022/02/varlen-encoder.html

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D155194
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prepare for removing the MemOpsEmitted workaround for symbolic
displacements by letting TableGen know about the offsets of the
displacement sub-operands within the instruction.

There are alternative ways to do this that were tried and rejected:

- Creating encoders and decoders for each possible displacement offset.
  This is too repetitive.

- Use VarLenCodeEmitter [1]. The resulting diff is quite large.

Instead, use the named sub-operand support introduced by commit
a538d1f13a13 ("[TableGen][CodeEmitterGen] Allow local names for
sub-operands in a operand list.").

Describe instruction encodings in terms of sub-operands instead of
operands (e.g. B, D, L vs BDL) - this also better matches the pictures
from the Principles of Operation. Decompose operands into sub-operands
using the new (bdaddr12only $B1, $D1):$BD1 syntax. Replace the
encoders and the decoders of the operands with these of the
sub-operands.

Since DecodeADDR64BitRegisterClass() is now used for bases and indices,
change it to return NoRegister when decoding 0. This also changes the
disassembly of some instructions, e.g., br %r0 becomes br 0. Since this
better captures the instruction semantics, namely, that the value of
%r0 is not used, keep this change and update the tests.

[1] https://m680x0.github.io/blog/2022/02/varlen-encoder.html

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D155194
</pre>
</div>
</content>
</entry>
<entry>
<title>Drop U6Imm-related definitions</title>
<updated>2023-04-04T13:08:44+00:00</updated>
<author>
<name>Ilya Leoshkevich</name>
<email>iii@linux.ibm.com</email>
</author>
<published>2023-04-04T12:50:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3c8df6924b1b811e7ab265c75480d386c0cb1ca8'/>
<id>3c8df6924b1b811e7ab265c75480d386c0cb1ca8</id>
<content type='text'>
They are no longer used, which leads to the -Wunused-function warning.

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D147521
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
They are no longer used, which leads to the -Wunused-function warning.

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D147521
</pre>
</div>
</content>
</entry>
<entry>
<title>[SystemZ] Allow any I5 in RotateSelect*</title>
<updated>2023-04-04T12:00:49+00:00</updated>
<author>
<name>Ilya Leoshkevich</name>
<email>iii@linux.ibm.com</email>
</author>
<published>2023-04-04T10:11:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b2f5ab6a41e32bfd8151225b6032ca869f4e142f'/>
<id>b2f5ab6a41e32bfd8151225b6032ca869f4e142f</id>
<content type='text'>
For all RotateSelect* instructions, PoP says:

    Bits 0-1 of the I5 field (bits 32-33 of the instruction) are
    ignored.

LLVM, however, completely prohibits using them, e.g.:

    error: invalid operand for instruction
    asm("rxsbg %[r1],%[r2],177,43,228\n"

Lift this unnecessary restriction.

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D146185
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For all RotateSelect* instructions, PoP says:

    Bits 0-1 of the I5 field (bits 32-33 of the instruction) are
    ignored.

LLVM, however, completely prohibits using them, e.g.:

    error: invalid operand for instruction
    asm("rxsbg %[r1],%[r2],177,43,228\n"

Lift this unnecessary restriction.

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D146185
</pre>
</div>
</content>
</entry>
<entry>
<title>[TableGen] Drop deprecated leading # operation (NOP) and replace ## with #</title>
<updated>2020-04-25T23:26:45+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>maskray@google.com</email>
</author>
<published>2020-04-25T22:58:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2cb48d620ff3e56f4a4179186055a802c34a4bfd'/>
<id>2cb48d620ff3e56f4a4179186055a802c34a4bfd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
