C-Breeze
C Compiler Infrastructure

[ Project home page]
Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

LIR Class Reference

#include <LIR.h>

List of all members.

Static Public Member Functions

LirInstNOP ()
LirInstConvertType (typeNode *sourceType, Register source, declNode *pDeclSource, typeNode *destType, Register &dest, declNode *pDeclDest)
LirInstLoad (typeNode *typeToLoad, Register &dest_register, declNode *pDeclDest, Register base_reg, declNode *pDeclBase, constant offset, declNode *pDeclOffset)
LirInstLoadImmediate (typeNode *typeToLoad, Register &dest_register, declNode *pDeclDest, constant con)
LirInstLoadStatic (typeNode *typeToLoad, Register &dest, declNode *pDeclDest, string staticLabel, declNode *declStatic, constant offset, declNode *pDeclOffset)
LirInstStore (typeNode *typeToStore, Register source_register, declNode *pDeclSrc, Register base_reg, declNode *pDeclBase, constant offset, declNode *pDeclOffset)
LirInstStoreStatic (typeNode *typeToStore, Register source_register, declNode *pDeclSrc, string staticLabel, declNode *staticDecl, constant offset, declNode *pDeclOffset)
LirInstGetEffectiveAddress (Register &dest_register, declNode *pDeclDest, Register base_reg, declNode *pDeclBase, constant offset, declNode *pDeclOffset)
LirInstGetGlobalAddress (Register &dest_register, declNode *pDeclDest, string staticLabel, declNode *staticDecl, constant offset, declNode *pDeclOffset)
LirInstMove (Register dest, declNode *pDeclDest, Register source, declNode *pDeclSrc)
LirInstAdd (typeNode *destType, Register &dest_reg, declNode *pDeclDest, Register opnd1, declNode *pDeclOp1, reg_or_const opnd2, declNode *pDeclOp2)
LirInstSub (typeNode *destType, Register &dest_reg, declNode *pDeclDest, Register opnd1, declNode *pDeclOp1, reg_or_const opnd2, declNode *pDeclOp2)
LirInstMul (typeNode *destType, Register &dest_reg, declNode *pDeclDest, Register opnd1, declNode *pDeclOp1, reg_or_const opnd2, declNode *pDeclOp2)
LirInstDiv (typeNode *destType, Register &dest_reg, declNode *pDeclDest, Register opnd1, declNode *pDeclOp1, reg_or_const opnd2, declNode *pDeclOp2)
LirInstMod (typeNode *destType, Register &dest_reg, declNode *pDeclDest, Register opnd1, declNode *pDeclOp1, reg_or_const opnd2, declNode *pDeclOp2)
LirInstNeg (typeNode *destType, Register &dest_reg, declNode *pDeclDest, Register opnd1, declNode *pDeclOp1)
LirInstBitwiseOR (typeNode *destType, Register &dest_reg, declNode *pDeclDest, Register opnd1, declNode *pDeclOp1, reg_or_const opnd2, declNode *pDeclOp2)
LirInstBitwiseAND (typeNode *destType, Register &dest_reg, declNode *pDeclDest, Register opnd1, declNode *pDeclOp1, reg_or_const opnd2, declNode *pDeclOp2)
LirInstBitwiseXOR (typeNode *destType, Register &dest_reg, declNode *pDeclDest, Register opnd1, declNode *pDeclOp1, reg_or_const opnd2, declNode *pDeclOp2)
LirInstBitwiseNOT (typeNode *destType, Register &dest_reg, declNode *pDeclDest, Register opnd1, declNode *pDeclOp1)
LirInstBitwiseShiftLeft (typeNode *destType, Register &dest_reg, declNode *pDeclDest, Register opnd1, declNode *pDeclOp1, reg_or_const bitCnt, declNode *pDeclBitCnt)
LirInstBitwiseShiftRight (typeNode *destType, Register &dest_reg, declNode *pDeclDest, Register opnd1, declNode *pDeclOp1, reg_or_const bitCnt, declNode *pDeclBitCnt)
LirInstBitwiseRotateRight (typeNode *destType, Register &dest_reg, declNode *pDeclDest, Register opnd1, declNode *pDeclOp1, reg_or_const bitCnt, declNode *pDeclBitCnt)
LirInstBitwiseRotateLeft (typeNode *destType, Register &dest_reg, declNode *pDeclDest, Register opnd1, declNode *pDeclOp1, reg_or_const bitCnt, declNode *pDeclBitCnt)
LirInstCompare (Register opnd1, declNode *pDeclOp1, reg_or_const opnd2, declNode *pDeclOp2)
LirInstBranch (Compare_type cmp_type, string label)
LirInstJmp (string label)
LirInstCall (threeAddrNode *the_call, int stack_arg_bytes)
LirInstCallPre (void)
LirInstReturn (procNode *current_proc)
LirInstLabel (string label)
LirInstStaticDataString (constant str)
LirInstStaticDataLong (constant value)
LirInstStaticDataInt (constant value)
LirInstStaticDataShort (constant value)
LirInstStaticDataChar (constant value)
LirInstStaticDataSingle (constant value)
LirInstStaticDataDouble (constant value)
LirInstStaticDataZero (int size)
LirInstStaticDataUninit (string name, int size)
LirInstDeclareLocal (declNode *the_decl)
LirInstDeclareGlobal (declNode *the_decl)
LirInstBeginProc (procNode *the_proc)
LirInstEndProc (procNode *the_proc)
LirInstBeginUnit (unitNode *the_unit)
LirInstEndUnit (unitNode *the_unit)

