X86FloatingPoint.cpp (194612) | X86FloatingPoint.cpp (195340) |
---|---|
1//===-- X86FloatingPoint.cpp - Floating point Reg -> Stack converter ------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 976 unchanged lines hidden (view full) --- 985 986 // Swap stack slot contents. 987 assert(RegMap[RegOnTop] < StackTop); 988 std::swap(Stack[RegMap[RegOnTop]], Stack[StackTop-1]); 989 break; 990 } 991 case X86::FpSET_ST0_32: 992 case X86::FpSET_ST0_64: | 1//===-- X86FloatingPoint.cpp - Floating point Reg -> Stack converter ------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 976 unchanged lines hidden (view full) --- 985 986 // Swap stack slot contents. 987 assert(RegMap[RegOnTop] < StackTop); 988 std::swap(Stack[RegMap[RegOnTop]], Stack[StackTop-1]); 989 break; 990 } 991 case X86::FpSET_ST0_32: 992 case X86::FpSET_ST0_64: |
993 case X86::FpSET_ST0_80: | 993 case X86::FpSET_ST0_80: { 994 unsigned Op0 = getFPReg(MI->getOperand(0)); 995 |
994 // FpSET_ST0_80 is generated by copyRegToReg for both function return 995 // and inline assembly with the "st" constrain. In the latter case, | 996 // FpSET_ST0_80 is generated by copyRegToReg for both function return 997 // and inline assembly with the "st" constrain. In the latter case, |
996 // it is possible for FP0 to be alive after this instruction. 997 if (!MI->killsRegister(X86::FP0)) { 998 // Duplicate ST0 999 duplicateToTop(0, 0, I); | 998 // it is possible for ST(0) to be alive after this instruction. 999 if (!MI->killsRegister(X86::FP0 + Op0)) { 1000 // Duplicate Op0 1001 duplicateToTop(0, 7 /*temp register*/, I); 1002 } else { 1003 moveToTop(Op0, I); |
1000 } 1001 --StackTop; // "Forget" we have something on the top of stack! 1002 break; | 1004 } 1005 --StackTop; // "Forget" we have something on the top of stack! 1006 break; |
1007 } |
|
1003 case X86::FpSET_ST1_32: 1004 case X86::FpSET_ST1_64: 1005 case X86::FpSET_ST1_80: 1006 // StackTop can be 1 if a FpSET_ST0_* was before this. Exchange them. 1007 if (StackTop == 1) { 1008 BuildMI(*MBB, I, dl, TII->get(X86::XCH_F)).addReg(X86::ST1); 1009 NumFXCH++; 1010 StackTop = 0; --- 182 unchanged lines hidden --- | 1008 case X86::FpSET_ST1_32: 1009 case X86::FpSET_ST1_64: 1010 case X86::FpSET_ST1_80: 1011 // StackTop can be 1 if a FpSET_ST0_* was before this. Exchange them. 1012 if (StackTop == 1) { 1013 BuildMI(*MBB, I, dl, TII->get(X86::XCH_F)).addReg(X86::ST1); 1014 NumFXCH++; 1015 StackTop = 0; --- 182 unchanged lines hidden --- |