diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2006-01-26 03:22:07 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2006-01-26 03:22:07 +0000 |
commit | cd1544eede1575a269a35ca465c26febb44e9c54 (patch) | |
tree | 0820749f5fcbdb5aa752290f7f1add65d0987b1c | |
parent | 67caa39e4c0ee978edc235c52af6261684c29c3a (diff) |
allow R28 to be used for frame calculations without entirely removing it from circulation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25639 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/Alpha/AlphaInstrFormats.td | 19 | ||||
-rw-r--r-- | lib/Target/Alpha/AlphaInstrInfo.td | 4 | ||||
-rw-r--r-- | lib/Target/Alpha/AlphaRegisterInfo.cpp | 2 |
3 files changed, 4 insertions, 21 deletions
diff --git a/lib/Target/Alpha/AlphaInstrFormats.td b/lib/Target/Alpha/AlphaInstrFormats.td index 88a405c509..ac5481aed6 100644 --- a/lib/Target/Alpha/AlphaInstrFormats.td +++ b/lib/Target/Alpha/AlphaInstrFormats.td @@ -45,6 +45,7 @@ class MForm<bits<6> opcode, bit store, bit load, string asmstr, list<dag> patter 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 @@ class MForm<bits<6> opcode, bit store, bit load, string asmstr, list<dag> patter 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 @@ class MbrForm<bits<6> opcode, bits<2> TB, dag OL, string asmstr> : InstAlpha<opc } //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> diff --git a/lib/Target/Alpha/AlphaInstrInfo.td b/lib/Target/Alpha/AlphaInstrInfo.td index 61342979de..fa0310fcd1 100644 --- a/lib/Target/Alpha/AlphaInstrInfo.td +++ b/lib/Target/Alpha/AlphaInstrInfo.td @@ -576,8 +576,8 @@ def : Pat<(truncstore GPRC:$DATA, GPRC:$addr, i8), //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 diff --git a/lib/Target/Alpha/AlphaRegisterInfo.cpp b/lib/Target/Alpha/AlphaRegisterInfo.cpp index fb93922aec..7bf9bd7c28 100644 --- a/lib/Target/Alpha/AlphaRegisterInfo.cpp +++ b/lib/Target/Alpha/AlphaRegisterInfo.cpp @@ -257,7 +257,7 @@ AlphaRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II) const { " 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: |