MipsISelLowering.h revision bf6a77b98715012c0fa3bdbb3ba55fa7c24c1548
19258b6bc66e09368ada54001f619d53b4fc976d5ager@chromium.org//===-- MipsISelLowering.h - Mips DAG Lowering Interface --------*- C++ -*-===// 29a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// 39a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// The LLVM Compiler Infrastructure 49a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// 59a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// This file is distributed under the University of Illinois Open Source 69a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// License. See LICENSE.TXT for details. 79a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// 89a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com//===----------------------------------------------------------------------===// 99a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// 109a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// This file defines the interfaces that Mips uses to lower LLVM code into a 119a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// selection DAG. 129a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com// 139a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com//===----------------------------------------------------------------------===// 149a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 159a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com#ifndef MipsISELLOWERING_H 169a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com#define MipsISELLOWERING_H 179a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 189a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com#include "Mips.h" 199a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com#include "MipsSubtarget.h" 209a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com#include "llvm/CodeGen/CallingConvLower.h" 219a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com#include "llvm/CodeGen/SelectionDAG.h" 229a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com#include "llvm/Target/TargetLowering.h" 239a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com#include <deque> 249a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 259a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.comnamespace llvm { 269a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com namespace MipsISD { 279a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com enum NodeType { 289a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // Start the numbering from where ISD NodeType finishes. 299a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com FIRST_NUMBER = ISD::BUILTIN_OP_END, 309a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 319a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // Jump and link (call) 329a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com JmpLink, 33b3284ad36ee358a35b81379ad1c449e4f8021362kasperl@chromium.org 349a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // Tail call 359a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com TailCall, 369a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 379a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // Get the Higher 16 bits from a 32-bit immediate 389a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // No relation with Mips Hi register 39b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org Hi, 40b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org 419a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // Get the Lower 16 bits from a 32-bit immediate 429a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // No relation with Mips Lo register 439a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com Lo, 449a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 455a8ca6c70c6fc9716f18f6223c98d1fef5752cf6kasperl@chromium.org // Handle gp_rel (small data/bss sections) relocation. 469a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com GPRel, 479a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 489a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // Thread Pointer 493a37e9b96c768f6b5b6b09542e1cb1a1ece7a022ager@chromium.org ThreadPointer, 503a37e9b96c768f6b5b6b09542e1cb1a1ece7a022ager@chromium.org 519a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // Floating Point Branch Conditional 529a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com FPBrcond, 539a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 549a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // Floating Point Compare 5565dad4b091d2925543c6326db635d0f7cf9e1edcager@chromium.org FPCmp, 569a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 579a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // Floating Point Conditional Moves 589a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com CMovFP_T, 599a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com CMovFP_F, 609a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 619a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // Floating Point Rounding 629a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com FPRound, 639a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 649a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // Return 659a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com Ret, 669a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 679a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // MAdd/Sub nodes 689a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MAdd, 699a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MAddu, 709a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MSub, 719a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MSubu, 729a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 739a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // DivRem(u) 749a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com DivRem, 759a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com DivRemU, 769a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 779a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com BuildPairF64, 789a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com ExtractElementF64, 799a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 809a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com Wrapper, 819a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 829a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com DynAlloc, 839a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 849a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com Sync, 859a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 869a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com Ext, 879a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com Ins, 889a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 899a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // EXTR.W instrinsic nodes. 909a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com EXTP, 919a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com EXTPDP, 929a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com EXTR_S_H, 939a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com EXTR_W, 949a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com EXTR_R_W, 959a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com EXTR_RS_W, 969a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com SHILO, 979a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MTHLIP, 989a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 999a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // DPA.W intrinsic nodes. 1009a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MULSAQ_S_W_PH, 1019a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MAQ_S_W_PHL, 1029a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MAQ_S_W_PHR, 1039a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MAQ_SA_W_PHL, 1049a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MAQ_SA_W_PHR, 1059a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com DPAU_H_QBL, 1069a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com DPAU_H_QBR, 1079a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com DPSU_H_QBL, 1089a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com DPSU_H_QBR, 1099a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com DPAQ_S_W_PH, 1109a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com DPSQ_S_W_PH, 1119a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com DPAQ_SA_L_W, 1129a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com DPSQ_SA_L_W, 1139a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com DPA_W_PH, 1149a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com DPS_W_PH, 1159a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com DPAQX_S_W_PH, 1169a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com DPAQX_SA_W_PH, 1179a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com DPAX_W_PH, 1189a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com DPSX_W_PH, 1199a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com DPSQX_S_W_PH, 1209a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com DPSQX_SA_W_PH, 1219a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MULSA_W_PH, 1229a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 1239a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MULT, 1249a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MULTU, 1259a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MADD_DSP, 1269a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MADDU_DSP, 1279a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MSUB_DSP, 1289a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MSUBU_DSP, 1299a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 1309a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // Load/Store Left/Right nodes. 1319a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com LWL = ISD::FIRST_TARGET_MEMORY_OPCODE, 1329a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com LWR, 1339a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com SWL, 1349a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com SWR, 1359a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com LDL, 1369a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com LDR, 1379a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com SDL, 1389a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com SDR 1399a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com }; 1409a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com } 1419a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 1429a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com //===--------------------------------------------------------------------===// 1439a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // TargetLowering Implementation 1445a8ca6c70c6fc9716f18f6223c98d1fef5752cf6kasperl@chromium.org //===--------------------------------------------------------------------===// 1455a8ca6c70c6fc9716f18f6223c98d1fef5752cf6kasperl@chromium.org class MipsFunctionInfo; 1465a8ca6c70c6fc9716f18f6223c98d1fef5752cf6kasperl@chromium.org 1475a8ca6c70c6fc9716f18f6223c98d1fef5752cf6kasperl@chromium.org class MipsTargetLowering : public TargetLowering { 1489a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com public: 1499a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com explicit MipsTargetLowering(MipsTargetMachine &TM); 1509a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 1515a8ca6c70c6fc9716f18f6223c98d1fef5752cf6kasperl@chromium.org virtual MVT getShiftAmountTy(EVT LHSTy) const { return MVT::i32; } 1525a8ca6c70c6fc9716f18f6223c98d1fef5752cf6kasperl@chromium.org 1539a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com virtual bool allowsUnalignedMemoryAccesses (EVT VT, bool *Fast) const; 1549a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 1559a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com virtual void LowerOperationWrapper(SDNode *N, 1569a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com SmallVectorImpl<SDValue> &Results, 1579a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com SelectionDAG &DAG) const; 1589a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 1599a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// LowerOperation - Provide custom lowering hooks for some operations. 1609a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const; 1619a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 1629a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// ReplaceNodeResults - Replace the results of node with an illegal result 1639a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// type with new values built out of custom code. 1649a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// 1659a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com virtual void ReplaceNodeResults(SDNode *N, SmallVectorImpl<SDValue>&Results, 1669a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com SelectionDAG &DAG) const; 1679a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 1689a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// getTargetNodeName - This method returns the name of a target specific 1699a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // DAG node. 1709a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com virtual const char *getTargetNodeName(unsigned Opcode) const; 1719085a016223a6b72bf580d5781c93ec7b9e54422ager@chromium.org 1729085a016223a6b72bf580d5781c93ec7b9e54422ager@chromium.org /// getSetCCResultType - get the ISD::SETCC result ValueType 1739085a016223a6b72bf580d5781c93ec7b9e54422ager@chromium.org EVT getSetCCResultType(EVT VT) const; 1749085a016223a6b72bf580d5781c93ec7b9e54422ager@chromium.org 1759085a016223a6b72bf580d5781c93ec7b9e54422ager@chromium.org virtual SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const; 1769085a016223a6b72bf580d5781c93ec7b9e54422ager@chromium.org private: 1779085a016223a6b72bf580d5781c93ec7b9e54422ager@chromium.org 1789085a016223a6b72bf580d5781c93ec7b9e54422ager@chromium.org void setMips16HardFloatLibCalls(); 1799085a016223a6b72bf580d5781c93ec7b9e54422ager@chromium.org 1809085a016223a6b72bf580d5781c93ec7b9e54422ager@chromium.org /// ByValArgInfo - Byval argument information. 1819a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com struct ByValArgInfo { 1829a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com unsigned FirstIdx; // Index of the first register used. 1839a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com unsigned NumRegs; // Number of registers used for this argument. 1849a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com unsigned Address; // Offset of the stack area used to pass this argument. 1859a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 1869085a016223a6b72bf580d5781c93ec7b9e54422ager@chromium.org ByValArgInfo() : FirstIdx(0), NumRegs(0), Address(0) {} 1879a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com }; 1889a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 1899a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// MipsCC - This class provides methods used to analyze formal and call 1909a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// arguments and inquire about calling convention information. 1919a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com class MipsCC { 1929a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com public: 1939a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MipsCC(CallingConv::ID CallConv, bool IsVarArg, bool IsO32, 1949a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com CCState &Info); 1959a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 1969a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com void analyzeCallOperands(const SmallVectorImpl<ISD::OutputArg> &Outs); 1979a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com void analyzeFormalArguments(const SmallVectorImpl<ISD::InputArg> &Ins); 1989a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com void handleByValArg(unsigned ValNo, MVT ValVT, MVT LocVT, 1999a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com CCValAssign::LocInfo LocInfo, 2009a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com ISD::ArgFlagsTy ArgFlags); 2019a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2029a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com const CCState &getCCInfo() const { return CCInfo; } 2039a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2049a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// hasByValArg - Returns true if function has byval arguments. 2059a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com bool hasByValArg() const { return !ByValArgs.empty(); } 2069a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2079a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// useRegsForByval - Returns true if the calling convention allows the 2089a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// use of registers to pass byval arguments. 2099a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com bool useRegsForByval() const { return UseRegsForByval; } 2109a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2119a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// regSize - Size (in number of bits) of integer registers. 2129a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com unsigned regSize() const { return RegSize; } 2139a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2149a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// numIntArgRegs - Number of integer registers available for calls. 2159a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com unsigned numIntArgRegs() const { return NumIntArgRegs; } 2169a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2179a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// reservedArgArea - The size of the area the caller reserves for 218b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org /// register arguments. This is 16-byte if ABI is O32. 219b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org unsigned reservedArgArea() const { return ReservedArgArea; } 2209a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2219a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// intArgRegs - Pointer to array of integer registers. 2229a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com const uint16_t *intArgRegs() const { return IntArgRegs; } 223b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org 224b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org typedef SmallVector<ByValArgInfo, 2>::const_iterator byval_iterator; 2259a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com byval_iterator byval_begin() const { return ByValArgs.begin(); } 2269a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com byval_iterator byval_end() const { return ByValArgs.end(); } 2279a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2287be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org private: 2297be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org void allocateRegs(ByValArgInfo &ByVal, unsigned ByValSize, 230b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org unsigned Align); 2319a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2329a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com CCState &CCInfo; 233b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org bool UseRegsForByval; 2347be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org unsigned RegSize; 2357be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org unsigned NumIntArgRegs; 2369a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com unsigned ReservedArgArea; 2379a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com const uint16_t *IntArgRegs, *ShadowRegs; 238b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org SmallVector<ByValArgInfo, 2> ByValArgs; 2397be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org llvm::CCAssignFn *FixedFn, *VarFn; 2407be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org }; 2417be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org 2427be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org // Subtarget Info 2437be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org const MipsSubtarget *Subtarget; 2447be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org 2457be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org bool HasMips64, IsN64, IsO32; 2467be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org 2473a37e9b96c768f6b5b6b09542e1cb1a1ece7a022ager@chromium.org // Lower Operand helpers 2487be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org SDValue LowerCallResult(SDValue Chain, SDValue InFlag, 2497be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org CallingConv::ID CallConv, bool isVarArg, 2507be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org const SmallVectorImpl<ISD::InputArg> &Ins, 2517be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org DebugLoc dl, SelectionDAG &DAG, 2527be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org SmallVectorImpl<SDValue> &InVals) const; 2537be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org 2547be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org // Lower Operand specifics 2557be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org SDValue LowerBRCOND(SDValue Op, SelectionDAG &DAG) const; 2567be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org SDValue LowerConstantPool(SDValue Op, SelectionDAG &DAG) const; 2577be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org SDValue LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const; 2587be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org SDValue LowerBlockAddress(SDValue Op, SelectionDAG &DAG) const; 2597be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org SDValue LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const; 2607be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org SDValue LowerJumpTable(SDValue Op, SelectionDAG &DAG) const; 2617be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org SDValue LowerSELECT(SDValue Op, SelectionDAG &DAG) const; 2627be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org SDValue LowerSELECT_CC(SDValue Op, SelectionDAG &DAG) const; 2637be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org SDValue LowerSETCC(SDValue Op, SelectionDAG &DAG) const; 2647be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org SDValue LowerVASTART(SDValue Op, SelectionDAG &DAG) const; 2657be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org SDValue LowerFCOPYSIGN(SDValue Op, SelectionDAG &DAG) const; 2667be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org SDValue LowerFABS(SDValue Op, SelectionDAG &DAG) const; 2677be3c996bea370e151c9fe4ecf7f779cdc5f87adkasperl@chromium.org SDValue LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) const; 2689a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com SDValue LowerRETURNADDR(SDValue Op, SelectionDAG &DAG) const; 2699a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com SDValue LowerMEMBARRIER(SDValue Op, SelectionDAG& DAG) const; 2705a8ca6c70c6fc9716f18f6223c98d1fef5752cf6kasperl@chromium.org SDValue LowerATOMIC_FENCE(SDValue Op, SelectionDAG& DAG) const; 2715a8ca6c70c6fc9716f18f6223c98d1fef5752cf6kasperl@chromium.org SDValue LowerShiftLeftParts(SDValue Op, SelectionDAG& DAG) const; 2725a8ca6c70c6fc9716f18f6223c98d1fef5752cf6kasperl@chromium.org SDValue LowerShiftRightParts(SDValue Op, SelectionDAG& DAG, 2735a8ca6c70c6fc9716f18f6223c98d1fef5752cf6kasperl@chromium.org bool IsSRA) const; 2743a37e9b96c768f6b5b6b09542e1cb1a1ece7a022ager@chromium.org SDValue LowerLOAD(SDValue Op, SelectionDAG &DAG) const; 2755a8ca6c70c6fc9716f18f6223c98d1fef5752cf6kasperl@chromium.org SDValue LowerSTORE(SDValue Op, SelectionDAG &DAG) const; 2765a8ca6c70c6fc9716f18f6223c98d1fef5752cf6kasperl@chromium.org SDValue LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) const; 2779a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com SDValue LowerINTRINSIC_W_CHAIN(SDValue Op, SelectionDAG &DAG) const; 2789a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com SDValue LowerADD(SDValue Op, SelectionDAG &DAG) const; 2799a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2809a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// IsEligibleForTailCallOptimization - Check whether the call is eligible 2819a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// for tail call optimization. 2829a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com bool IsEligibleForTailCallOptimization(const MipsCC &MipsCCInfo, 2839a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com unsigned NextStackOffset, 2849a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com const MipsFunctionInfo& FI) const; 2859a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2869a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// copyByValArg - Copy argument registers which were used to pass a byval 2879a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// argument to the stack. Create a stack frame object for the byval 2889a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// argument. 289b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org void copyByValRegs(SDValue Chain, DebugLoc DL, 290b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org std::vector<SDValue> &OutChains, SelectionDAG &DAG, 2919a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com const ISD::ArgFlagsTy &Flags, 2929a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com SmallVectorImpl<SDValue> &InVals, 2939a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com const Argument *FuncArg, 294b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org const MipsCC &CC, const ByValArgInfo &ByVal) const; 2959a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 2969a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// passByValArg - Pass a byval argument in registers or on stack. 2979a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com void passByValArg(SDValue Chain, DebugLoc DL, 2989a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com std::deque< std::pair<unsigned, SDValue> > &RegsToPass, 299b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org SmallVector<SDValue, 8> &MemOpChains, SDValue StackPtr, 300b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org MachineFrameInfo *MFI, SelectionDAG &DAG, SDValue Arg, 3019a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com const MipsCC &CC, const ByValArgInfo &ByVal, 3029a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com const ISD::ArgFlagsTy &Flags, bool isLittle) const; 3039a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 304b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org /// writeVarArgRegs - Write variable function arguments passed in registers 3059a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// to the stack. Also create a stack frame object for the first variable 3069a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// argument. 3079a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com void writeVarArgRegs(std::vector<SDValue> &OutChains, const MipsCC &CC, 3089a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com SDValue Chain, DebugLoc DL, SelectionDAG &DAG) const; 309b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org 310b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org virtual SDValue 3119a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com LowerFormalArguments(SDValue Chain, 3129a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com CallingConv::ID CallConv, bool isVarArg, 3139a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com const SmallVectorImpl<ISD::InputArg> &Ins, 314b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org DebugLoc dl, SelectionDAG &DAG, 3159a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com SmallVectorImpl<SDValue> &InVals) const; 3169a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 3179a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com SDValue passArgOnStack(SDValue StackPtr, unsigned Offset, SDValue Chain, 3189a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com SDValue Arg, DebugLoc DL, bool IsTailCall, 3199a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com SelectionDAG &DAG) const; 320b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org 321b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org virtual SDValue 3229a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com LowerCall(TargetLowering::CallLoweringInfo &CLI, 3239a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com SmallVectorImpl<SDValue> &InVals) const; 3249a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 325b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org virtual bool 3269a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com CanLowerReturn(CallingConv::ID CallConv, MachineFunction &MF, 3279a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com bool isVarArg, 3289a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com const SmallVectorImpl<ISD::OutputArg> &Outs, 3299a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com LLVMContext &Context) const; 3309a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 331b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org virtual SDValue 332b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org LowerReturn(SDValue Chain, 3339a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com CallingConv::ID CallConv, bool isVarArg, 3349a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com const SmallVectorImpl<ISD::OutputArg> &Outs, 3359a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com const SmallVectorImpl<SDValue> &OutVals, 336b912362e2b2e704d09faac4290e027fd744bf587kasperl@chromium.org DebugLoc dl, SelectionDAG &DAG) const; 3379a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 3389a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com virtual MachineBasicBlock * 3399a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com EmitInstrWithCustomInserter(MachineInstr *MI, 3409a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MachineBasicBlock *MBB) const; 3419a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 3429a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com // Inline asm support 3439a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com ConstraintType getConstraintType(const std::string &Constraint) const; 3449a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 3459a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// Examine constraint string and operand type and determine a weight value. 3469a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// The operand object must already have been set up with the operand type. 3479a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com ConstraintWeight getSingleConstraintMatchWeight( 3489a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com AsmOperandInfo &info, const char *constraint) const; 3499a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 3509a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com std::pair<unsigned, const TargetRegisterClass*> 3519a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com getRegForInlineAsmConstraint(const std::string &Constraint, 3529a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com EVT VT) const; 3539a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 3549a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// LowerAsmOperandForConstraint - Lower the specified operand into the Ops 3559a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// vector. If it is invalid, don't add anything to Ops. If hasMemory is 3569a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// true it means one of the asm constraint of the inline asm instruction 3579a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// being processed is 'm'. 3589a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com virtual void LowerAsmOperandForConstraint(SDValue Op, 3599a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com std::string &Constraint, 3609a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com std::vector<SDValue> &Ops, 3619a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com SelectionDAG &DAG) const; 3629a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 3639a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com virtual bool isLegalAddressingMode(const AddrMode &AM, Type *Ty) const; 3649a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 3659a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const; 3669a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 3679a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com virtual EVT getOptimalMemOpType(uint64_t Size, unsigned DstAlign, 3689a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com unsigned SrcAlign, 3699a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com bool IsMemset, bool ZeroMemset, 3709a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com bool MemcpyStrSrc, 3719a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MachineFunction &MF) const; 3729a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 3739a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com /// isFPImmLegal - Returns true if the target can instruction select the 37471affb54842da76b24f0bb3184e9f0960523f89dkasperl@chromium.org /// specified FP immediate natively. If false, the legalizer will 37571affb54842da76b24f0bb3184e9f0960523f89dkasperl@chromium.org /// materialize the FP immediate as a load from a constant pool. 3769a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com virtual bool isFPImmLegal(const APFloat &Imm, EVT VT) const; 3779a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 3789a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com virtual unsigned getJumpTableEncoding() const; 3799a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 3809a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MachineBasicBlock *EmitBPOSGE32(MachineInstr *MI, 3819a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MachineBasicBlock *BB) const; 3829a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MachineBasicBlock *EmitAtomicBinary(MachineInstr *MI, MachineBasicBlock *BB, 3839a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com unsigned Size, unsigned BinOpcode, bool Nand = false) const; 3849a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MachineBasicBlock *EmitAtomicBinaryPartword(MachineInstr *MI, 3859a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MachineBasicBlock *BB, unsigned Size, unsigned BinOpcode, 3869a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com bool Nand = false) const; 3879a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MachineBasicBlock *EmitAtomicCmpSwap(MachineInstr *MI, 3889a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MachineBasicBlock *BB, unsigned Size) const; 3899a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MachineBasicBlock *EmitAtomicCmpSwapPartword(MachineInstr *MI, 3909a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com MachineBasicBlock *BB, unsigned Size) const; 3919a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com }; 3929a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com} 3939a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com 3949a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com#endif // MipsISELLOWERING_H 3959a4089a092cad9ff23b6416b92cd5d818dc101d1mads.s.ager@gmail.com