[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaInstrFormats.td AlphaInstrInfo.td AlphaRegisterInfo.cpp
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Wed Jan 25 19:22:19 PST 2006
Changes in directory llvm/lib/Target/Alpha:
AlphaInstrFormats.td updated: 1.23 -> 1.24
AlphaInstrInfo.td updated: 1.107 -> 1.108
AlphaRegisterInfo.cpp updated: 1.32 -> 1.33
---
Log message:
allow R28 to be used for frame calculations without entirely removing it from circulation
---
Diffs of the changes: (+4 -21)
AlphaInstrFormats.td | 19 +------------------
AlphaInstrInfo.td | 4 ++--
AlphaRegisterInfo.cpp | 2 +-
3 files changed, 4 insertions(+), 21 deletions(-)
Index: llvm/lib/Target/Alpha/AlphaInstrFormats.td
diff -u llvm/lib/Target/Alpha/AlphaInstrFormats.td:1.23 llvm/lib/Target/Alpha/AlphaInstrFormats.td:1.24
--- llvm/lib/Target/Alpha/AlphaInstrFormats.td:1.23 Mon Jan 16 15:22:38 2006
+++ llvm/lib/Target/Alpha/AlphaInstrFormats.td Wed Jan 25 21:22:07 2006
@@ -45,6 +45,7 @@
let Pattern = pattern;
let isStore = store;
let isLoad = load;
+ let Defs = [R28]; //We may use this for frame index calculations, so reserve it here
bits<5> Ra;
bits<16> disp;
@@ -54,16 +55,7 @@
let Inst{20-16} = Rb;
let Inst{15-0} = disp;
}
-class MFormAlt<bits<6> opcode, string asmstr>
- : InstAlphaAlt<opcode, asmstr> {
- bits<5> Ra;
- bits<16> disp;
- bits<5> Rb;
- let Inst{25-21} = Ra;
- let Inst{20-16} = Rb;
- let Inst{15-0} = disp;
-}
class MfcForm<bits<6> opcode, bits<16> fc, string asmstr>
: InstAlpha<opcode, (ops GPRC:$RA), asmstr> {
bits<5> Ra;
@@ -85,15 +77,6 @@
}
//3.3.2
-let isBranch = 1, isTerminator = 1 in
-class BForm<bits<6> opcode, string asmstr>
- : InstAlpha<opcode, (ops GPRC:$RA, s21imm:$DISP), asmstr> {
- bits<5> Ra;
- bits<21> disp;
-
- let Inst{25-21} = Ra;
- let Inst{20-0} = disp;
-}
def target : Operand<OtherVT> {}
let isBranch = 1, isTerminator = 1 in
class BFormD<bits<6> opcode, string asmstr, list<dag> pattern>
Index: llvm/lib/Target/Alpha/AlphaInstrInfo.td
diff -u llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.107 llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.108
--- llvm/lib/Target/Alpha/AlphaInstrInfo.td:1.107 Mon Jan 23 15:51:33 2006
+++ llvm/lib/Target/Alpha/AlphaInstrInfo.td Wed Jan 25 21:22:07 2006
@@ -576,8 +576,8 @@
//load address, rellocated gpdist form
let OperandList = (ops GPRC:$RA, s16imm:$DISP, GPRC:$RB, s16imm:$NUM) in {
-def LDAg : MFormAlt<0x08, "lda $RA,0($RB)\t\t!gpdisp!$NUM">; //Load address
-def LDAHg : MFormAlt<0x09, "ldah $RA,0($RB)\t\t!gpdisp!$NUM">; //Load address
+def LDAg : MForm<0x08, 0, 1, "lda $RA,0($RB)\t\t!gpdisp!$NUM", []>; //Load address
+def LDAHg : MForm<0x09, 0, 1, "ldah $RA,0($RB)\t\t!gpdisp!$NUM", []>; //Load address
}
//Load quad, rellocated literal form
Index: llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp
diff -u llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.32 llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.33
--- llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp:1.32 Tue Jan 24 19:51:08 2006
+++ llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp Wed Jan 25 21:22:07 2006
@@ -257,7 +257,7 @@
" for stack size: " << MF.getFrameInfo()->getStackSize() << "\n");
if (Offset > IMM_HIGH || Offset < IMM_LOW) {
- std::cerr << "Unconditionally using R28 for evil purposes\n";
+ DEBUG(std::cerr << "Unconditionally using R28 for evil purposes Offset: " << Offset << "\n");
//so in this case, we need to use a temporary register, and move the original
//inst off the SP/FP
//fix up the old:
More information about the llvm-commits
mailing list