<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Target/Mips/MipsRegisterInfo.cpp, branch main</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>[MIPS][float] Fixed SingleFloat codegen on N32/N64 targets (#140575)</title>
<updated>2025-09-28T02:49:40+00:00</updated>
<author>
<name>Davide Mor</name>
<email>39653004+Tazdevil971@users.noreply.github.com</email>
</author>
<published>2025-09-28T02:49:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9630b321a50a3712ca092a53a4a4c7bea94b3af2'/>
<id>9630b321a50a3712ca092a53a4a4c7bea94b3af2</id>
<content type='text'>
This patch aims at making the combination of single-float and N32/N64
ABI properly work.

Right now when both options are enabled the compiler chooses an
incorrect ABI and in some cases even generates wrong instructions.

The floating point behavior on MIPS is controlled through 3 flags:
soft-float, single-float, fp64. This makes things complicated because
fp64 indicates the presence of 64bit floating point registers, but
cannot be easily disabled (the mips3 feature require it, but mips3 CPUs
with only 32bit floating point exist). Also if fp64 is missing it
doesn't actually disable 64bit floating point operations, because
certain MIPS1/2 CPUs support 64bit floating point with 32bit registers,
hence the single-float option.

I'm guessing that originally single-float was only intended for the
latter case, and that's the reason why it doesn't properly work on 64bit
targets.

So this patch does the following:
- Make single-float a "master disable", even if fp64 is enabled this
should completely disable generation of 64bit floating point operations,
making it available on targets which hard require fp64.
- Add proper calling conventions for N32/N64 single-float combinations.
- Fixup codegen to not generate certain 64bit floating point operations,
apparently not assigning a register class to f64 values is not enough to
prevent them from showing up.
- Add tests for the new calling conventions and codegen.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch aims at making the combination of single-float and N32/N64
ABI properly work.

Right now when both options are enabled the compiler chooses an
incorrect ABI and in some cases even generates wrong instructions.

The floating point behavior on MIPS is controlled through 3 flags:
soft-float, single-float, fp64. This makes things complicated because
fp64 indicates the presence of 64bit floating point registers, but
cannot be easily disabled (the mips3 feature require it, but mips3 CPUs
with only 32bit floating point exist). Also if fp64 is missing it
doesn't actually disable 64bit floating point operations, because
certain MIPS1/2 CPUs support 64bit floating point with 32bit registers,
hence the single-float option.

I'm guessing that originally single-float was only intended for the
latter case, and that's the reason why it doesn't properly work on 64bit
targets.

So this patch does the following:
- Make single-float a "master disable", even if fp64 is enabled this
should completely disable generation of 64bit floating point operations,
making it available on targets which hard require fp64.
- Add proper calling conventions for N32/N64 single-float combinations.
- Fixup codegen to not generate certain 64bit floating point operations,
apparently not assigning a register class to f64 values is not enough to
prevent them from showing up.
- Add tests for the new calling conventions and codegen.</pre>
</div>
</content>
</entry>
<entry>
<title>Mips: Switch to RegClassByHwMode (#158273)</title>
<updated>2025-09-19T13:50:07+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2025-09-19T13:50:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=084872a26d1a58129536e654ba9e29bc39cea1bb'/>
<id>084872a26d1a58129536e654ba9e29bc39cea1bb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>CodeGen: Remove MachineFunction argument from getPointerRegClass (#158185)</title>
<updated>2025-09-12T09:18:50+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2025-09-12T09:18:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2331fbb01978463a218d80883d29a003fdef6e14'/>
<id>2331fbb01978463a218d80883d29a003fdef6e14</id>
<content type='text'>
getPointerRegClass is a layering violation. Its primary purpose
is to determine how to interpret an MCInstrDesc's operands RegClass
fields. This should be context free, and only depend on the subtarget.
The model of this is also wrong, since this should be an
instruction / operand specific property, not a global pointer class.
Remove the the function argument to help stage removal of this hook
and avoid introducing any new obstacles to replacing it.

The remaining uses of the function were to get the subtarget, which
TargetRegisterInfo already belongs to. A few targets needed new
subtarget derived properties copied there.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
getPointerRegClass is a layering violation. Its primary purpose
is to determine how to interpret an MCInstrDesc's operands RegClass
fields. This should be context free, and only depend on the subtarget.
The model of this is also wrong, since this should be an
instruction / operand specific property, not a global pointer class.
Remove the the function argument to help stage removal of this hook
and avoid introducing any new obstacles to replacing it.

The remaining uses of the function were to get the subtarget, which
TargetRegisterInfo already belongs to. A few targets needed new
subtarget derived properties copied there.</pre>
</div>
</content>
</entry>
<entry>
<title>Remove Native Client support (#133661)</title>
<updated>2025-07-15T17:22:33+00:00</updated>
<author>
<name>Brad Smith</name>
<email>brad@comstyle.com</email>
</author>
<published>2025-07-15T17:22:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0d2e11f3e834e0c1803a6e00da35525b0d476eb2'/>
<id>0d2e11f3e834e0c1803a6e00da35525b0d476eb2</id>
<content type='text'>
Remove the Native Client support now that it has finally reached end of life.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the Native Client support now that it has finally reached end of life.</pre>
</div>
</content>
</entry>
<entry>
<title>[Mips] Reserve hardware register HWR2 (#127775)</title>
<updated>2025-02-20T12:53:30+00:00</updated>
<author>
<name>yingopq</name>
<email>115543042+yingopq@users.noreply.github.com</email>
</author>
<published>2025-02-20T12:53:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0c809ea336143f6118339521cbebe9e182e7a5e5'/>
<id>0c809ea336143f6118339521cbebe9e182e7a5e5</id>
<content type='text'>
Fix pr https://github.com/llvm/llvm-project/pull/127553.
x86_64 failed to run readcyclecounter.ll when enable expensive_check,
it would error "Using an undefined physical register".</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix pr https://github.com/llvm/llvm-project/pull/127553.
x86_64 failed to run readcyclecounter.ll when enable expensive_check,
it would error "Using an undefined physical register".</pre>
</div>
</content>
</entry>
<entry>
<title>[MC][CodeGen][Mips] Add CodeView mapping (#120877)</title>
<updated>2025-01-20T07:00:24+00:00</updated>
<author>
<name>Hervé Poussineau</name>
<email>hpoussin@reactos.org</email>
</author>
<published>2025-01-20T07:00:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=be68f35bf55baf6150180170ec17371f0be90689'/>
<id>be68f35bf55baf6150180170ec17371f0be90689</id>
<content type='text'>
Also add support for new relocation types required by debug information.

Constants have been taken from CodeView Symbolic Debug Information
Specification.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also add support for new relocation types required by debug information.

Constants have been taken from CodeView Symbolic Debug Information
Specification.</pre>
</div>
</content>
</entry>
<entry>
<title>[Mips] Remove unused includes (NFC) (#116499)</title>
<updated>2024-11-16T20:13:26+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-11-16T20:13:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=73e89cf66d4b88d568ff4c718ae7bf55588ef2be'/>
<id>73e89cf66d4b88d568ff4c718ae7bf55588ef2be</id>
<content type='text'>
Identified with misc-include-cleaner.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Identified with misc-include-cleaner.</pre>
</div>
</content>
</entry>
<entry>
<title>[Mips] Remove MipsRegisterInfo::requiresRegisterScavenging. NFC.</title>
<updated>2023-05-15T16:30:33+00:00</updated>
<author>
<name>Jay Foad</name>
<email>jay.foad@amd.com</email>
</author>
<published>2023-05-15T16:29:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=101cdac93a626a597c410dfb80e459b5095ad614'/>
<id>101cdac93a626a597c410dfb80e459b5095ad614</id>
<content type='text'>
This method is unused since MipsRegisterInfo is abstract and it is
overridden in both concrete subclasses.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This method is unused since MipsRegisterInfo is abstract and it is
overridden in both concrete subclasses.
</pre>
</div>
</content>
</entry>
<entry>
<title>PEI should be able to use backward walk in replaceFrameIndicesBackward.</title>
<updated>2022-11-18T14:57:34+00:00</updated>
<author>
<name>Alexander Timofeev</name>
<email>alexander.timofeev@amd.com</email>
</author>
<published>2022-11-17T18:03:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=32bd75716c27d1a094c2436529b596ce1547f6eb'/>
<id>32bd75716c27d1a094c2436529b596ce1547f6eb</id>
<content type='text'>
The backward register scavenger has correct register
liveness information. PEI should leverage the backward register scavenger.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D137574
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The backward register scavenger has correct register
liveness information. PEI should leverage the backward register scavenger.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D137574
</pre>
</div>
</content>
</entry>
<entry>
<title>[RegisterInfoEmitter] Generate isConstantPhysReg(). NFCI</title>
<updated>2022-08-24T14:16:20+00:00</updated>
<author>
<name>Alex Richardson</name>
<email>alexrichardson@google.com</email>
</author>
<published>2022-08-24T13:42:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=38107171ed56601773a5ac8d753463fa26542440'/>
<id>38107171ed56601773a5ac8d753463fa26542440</id>
<content type='text'>
This commit moves the information on whether a register is constant into
the Tablegen files to allow generating the implementaiton of
isConstantPhysReg(). I've marked isConstantPhysReg() as final in this
generated file to ensure that changes are made to tablegen instead of
overriding this function, but if that turns out to be too restrictive,
we can remove the qualifier.

This should be pretty much NFC, but I did notice that e.g. the AMDGPU
generated file also includes the LO16/HI16 registers now.

The new isConstant flag will also be used by D131958 to ensure that
constant registers are marked as call-preserved.

Differential Revision: https://reviews.llvm.org/D131962
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit moves the information on whether a register is constant into
the Tablegen files to allow generating the implementaiton of
isConstantPhysReg(). I've marked isConstantPhysReg() as final in this
generated file to ensure that changes are made to tablegen instead of
overriding this function, but if that turns out to be too restrictive,
we can remove the qualifier.

This should be pretty much NFC, but I did notice that e.g. the AMDGPU
generated file also includes the LO16/HI16 registers now.

The new isConstant flag will also be used by D131958 to ensure that
constant registers are marked as call-preserved.

Differential Revision: https://reviews.llvm.org/D131962
</pre>
</div>
</content>
</entry>
</feed>