Static Private Member Functions

LirInstmake_simple (mnemonic inst, typeNode *destType, Register &dest_reg, declNode *pDeclDest, Register opnd1, declNode *pDeclOp1, reg_or_const opnd2, declNode *pDeclOp2)
LirInstmake_data (mnemonic inst, constant value)


Member Function Documentation

LirInst * LIR::Add typeNode   destType,
Register   dest_reg,
declNode   pDeclDest,
Register    opnd1,
declNode   pDeclOp1,
reg_or_const    opnd2,
declNode   pDeclOp2
[static]
 

Definition at line 211 of file LIR.cc.

References make_simple().

Referenced by lir_gen_walker::init_maps().

LirInst * LIR::BeginProc procNode   the_proc [static]
 

Definition at line 587 of file LIR.cc.

References procNode::decl(), declNode::name(), LirInst::nodeExtra, and LirInst::target.

LirInst * LIR::BeginUnit unitNode   the_unit [static]
 

Definition at line 609 of file LIR.cc.

Referenced by asm_gen_walker::at_unit().

LirInst * LIR::BitwiseAND typeNode   destType,
Register   dest_reg,
declNode   pDeclDest,
Register    opnd1,
declNode   pDeclOp1,
reg_or_const    opnd2,
declNode   pDeclOp2
[static]
 

Definition at line 285 of file LIR.cc.

References typeNode::is_float(), and make_simple().

Referenced by lir_gen_walker::init_maps().

LirInst * LIR::BitwiseNOT typeNode   destType,
Register   dest_reg,
declNode   pDeclDest,
Register    opnd1,
declNode   pDeclOp1
[static]
 

Definition at line 307 of file LIR.cc.

References LirInst::dest, LirInst::dest_contents, typeNode::is_float(), Register::makeGPR(), LirInst::opnd1, and LirInst::opnd1_contents.

Referenced by lir_gen_walker::init_maps().

LirInst * LIR::BitwiseOR typeNode   destType,
Register   dest_reg,
declNode   pDeclDest,
Register    opnd1,
declNode   pDeclOp1,
reg_or_const    opnd2,
declNode   pDeclOp2
[static]
 

Definition at line 274 of file LIR.cc.

References typeNode::is_float(), and make_simple().

Referenced by lir_gen_walker::init_maps().

LirInst * LIR::BitwiseRotateLeft typeNode   destType,
Register   dest_reg,
declNode   pDeclDest,
Register    opnd1,
declNode   pDeclOp1,
reg_or_const    bitCnt,
declNode   pDeclBitCnt
[static]
 

Definition at line 360 of file LIR.cc.

References typeNode::is_float(), and make_simple().

LirInst * LIR::BitwiseRotateRight typeNode   destType,
Register   dest_reg,
declNode   pDeclDest,
Register    opnd1,
declNode   pDeclOp1,
reg_or_const    bitCnt,
declNode   pDeclBitCnt
[static]
 

Definition at line 349 of file LIR.cc.

References typeNode::is_float(), and make_simple().

LirInst * LIR::BitwiseShiftLeft typeNode   destType,
Register   dest_reg,
declNode   pDeclDest,
Register    opnd1,
declNode   pDeclOp1,
reg_or_const    bitCnt,
declNode   pDeclBitCnt
[static]
 

