llvm-project/llvm/lib/Target/Sparc
Maksim Panchenko bed9efed71 [MCDisassembler] Disambiguate Size parameter in tryAddingSymbolicOperand()
MCSymbolizer::tryAddingSymbolicOperand() overloaded the Size parameter
to specify either the instruction size or the operand size depending on
the architecture. However, for proper symbolic disassembly on X86, we
need to know both sizes, as an instruction can have two operands, and
the instruction size cannot be reliably calculated based on the operand
offset and its size. Hence, split Size into OpSize and InstSize.

For X86, the new interface allows to fix a couple of issues:
  * Correctly adjust the value of PC-relative operands.
  * Set operand size to zero when the operand is specified implicitly.

Differential Revision: https://reviews.llvm.org/D126101
2022-05-25 13:44:32 -07:00
..
AsmParser Cleanup MCParser headers 2022-02-11 10:39:29 +01:00
Disassembler [MCDisassembler] Disambiguate Size parameter in tryAddingSymbolicOperand() 2022-05-25 13:44:32 -07:00
MCTargetDesc [NFC][MC] remove unused argument `MCRegisterInfo` in `MCCodeEmitter` 2022-02-16 13:10:09 +08:00
TargetInfo
CMakeLists.txt
DelaySlotFiller.cpp [Sparc] Add tail call support 2022-03-08 13:50:54 +01:00
LeonFeatures.td
LeonPasses.cpp [llvm] Use range-based for loops (NFC) 2021-11-22 20:33:28 -08:00
LeonPasses.h
README.txt
Sparc.h
Sparc.td
SparcAsmPrinter.cpp
SparcCallingConv.td [Sparc] Add tail call support 2022-03-08 13:50:54 +01:00
SparcFrameLowering.cpp [Sparc] Add tail call support 2022-03-08 13:50:54 +01:00
SparcFrameLowering.h
SparcISelDAGToDAG.cpp [NFC] Use Register instead of unsigned 2022-01-19 20:17:04 +08:00
SparcISelLowering.cpp [Sparc] Make sure that we really don't emit quad-precision unless the "hard-quad-float" feature is available 2022-05-18 20:11:58 -04:00
SparcISelLowering.h [Sparc] Add tail call support 2022-03-08 13:50:54 +01:00
SparcInstr64Bit.td [Sparc] Make sure that we really don't emit quad-precision unless the "hard-quad-float" feature is available 2022-05-18 20:11:58 -04:00
SparcInstrAliases.td
SparcInstrFormats.td
SparcInstrInfo.cpp
SparcInstrInfo.h
SparcInstrInfo.td [Sparc] Make sure that we really don't emit quad-precision unless the "hard-quad-float" feature is available 2022-05-18 20:11:58 -04:00
SparcInstrVIS.td
SparcMCInstLower.cpp [Target] Use range-based for loops (NFC) 2021-11-27 11:16:19 -08:00
SparcMachineFunctionInfo.cpp
SparcMachineFunctionInfo.h
SparcRegisterInfo.cpp
SparcRegisterInfo.h
SparcRegisterInfo.td
SparcSchedule.td
SparcSubtarget.cpp
SparcSubtarget.h
SparcTargetMachine.cpp [llvm] Use = default (NFC) 2022-02-06 22:18:35 -08:00
SparcTargetMachine.h
SparcTargetObjectFile.cpp
SparcTargetObjectFile.h [llvm] Use = default (NFC) 2022-02-06 22:18:35 -08:00

README.txt

To-do
-----

* Keep the address of the constant pool in a register instead of forming its
  address all of the time.
* We can fold small constant offsets into the %hi/%lo references to constant
  pool addresses as well.
* When in V9 mode, register allocate %icc[0-3].
* Add support for isel'ing UMUL_LOHI instead of marking it as Expand.
* Emit the 'Branch on Integer Register with Prediction' instructions.  It's
  not clear how to write a pattern for this though:

float %t1(int %a, int* %p) {
        %C = seteq int %a, 0
        br bool %C, label %T, label %F
T:
        store int 123, int* %p
        br label %F
F:
        ret float undef
}

codegens to this:

t1:
        save -96, %o6, %o6
1)      subcc %i0, 0, %l0
1)      bne .LBBt1_2    ! F
        nop
.LBBt1_1:       ! T
        or %g0, 123, %l0
        st %l0, [%i1]
.LBBt1_2:       ! F
        restore %g0, %g0, %g0
        retl
        nop

1) should be replaced with a brz in V9 mode.

* Same as above, but emit conditional move on register zero (p192) in V9
  mode.  Testcase:

int %t1(int %a, int %b) {
        %C = seteq int %a, 0
        %D = select bool %C, int %a, int %b
        ret int %D
}

* Emit MULX/[SU]DIVX instructions in V9 mode instead of fiddling
  with the Y register, if they are faster.

* Codegen bswap(load)/store(bswap) -> load/store ASI

* Implement frame pointer elimination, e.g. eliminate save/restore for
  leaf fns.
* Fill delay slots

* Use %g0 directly to materialize 0. No instruction is required.