mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
Add comments to describe what these functions actually do.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9370 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -17,6 +17,7 @@
|
|||||||
#include "llvm/DerivedTypes.h"
|
#include "llvm/DerivedTypes.h"
|
||||||
#include "SparcInternals.h"
|
#include "SparcInternals.h"
|
||||||
|
|
||||||
|
// Choose load instruction opcode based on type of value
|
||||||
inline MachineOpCode
|
inline MachineOpCode
|
||||||
ChooseLoadInstruction(const Type *DestTy)
|
ChooseLoadInstruction(const Type *DestTy)
|
||||||
{
|
{
|
||||||
@ -39,6 +40,7 @@ ChooseLoadInstruction(const Type *DestTy)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Choose store instruction opcode based on type of value
|
||||||
inline MachineOpCode
|
inline MachineOpCode
|
||||||
ChooseStoreInstruction(const Type *DestTy)
|
ChooseStoreInstruction(const Type *DestTy)
|
||||||
{
|
{
|
||||||
@ -86,6 +88,11 @@ ChooseAddInstructionByType(const Type* resultType)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Because the Sparc instruction selector likes to re-write operands to
|
||||||
|
// instructions, making them change from a Value* (virtual register) to a
|
||||||
|
// Constant* (making an immediate field), we need to change the opcode from a
|
||||||
|
// register-based instruction to an immediate-based instruction, hence this
|
||||||
|
// mapping.
|
||||||
static unsigned
|
static unsigned
|
||||||
convertOpcodeFromRegToImm(unsigned Opcode) {
|
convertOpcodeFromRegToImm(unsigned Opcode) {
|
||||||
switch (Opcode) {
|
switch (Opcode) {
|
||||||
|
Reference in New Issue
Block a user