Definition at line 327 of file LIR.cc.

References typeNode::is_float(), and make_simple().

Referenced by lir_gen_walker::init_maps().

LirInst * LIR::BitwiseShiftRight typeNode   destType,
Register   dest_reg,
declNode   pDeclDest,
Register    opnd1,
declNode   pDeclOp1,
reg_or_const    bitCnt,
declNode   pDeclBitCnt
[static]
 

Definition at line 338 of file LIR.cc.

References typeNode::is_float(), and make_simple().

Referenced by lir_gen_walker::init_maps().

LirInst * LIR::BitwiseXOR typeNode   destType,
Register   dest_reg,
declNode   pDeclDest,
Register    opnd1,
declNode   pDeclOp1,
reg_or_const    opnd2,
declNode   pDeclOp2
[static]
 

Definition at line 296 of file LIR.cc.

References typeNode::is_float(), and make_simple().

Referenced by lir_gen_walker::init_maps().

LirInst * LIR::Branch Compare_type    cmp_type,
string    label
[static]
 

Definition at line 385 of file LIR.cc.

References cmp_EQ, cmp_GE, cmp_GT, cmp_LE, cmp_LT, cmp_NE, LirInst::instruction, mn_BranchEQ, mn_BranchGE, mn_BranchGT, mn_BranchLE, mn_BranchLT, mn_BranchNE, and LirInst::target.

Referenced by lir_gen_walker::gen_conditional_branch().

LirInst * LIR::Call threeAddrNode   the_call,
int    stack_arg_bytes
[static]
 

Definition at line 428 of file LIR.cc.

References CBZ::ArchInfo, CBZFAIL, DATA_CONTENTS_RETVAL, idNode::decl(), LirInst::dest, LirInst::dest_contents, arch_info::get_reg_retval_fixed(), arch_info::get_reg_retval_float(), typeNode::is_char(), typeNode::is_float(), typeNode::is_int(), typeNode::is_pointer(), idNode::name(), LirInst::nodeExtra, threeAddrNode::rhs1(), LirInst::target, typeNode::type(), and declNode::type().

LirInst * LIR::CallPre void    [static]
 

Definition at line 468 of file LIR.cc.

LirInst * LIR::Compare Register    opnd1,
declNode   pDeclOp1,
reg_or_const    opnd2,
declNode   pDeclOp2
[static]
 

Definition at line 371 of file LIR.cc.

References LirInst::opnd1, LirInst::opnd1_contents, LirInst::opnd2, and LirInst::opnd2_contents.

LirInst * LIR::ConvertType typeNode   sourceType,
Register    source,
declNode   pDeclSource,
typeNode   destType,
Register   dest,
declNode   pDeclDest
[static]
 

Definition at line 45 of file LIR.cc.

References LirInst::convertType, LirInst::dest, LirInst::dest_contents, LirInst::opnd1, LirInst::opnd1_contents, LirInst::primaryType, and Register::setType().

LirInst * LIR::DeclareGlobal declNode   the_decl [static]
 

Definition at line 575 of file LIR.cc.

References typeNode::alloc_align(), typeNode::alloc_size(), LirInst::dataAlign, LirInst::dataSize, declNode::name(), LirInst::nodeExtra, LirInst::target, and declNode::type().

LirInst * LIR::DeclareLocal declNode   the_decl [static]
 

Definition at line 557 of file LIR.cc.

References declNode::Storage_location::_register, declNode::Storage_location::_stack_offset, declNode::Storage_location::_type, declNode::name(), LirInst::nodeExtra, declNode::storage_location(), declNode::Storage_location::storageloc_stack, LirInst::target, and Register::to_string().

LirInst * LIR::Div typeNode   destType,
Register   dest_reg,
declNode   pDeclDest,
Register    opnd1,
declNode   pDeclOp1,
reg_or_const    opnd2,
declNode   pDeclOp2
[static]
 

Definition at line 238 of file LIR.cc.

References make_simple().

Referenced by lir_gen_walker::init_maps().

LirInst * LIR::EndProc procNode   the_proc [static]
 

Definition at line 598 of file LIR.cc.

References procNode::decl(), declNode::name(), LirInst::nodeExtra, and LirInst::target.

LirInst * LIR::EndUnit unitNode   the_unit [static]
 

Definition at line 618 of file LIR.cc.

Referenced by asm_gen_walker::at_unit().

