CACAO
X86_64Backend.hpp
Go to the documentation of this file.
1 /* src/vm/jit/compiler2/X86_64Backend.hpp - X86_64Backend
2 
3  Copyright (C) 2013
4  CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
5 
6  This file is part of CACAO.
7 
8  This program is free software; you can redistribute it and/or
9  modify it under the terms of the GNU General Public License as
10  published by the Free Software Foundation; either version 2, or (at
11  your option) any later version.
12 
13  This program is distributed in the hope that it will be useful, but
14  WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21  02110-1301, USA.
22 
23 */
24 
25 #ifndef _JIT_COMPILER2_X86_64BACKEND
26 #define _JIT_COMPILER2_X86_64BACKEND
27 
30 
31 namespace cacao {
32 namespace jit {
33 namespace compiler2 {
34 namespace x86_64 {
35 
36 
38 public:
41  : LoweringVisitorBase(backend, current, map, inst_map, schedule) {}
42 
43  // make LoweringVisitorBases visit visible
45 
46  virtual void visit(LOADInst *I, bool copyOperands);
47  virtual void visit(IFInst *I, bool copyOperands);
48  virtual void visit(ADDInst *I, bool copyOperands);
49  virtual void visit(ANDInst *I, bool copyOperands);
50  virtual void visit(ORInst *I, bool copyOperands);
51  virtual void visit(XORInst *I, bool copyOperands);
52  virtual void visit(SUBInst *I, bool copyOperands);
53  virtual void visit(MULInst *I, bool copyOperands);
54  virtual void visit(DIVInst *I, bool copyOperands);
55  virtual void visit(REMInst *I, bool copyOperands);
56  virtual void visit(RETURNInst *I, bool copyOperands);
57  virtual void visit(CASTInst *I, bool copyOperands);
58  virtual void visit(INVOKESTATICInst *I, bool copyOperands);
59  virtual void visit(GETSTATICInst *I, bool copyOperands);
60  virtual void visit(LOOKUPSWITCHInst *I, bool copyOperands);
61  virtual void visit(TABLESWITCHInst *I, bool copyOperands);
62  virtual void visit(ARRAYLENGTHInst *I, bool copyOperands);
63  virtual void visit(AREFInst *I, bool copyOperands);
64  virtual void visit(ALOADInst *I, bool copyOperands);
65  virtual void visit(ASTOREInst *I, bool copyOperands);
66  virtual void visit(ARRAYBOUNDSCHECKInst *I, bool copyOperands);
67  virtual void visit(CMPInst *I, bool copyOperands);
68  virtual void visit(NEGInst *I, bool copyOperands);
69 
70  virtual void lowerComplex(Instruction* I, int ruleId);
71 
72 private:
73  void setupSrcDst(MachineOperand*& src_op1, MachineOperand*& src_op2, VirtualRegister*& dst,
74  Type::TypeID type, bool copyOperands, bool isCommutable);
75 
76 };
77 
78 } // end namespace x86_64
79 } // end namespace compiler2
80 } // end namespace jit
81 } // end namespace cacao
82 
83 #endif /* _JIT_COMPILER2_X86_64BACKEND */
84 
85 
86 /*
87  * These are local overrides for various environment variables in Emacs.
88  * Please do not remove this and leave it at the end of the file, where
89  * Emacs will automagically detect them.
90  * ---------------------------------------------------------------------
91  * Local variables:
92  * mode: c++
93  * indent-tabs-mode: t
94  * c-basic-offset: 4
95  * tab-width: 4
96  * End:
97  * vim:noexpandtab:sw=4:ts=4:
98  */
alloc::map< Instruction *, MachineOperand * >::type InstructionMapTy
Definition: Backend.hpp:83
A basic block of (scheduled) machine instructions.
virtual void lowerComplex(Instruction *I, int ruleId)
virtual void visit(BeginInst *I, bool copyOperands)
Definition: Backend.cpp:39
alloc::map< BeginInst *, MachineBasicBlock * >::type MapTy
Definition: Backend.hpp:82
virtual void visit(LOADInst *I, bool copyOperands)
X86_64LoweringVisitor(Backend *backend, MachineBasicBlock *current, MapTy &map, InstructionMapTy &inst_map, MachineInstructionSchedule *schedule)
Instruction super class.
Definition: Instruction.hpp:73
void setupSrcDst(MachineOperand *&src_op1, MachineOperand *&src_op2, VirtualRegister *&dst, Type::TypeID type, bool copyOperands, bool isCommutable)
#define I(value)
Definition: codegen.c:279
jmethodID jint const void jint const jvmtiAddrLocationMap * map
Definition: jvmti.h:338
Operands that can be directly used by the machine (register, memory, stackslot)
MachineInstructionSchedule * schedule
Definition: Backend.hpp:89