LirInst * LIR::GetEffectiveAddress Register   dest_register,
declNode   pDeclDest,
Register    base_reg,
declNode   pDeclBase,
constant    offset,
declNode   pDeclOffset
[static]
 

Definition at line 159 of file LIR.cc.

References LirInst::dest, LirInst::dest_contents, Register::makeGPR(), LirInst::memBase, LirInst::memBase_contents, LirInst::memOffset, LirInst::memOffset_contents, LirUtil::newVoidPtr(), and LirInst::primaryType.

Referenced by lir_gen_walker::load_stack_addr().

LirInst * LIR::GetGlobalAddress Register   dest_register,
declNode   pDeclDest,
string    staticLabel,
declNode   staticDecl,
constant    offset,
declNode   pDeclOffset
[static]
 

Definition at line 179 of file LIR.cc.

References LirInst::dest, LirInst::dest_contents, Register::makeGPR(), LirInst::memOffset, LirInst::memOffset_contents, LirUtil::newVoidPtr(), LirInst::primaryType, and LirInst::target.

LirInst * LIR::Jmp string    label [static]
 

Definition at line 418 of file LIR.cc.

References LirInst::target.

LirInst * LIR::Label string    label [static]
 

Definition at line 486 of file LIR.cc.

References LirInst::target.

LirInst * LIR::Load typeNode   typeToLoad,
Register   dest_register,
declNode   pDeclDest,
Register    base_reg,
declNode   pDeclBase,
constant    offset,
declNode   pDeclOffset
[static]
 

Definition at line 64 of file LIR.cc.

References LirInst::dest, LirInst::dest_contents, LirInst::memBase, LirInst::memBase_contents, LirInst::memOffset, LirInst::memOffset_contents, LirInst::primaryType, and Register::setType().

Referenced by asm_gen_walker::doCalleeSave(), asm_gen_walker::doCallerSave(), lir_gen_walker::load_global_value(), and briggs_reg_alloc::loadSymReg().

LirInst * LIR::LoadImmediate typeNode   typeToLoad,
Register   dest_register,
declNode   pDeclDest,
constant    con
[static]
 

Definition at line 85 of file LIR.cc.

References LirInst::dest, LirInst::dest_contents, LirInst::opnd2, LirInst::primaryType, and Register::setType().

LirInst * LIR::LoadStatic typeNode   typeToLoad,
Register   dest,
declNode   pDeclDest,
string    staticLabel,
declNode   declStatic,
constant    offset,
declNode   pDeclOffset
[static]
 

Definition at line 101 of file LIR.cc.

References LirInst::dest, LirInst::dest_contents, LirInst::memOffset, LirInst::memOffset_contents, LirInst::nodeExtra, LirInst::primaryType, Register::setType(), LirInst::target, and declNode::type().

Referenced by lir_gen_walker::load_global_value().

LirInst * LIR::make_data mnemonic    inst,
constant    value
[static, private]
 

Definition at line 648 of file LIR.cc.

References LirInst::dataValue.

Referenced by StaticDataChar(), StaticDataDouble(), StaticDataInt(), StaticDataLong(), StaticDataShort(), StaticDataSingle(), and StaticDataString().

LirInst * LIR::make_simple mnemonic    inst,
typeNode   destType,
Register   dest_reg,
declNode   pDeclDest,
Register    opnd1,
declNode   pDeclOp1,
reg_or_const    opnd2,
declNode   pDeclOp2
[static, private]
 

Definition at line 627 of file LIR.cc.

References LirInst::dest, LirInst::dest_contents, LirInst::opnd1, LirInst::opnd1_contents, LirInst::opnd2, LirInst::opnd2_contents, LirInst::primaryType, and Register::setType().

Referenced by Add(), BitwiseAND(), BitwiseOR(), BitwiseRotateLeft(), BitwiseRotateRight(), BitwiseShiftLeft(), BitwiseShiftRight(), BitwiseXOR(), Div(), Mod(), Mul(), and Sub().

LirInst * LIR::Mod typeNode   destType,
Register   dest_reg,
declNode   pDeclDest,
Register    opnd1,
declNode   pDeclOp1,
reg_or_const    opnd2,
declNode   pDeclOp2
[static]
 

Definition at line 247 of file LIR.cc.

References typeNode::is_float(), and make_simple().

Referenced by lir_gen_walker::init_maps().

LirInst * LIR::Move Register    dest,
declNode   pDeclDest,
Register    source,
declNode   pDeclSrc
[static]
 

Definition at line 197 of file LIR.cc.

References LirInst::dest, LirInst::dest_contents, LirInst::opnd1, and LirInst::opnd1_contents.

LirInst * LIR::Mul typeNode   destType,
Register   dest_reg,
declNode   pDeclDest,
Register    opnd1,
declNode   pDeclOp1,
reg_or_const    opnd2,
declNode   pDeclOp2
[static]
 

Definition at line 229 of file LIR.cc.

References make_simple().

Referenced by lir_gen_walker::init_maps().

LirInst * LIR::Neg typeNode   destType,
Register   dest_reg,
declNode   pDeclDest,
Register    opnd1,
declNode   pDeclOp1
[static]
 

Definition at line 257 of file LIR.cc.

References LirInst::dest, LirInst::dest_contents, LirInst::opnd1, LirInst::opnd1_contents, and Register::setType().

Referenced by lir_gen_walker::init_maps().

LirInst* LIR::NOP   [static]
 

LirInst * LIR::Return procNode   current_proc [static]
 

Definition at line 476 of file LIR.cc.

References LirInst::nodeExtra.

LirInst * LIR::StaticDataChar constant    value [static]
 

Definition at line 520 of file LIR.cc.

References make_data().

Referenced by lir_gen_walker::gen_global_decl().

LirInst * LIR::StaticDataDouble constant    value [static]
 

Definition at line 532 of file LIR.cc.

References make_data().

Referenced by lir_gen_walker::gen_global_decl().

LirInst * LIR::StaticDataInt constant    value [static]
 

Definition at line 508 of file LIR.cc.

References make_data().

Referenced by lir_gen_walker::gen_global_decl().

LirInst * LIR::StaticDataLong constant    value [static]
 

Definition at line 502 of file LIR.cc.

References make_data().

Referenced by lir_gen_walker::gen_global_decl().

LirInst * LIR::StaticDataShort constant    value [static]
 

Definition at line 514 of file LIR.cc.

References make_data().

Referenced by lir_gen_walker::gen_global_decl().

LirInst * LIR::StaticDataSingle constant    value [static]
 

Definition at line 526 of file LIR.cc.

References make_data().

Referenced by lir_gen_walker::gen_global_decl().

LirInst * LIR::StaticDataString constant    str [static]
 

Definition at line 496 of file LIR.cc.

References make_data().

Referenced by lir_gen_walker::gen_global_decl().

LirInst * LIR::StaticDataUninit string    name,
int    size
[static]
 

Definition at line 547 of file LIR.cc.

References LirInst::dataSize, and LirInst::target.

Referenced by lir_gen_walker::gen_global_decl().

LirInst * LIR::StaticDataZero int    size [static]
 

Definition at line 538 of file LIR.cc.

References LirInst::dataSize.

LirInst * LIR::Store typeNode   typeToStore,
Register    source_register,
declNode   pDeclSrc,
Register    base_reg,
declNode   pDeclBase,
constant    offset,
declNode   pDeclOffset
[static]
 

Definition at line 122 of file LIR.cc.

References LirInst::memBase, LirInst::memBase_contents, LirInst::memOffset, LirInst::memOffset_contents, LirInst::opnd1, LirInst::opnd1_contents, and LirInst::primaryType.

Referenced by asm_gen_walker::doCalleeSave(), asm_gen_walker::doCallerSave(), briggs_reg_alloc::genSpillCode(), and lir_gen_walker::store_global().

LirInst * LIR::StoreStatic typeNode   typeToStore,
Register    source_register,
declNode   pDeclSrc,
string    staticLabel,
declNode   staticDecl,
constant    offset,
declNode   pDeclOffset
[static]
 

Definition at line 141 of file LIR.cc.

References LirInst::memOffset, LirInst::memOffset_contents, LirInst::opnd1, LirInst::opnd1_contents, LirInst::primaryType, and LirInst::target.

Referenced by lir_gen_walker::store_global().

LirInst * LIR::Sub typeNode   destType,
Register   dest_reg,
declNode   pDeclDest,
Register    opnd1,
declNode   pDeclOp1,
reg_or_const    opnd2,
declNode   pDeclOp2
[static]
 

Definition at line 220 of file LIR.cc.

References make_simple().

Referenced by lir_gen_walker::init_maps().


The documentation for this class was generated from the following files:

Generated on August 27, 2003
Back to the C-Breeze home page