blob: 9f002b047f59b3783fc23922ca81734a5ee4debf [file] [log] [blame]
Jim Grosbach31c24bf2009-11-07 22:00:39 +00001//===- ARMBaseInstrInfo.h - ARM Base Instruction Information ----*- C++ -*-===//
David Goodwin334c2642009-07-08 16:09:28 +00002//
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//===----------------------------------------------------------------------===//
9//
10// This file contains the Base ARM implementation of the TargetInstrInfo class.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef ARMBASEINSTRUCTIONINFO_H
15#define ARMBASEINSTRUCTIONINFO_H
16
David Goodwin334c2642009-07-08 16:09:28 +000017#include "ARM.h"
Anton Korobeynikovb8e9ac82009-07-16 23:26:06 +000018#include "llvm/CodeGen/MachineInstrBuilder.h"
19#include "llvm/Target/TargetInstrInfo.h"
Evan Cheng48575f62010-12-05 22:04:16 +000020#include "llvm/ADT/DenseMap.h"
21#include "llvm/ADT/SmallSet.h"
David Goodwin334c2642009-07-08 16:09:28 +000022
Evan Cheng4db3cff2011-07-01 17:57:27 +000023#define GET_INSTRINFO_HEADER
24#include "ARMGenInstrInfo.inc"
25
David Goodwin334c2642009-07-08 16:09:28 +000026namespace llvm {
Chris Lattner4dbbe342010-07-20 21:17:29 +000027 class ARMSubtarget;
28 class ARMBaseRegisterInfo;
David Goodwin334c2642009-07-08 16:09:28 +000029
Evan Cheng4db3cff2011-07-01 17:57:27 +000030class ARMBaseInstrInfo : public ARMGenInstrInfo {
Chris Lattner4dbbe342010-07-20 21:17:29 +000031 const ARMSubtarget &Subtarget;
Evan Cheng48575f62010-12-05 22:04:16 +000032
David Goodwin334c2642009-07-08 16:09:28 +000033protected:
34 // Can be only subclassed.
Anton Korobeynikovf95215f2009-11-02 00:10:38 +000035 explicit ARMBaseInstrInfo(const ARMSubtarget &STI);
Evan Cheng48575f62010-12-05 22:04:16 +000036
David Goodwin334c2642009-07-08 16:09:28 +000037public:
38 // Return the non-pre/post incrementing version of 'Opc'. Return 0
39 // if there is not such an opcode.
40 virtual unsigned getUnindexedOpcode(unsigned Opc) const =0;
41
David Goodwin334c2642009-07-08 16:09:28 +000042 virtual MachineInstr *convertToThreeAddress(MachineFunction::iterator &MFI,
43 MachineBasicBlock::iterator &MBBI,
44 LiveVariables *LV) const;
45
46 virtual const ARMBaseRegisterInfo &getRegisterInfo() const =0;
Anton Korobeynikovf95215f2009-11-02 00:10:38 +000047 const ARMSubtarget &getSubtarget() const { return Subtarget; }
David Goodwin334c2642009-07-08 16:09:28 +000048
Evan Cheng48575f62010-12-05 22:04:16 +000049 ScheduleHazardRecognizer *
Andrew Trick2da8bc82010-12-24 05:03:26 +000050 CreateTargetHazardRecognizer(const TargetMachine *TM,
51 const ScheduleDAG *DAG) const;
52
53 ScheduleHazardRecognizer *
54 CreateTargetPostRAHazardRecognizer(const InstrItineraryData *II,
55 const ScheduleDAG *DAG) const;
Evan Cheng48575f62010-12-05 22:04:16 +000056
David Goodwin334c2642009-07-08 16:09:28 +000057 // Branch analysis.
58 virtual bool AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
59 MachineBasicBlock *&FBB,
60 SmallVectorImpl<MachineOperand> &Cond,
Chris Lattner20628752010-07-22 21:27:00 +000061 bool AllowModify = false) const;
David Goodwin334c2642009-07-08 16:09:28 +000062 virtual unsigned RemoveBranch(MachineBasicBlock &MBB) const;
63 virtual unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
64 MachineBasicBlock *FBB,
Stuart Hastings3bf91252010-06-17 22:43:56 +000065 const SmallVectorImpl<MachineOperand> &Cond,
66 DebugLoc DL) const;
David Goodwin334c2642009-07-08 16:09:28 +000067
68 virtual
69 bool ReverseBranchCondition(SmallVectorImpl<MachineOperand> &Cond) const;
70
71 // Predication support.
Evan Chengab331502009-07-10 01:38:27 +000072 bool isPredicated(const MachineInstr *MI) const {
73 int PIdx = MI->findFirstPredOperandIdx();
74 return PIdx != -1 && MI->getOperand(PIdx).getImm() != ARMCC::AL;
75 }
David Goodwin334c2642009-07-08 16:09:28 +000076
77 ARMCC::CondCodes getPredicate(const MachineInstr *MI) const {
78 int PIdx = MI->findFirstPredOperandIdx();
79 return PIdx != -1 ? (ARMCC::CondCodes)MI->getOperand(PIdx).getImm()
80 : ARMCC::AL;
81 }
82
83 virtual
84 bool PredicateInstruction(MachineInstr *MI,
85 const SmallVectorImpl<MachineOperand> &Pred) const;
86
87 virtual
88 bool SubsumesPredicate(const SmallVectorImpl<MachineOperand> &Pred1,
89 const SmallVectorImpl<MachineOperand> &Pred2) const;
90
91 virtual bool DefinesPredicate(MachineInstr *MI,
92 std::vector<MachineOperand> &Pred) const;
93
Evan Chengac0869d2009-11-21 06:21:52 +000094 virtual bool isPredicable(MachineInstr *MI) const;
95
David Goodwin334c2642009-07-08 16:09:28 +000096 /// GetInstSize - Returns the size of the specified MachineInstr.
97 ///
98 virtual unsigned GetInstSizeInBytes(const MachineInstr* MI) const;
99
David Goodwin334c2642009-07-08 16:09:28 +0000100 virtual unsigned isLoadFromStackSlot(const MachineInstr *MI,
101 int &FrameIndex) const;
102 virtual unsigned isStoreToStackSlot(const MachineInstr *MI,
103 int &FrameIndex) const;
104
Jakob Stoklund Olesenac273662010-07-11 06:33:54 +0000105 virtual void copyPhysReg(MachineBasicBlock &MBB,
106 MachineBasicBlock::iterator I, DebugLoc DL,
107 unsigned DestReg, unsigned SrcReg,
108 bool KillSrc) const;
Evan Cheng5732ca02009-07-27 03:14:20 +0000109
David Goodwin334c2642009-07-08 16:09:28 +0000110 virtual void storeRegToStackSlot(MachineBasicBlock &MBB,
111 MachineBasicBlock::iterator MBBI,
112 unsigned SrcReg, bool isKill, int FrameIndex,
Evan Cheng746ad692010-05-06 19:06:44 +0000113 const TargetRegisterClass *RC,
114 const TargetRegisterInfo *TRI) const;
David Goodwin334c2642009-07-08 16:09:28 +0000115
David Goodwin334c2642009-07-08 16:09:28 +0000116 virtual void loadRegFromStackSlot(MachineBasicBlock &MBB,
117 MachineBasicBlock::iterator MBBI,
118 unsigned DestReg, int FrameIndex,
Evan Cheng746ad692010-05-06 19:06:44 +0000119 const TargetRegisterClass *RC,
120 const TargetRegisterInfo *TRI) const;
David Goodwin334c2642009-07-08 16:09:28 +0000121
Evan Cheng62b50652010-04-26 07:39:25 +0000122 virtual MachineInstr *emitFrameIndexDebugValue(MachineFunction &MF,
Evan Cheng8601a3d2010-04-29 01:13:30 +0000123 int FrameIx,
Evan Cheng62b50652010-04-26 07:39:25 +0000124 uint64_t Offset,
125 const MDNode *MDPtr,
126 DebugLoc DL) const;
127
Evan Chengfdc83402009-11-08 00:15:23 +0000128 virtual void reMaterialize(MachineBasicBlock &MBB,
129 MachineBasicBlock::iterator MI,
130 unsigned DestReg, unsigned SubIdx,
Evan Chengd57cdd52009-11-14 02:55:43 +0000131 const MachineInstr *Orig,
Jakob Stoklund Olesen9edf7de2010-06-02 22:47:25 +0000132 const TargetRegisterInfo &TRI) const;
Evan Chengfdc83402009-11-08 00:15:23 +0000133
Jakob Stoklund Olesen30ac0462010-01-06 23:47:07 +0000134 MachineInstr *duplicate(MachineInstr *Orig, MachineFunction &MF) const;
135
Evan Cheng506049f2010-03-03 01:44:33 +0000136 virtual bool produceSameValue(const MachineInstr *MI0,
Evan Cheng9fe20092011-01-20 08:34:58 +0000137 const MachineInstr *MI1,
138 const MachineRegisterInfo *MRI) const;
Evan Cheng86050dc2010-06-18 23:09:54 +0000139
Bill Wendling4b722102010-06-23 23:00:16 +0000140 /// areLoadsFromSameBasePtr - This is used by the pre-regalloc scheduler to
141 /// determine if two loads are loading from the same base address. It should
142 /// only return true if the base pointers are the same and the only
143 /// differences between the two addresses is the offset. It also returns the
144 /// offsets by reference.
145 virtual bool areLoadsFromSameBasePtr(SDNode *Load1, SDNode *Load2,
146 int64_t &Offset1, int64_t &Offset2)const;
147
148 /// shouldScheduleLoadsNear - This is a used by the pre-regalloc scheduler to
Jim Grosbachf921c0fe2011-06-13 22:54:22 +0000149 /// determine (in conjunction with areLoadsFromSameBasePtr) if two loads
150 /// should be scheduled togther. On some targets if two loads are loading from
Bill Wendling4b722102010-06-23 23:00:16 +0000151 /// addresses in the same cache line, it's better if they are scheduled
152 /// together. This function takes two integers that represent the load offsets
153 /// from the common base address. It returns true if it decides it's desirable
154 /// to schedule the two loads together. "NumLoads" is the number of loads that
155 /// have already been scheduled after Load1.
156 virtual bool shouldScheduleLoadsNear(SDNode *Load1, SDNode *Load2,
157 int64_t Offset1, int64_t Offset2,
158 unsigned NumLoads) const;
159
Evan Cheng86050dc2010-06-18 23:09:54 +0000160 virtual bool isSchedulingBoundary(const MachineInstr *MI,
161 const MachineBasicBlock *MBB,
162 const MachineFunction &MF) const;
Evan Cheng13151432010-06-25 22:42:03 +0000163
164 virtual bool isProfitableToIfCvt(MachineBasicBlock &MBB,
Cameron Zwarich5876db72011-04-13 06:39:16 +0000165 unsigned NumCycles, unsigned ExtraPredCycles,
Jakub Staszakf81b7f62011-07-10 02:58:07 +0000166 const BranchProbability &Probability) const;
Evan Cheng13151432010-06-25 22:42:03 +0000167
Evan Cheng8239daf2010-11-03 00:45:17 +0000168 virtual bool isProfitableToIfCvt(MachineBasicBlock &TMBB,
169 unsigned NumT, unsigned ExtraT,
170 MachineBasicBlock &FMBB,
171 unsigned NumF, unsigned ExtraF,
Jakub Staszakf81b7f62011-07-10 02:58:07 +0000172 const BranchProbability &Probability) const;
Evan Cheng13151432010-06-25 22:42:03 +0000173
174 virtual bool isProfitableToDupForIfCvt(MachineBasicBlock &MBB,
Cameron Zwarich5876db72011-04-13 06:39:16 +0000175 unsigned NumCycles,
Jakub Staszakf81b7f62011-07-10 02:58:07 +0000176 const BranchProbability
177 &Probability) const {
Cameron Zwarich5876db72011-04-13 06:39:16 +0000178 return NumCycles == 1;
Evan Cheng13151432010-06-25 22:42:03 +0000179 }
Bill Wendlinge4ddbdf2010-08-06 01:32:48 +0000180
Bill Wendlingc98af332010-08-08 05:04:59 +0000181 /// AnalyzeCompare - For a comparison instruction, return the source register
182 /// in SrcReg and the value it compares against in CmpValue. Return true if
183 /// the comparison instruction can be analyzed.
184 virtual bool AnalyzeCompare(const MachineInstr *MI, unsigned &SrcReg,
Gabor Greif04ac81d2010-09-21 12:01:15 +0000185 int &CmpMask, int &CmpValue) const;
Bill Wendlinge4ddbdf2010-08-06 01:32:48 +0000186
Bill Wendlinga6556862010-09-11 00:13:50 +0000187 /// OptimizeCompareInstr - Convert the instruction to set the zero flag so
Bill Wendlinge4ddbdf2010-08-06 01:32:48 +0000188 /// that we can remove a "comparison with zero".
Bill Wendlinga6556862010-09-11 00:13:50 +0000189 virtual bool OptimizeCompareInstr(MachineInstr *CmpInstr, unsigned SrcReg,
Gabor Greif04ac81d2010-09-21 12:01:15 +0000190 int CmpMask, int CmpValue,
Evan Chengeb96a2f2010-11-15 21:20:45 +0000191 const MachineRegisterInfo *MRI) const;
Evan Cheng5f54ce32010-09-09 18:18:55 +0000192
Evan Chengc4af4632010-11-17 20:13:28 +0000193 /// FoldImmediate - 'Reg' is known to be defined by a move immediate
194 /// instruction, try to fold the immediate into the use instruction.
195 virtual bool FoldImmediate(MachineInstr *UseMI, MachineInstr *DefMI,
196 unsigned Reg, MachineRegisterInfo *MRI) const;
197
Evan Cheng8239daf2010-11-03 00:45:17 +0000198 virtual unsigned getNumMicroOps(const InstrItineraryData *ItinData,
199 const MachineInstr *MI) const;
Evan Chenga0792de2010-10-06 06:27:31 +0000200
201 virtual
202 int getOperandLatency(const InstrItineraryData *ItinData,
203 const MachineInstr *DefMI, unsigned DefIdx,
204 const MachineInstr *UseMI, unsigned UseIdx) const;
205 virtual
206 int getOperandLatency(const InstrItineraryData *ItinData,
207 SDNode *DefNode, unsigned DefIdx,
208 SDNode *UseNode, unsigned UseIdx) const;
209private:
Evan Cheng344d9db2010-10-07 23:12:15 +0000210 int getVLDMDefCycle(const InstrItineraryData *ItinData,
Evan Chenge837dea2011-06-28 19:10:37 +0000211 const MCInstrDesc &DefMCID,
Evan Cheng344d9db2010-10-07 23:12:15 +0000212 unsigned DefClass,
213 unsigned DefIdx, unsigned DefAlign) const;
214 int getLDMDefCycle(const InstrItineraryData *ItinData,
Evan Chenge837dea2011-06-28 19:10:37 +0000215 const MCInstrDesc &DefMCID,
Evan Cheng344d9db2010-10-07 23:12:15 +0000216 unsigned DefClass,
217 unsigned DefIdx, unsigned DefAlign) const;
218 int getVSTMUseCycle(const InstrItineraryData *ItinData,
Evan Chenge837dea2011-06-28 19:10:37 +0000219 const MCInstrDesc &UseMCID,
Evan Cheng344d9db2010-10-07 23:12:15 +0000220 unsigned UseClass,
221 unsigned UseIdx, unsigned UseAlign) const;
222 int getSTMUseCycle(const InstrItineraryData *ItinData,
Evan Chenge837dea2011-06-28 19:10:37 +0000223 const MCInstrDesc &UseMCID,
Evan Cheng344d9db2010-10-07 23:12:15 +0000224 unsigned UseClass,
225 unsigned UseIdx, unsigned UseAlign) const;
Evan Chenga0792de2010-10-06 06:27:31 +0000226 int getOperandLatency(const InstrItineraryData *ItinData,
Evan Chenge837dea2011-06-28 19:10:37 +0000227 const MCInstrDesc &DefMCID,
Evan Chenga0792de2010-10-06 06:27:31 +0000228 unsigned DefIdx, unsigned DefAlign,
Evan Chenge837dea2011-06-28 19:10:37 +0000229 const MCInstrDesc &UseMCID,
Evan Chenga0792de2010-10-06 06:27:31 +0000230 unsigned UseIdx, unsigned UseAlign) const;
Evan Cheng23128422010-10-19 18:58:51 +0000231
Evan Cheng8239daf2010-11-03 00:45:17 +0000232 int getInstrLatency(const InstrItineraryData *ItinData,
233 const MachineInstr *MI, unsigned *PredCost = 0) const;
234
235 int getInstrLatency(const InstrItineraryData *ItinData,
236 SDNode *Node) const;
237
Evan Cheng23128422010-10-19 18:58:51 +0000238 bool hasHighOperandLatency(const InstrItineraryData *ItinData,
239 const MachineRegisterInfo *MRI,
240 const MachineInstr *DefMI, unsigned DefIdx,
241 const MachineInstr *UseMI, unsigned UseIdx) const;
Evan Chengc8141df2010-10-26 02:08:50 +0000242 bool hasLowDefLatency(const InstrItineraryData *ItinData,
243 const MachineInstr *DefMI, unsigned DefIdx) const;
Evan Cheng48575f62010-12-05 22:04:16 +0000244
245private:
246 /// Modeling special VFP / NEON fp MLA / MLS hazards.
247
248 /// MLxEntryMap - Map fp MLA / MLS to the corresponding entry in the internal
249 /// MLx table.
250 DenseMap<unsigned, unsigned> MLxEntryMap;
251
252 /// MLxHazardOpcodes - Set of add / sub and multiply opcodes that would cause
253 /// stalls when scheduled together with fp MLA / MLS opcodes.
254 SmallSet<unsigned, 16> MLxHazardOpcodes;
255
256public:
257 /// isFpMLxInstruction - Return true if the specified opcode is a fp MLA / MLS
258 /// instruction.
259 bool isFpMLxInstruction(unsigned Opcode) const {
260 return MLxEntryMap.count(Opcode);
261 }
262
263 /// isFpMLxInstruction - This version also returns the multiply opcode and the
264 /// addition / subtraction opcode to expand to. Return true for 'HasLane' for
265 /// the MLX instructions with an extra lane operand.
266 bool isFpMLxInstruction(unsigned Opcode, unsigned &MulOpc,
267 unsigned &AddSubOpc, bool &NegAcc,
268 bool &HasLane) const;
269
270 /// canCauseFpMLxStall - Return true if an instruction of the specified opcode
271 /// will cause stalls when scheduled after (within 4-cycle window) a fp
272 /// MLA / MLS instruction.
273 bool canCauseFpMLxStall(unsigned Opcode) const {
274 return MLxHazardOpcodes.count(Opcode);
275 }
David Goodwin334c2642009-07-08 16:09:28 +0000276};
Evan Cheng6495f632009-07-28 05:48:47 +0000277
278static inline
279const MachineInstrBuilder &AddDefaultPred(const MachineInstrBuilder &MIB) {
280 return MIB.addImm((int64_t)ARMCC::AL).addReg(0);
David Goodwin334c2642009-07-08 16:09:28 +0000281}
282
Evan Cheng6495f632009-07-28 05:48:47 +0000283static inline
284const MachineInstrBuilder &AddDefaultCC(const MachineInstrBuilder &MIB) {
285 return MIB.addReg(0);
286}
287
288static inline
Evan Chenge8af1f92009-08-10 02:37:24 +0000289const MachineInstrBuilder &AddDefaultT1CC(const MachineInstrBuilder &MIB,
290 bool isDead = false) {
291 return MIB.addReg(ARM::CPSR, getDefRegState(true) | getDeadRegState(isDead));
Evan Cheng6495f632009-07-28 05:48:47 +0000292}
293
294static inline
Evan Chengbc9b7542009-08-15 07:59:10 +0000295const MachineInstrBuilder &AddNoT1CC(const MachineInstrBuilder &MIB) {
296 return MIB.addReg(0);
297}
298
299static inline
Evan Cheng6495f632009-07-28 05:48:47 +0000300bool isUncondBranchOpcode(int Opc) {
301 return Opc == ARM::B || Opc == ARM::tB || Opc == ARM::t2B;
302}
303
304static inline
305bool isCondBranchOpcode(int Opc) {
306 return Opc == ARM::Bcc || Opc == ARM::tBcc || Opc == ARM::t2Bcc;
307}
308
309static inline
310bool isJumpTableBranchOpcode(int Opc) {
311 return Opc == ARM::BR_JTr || Opc == ARM::BR_JTm || Opc == ARM::BR_JTadd ||
312 Opc == ARM::tBR_JTr || Opc == ARM::t2BR_JT;
313}
314
Bob Wilson8d4de5a2009-10-28 18:26:41 +0000315static inline
316bool isIndirectBranchOpcode(int Opc) {
Bill Wendling6e46d842010-11-30 00:48:15 +0000317 return Opc == ARM::BX || Opc == ARM::MOVPCRX || Opc == ARM::tBRIND;
Bob Wilson8d4de5a2009-10-28 18:26:41 +0000318}
319
Evan Cheng8fb90362009-08-08 03:20:32 +0000320/// getInstrPredicate - If instruction is predicated, returns its predicate
321/// condition, otherwise returns AL. It also returns the condition code
322/// register by reference.
Evan Cheng5adb66a2009-09-28 09:14:39 +0000323ARMCC::CondCodes getInstrPredicate(const MachineInstr *MI, unsigned &PredReg);
Evan Cheng8fb90362009-08-08 03:20:32 +0000324
Evan Cheng6495f632009-07-28 05:48:47 +0000325int getMatchingCondBranchOpcode(int Opc);
326
327/// emitARMRegPlusImmediate / emitT2RegPlusImmediate - Emits a series of
328/// instructions to materializea destreg = basereg + immediate in ARM / Thumb2
329/// code.
330void emitARMRegPlusImmediate(MachineBasicBlock &MBB,
331 MachineBasicBlock::iterator &MBBI, DebugLoc dl,
332 unsigned DestReg, unsigned BaseReg, int NumBytes,
333 ARMCC::CondCodes Pred, unsigned PredReg,
Anton Korobeynikov57caad72011-03-05 18:43:32 +0000334 const ARMBaseInstrInfo &TII, unsigned MIFlags = 0);
Evan Cheng6495f632009-07-28 05:48:47 +0000335
336void emitT2RegPlusImmediate(MachineBasicBlock &MBB,
337 MachineBasicBlock::iterator &MBBI, DebugLoc dl,
338 unsigned DestReg, unsigned BaseReg, int NumBytes,
339 ARMCC::CondCodes Pred, unsigned PredReg,
Anton Korobeynikov57caad72011-03-05 18:43:32 +0000340 const ARMBaseInstrInfo &TII, unsigned MIFlags = 0);
Jim Grosbache4ad3872010-10-19 23:27:08 +0000341void emitThumbRegPlusImmediate(MachineBasicBlock &MBB,
Anton Korobeynikov57caad72011-03-05 18:43:32 +0000342 MachineBasicBlock::iterator &MBBI, DebugLoc dl,
Jim Grosbache4ad3872010-10-19 23:27:08 +0000343 unsigned DestReg, unsigned BaseReg,
344 int NumBytes, const TargetInstrInfo &TII,
345 const ARMBaseRegisterInfo& MRI,
Anton Korobeynikov57caad72011-03-05 18:43:32 +0000346 unsigned MIFlags = 0);
Evan Cheng6495f632009-07-28 05:48:47 +0000347
348
Jim Grosbach764ab522009-08-11 15:33:49 +0000349/// rewriteARMFrameIndex / rewriteT2FrameIndex -
Evan Chengcdbb3f52009-08-27 01:23:50 +0000350/// Rewrite MI to access 'Offset' bytes from the FP. Return false if the
351/// offset could not be handled directly in MI, and return the left-over
352/// portion by reference.
353bool rewriteARMFrameIndex(MachineInstr &MI, unsigned FrameRegIdx,
354 unsigned FrameReg, int &Offset,
355 const ARMBaseInstrInfo &TII);
Evan Cheng6495f632009-07-28 05:48:47 +0000356
Evan Chengcdbb3f52009-08-27 01:23:50 +0000357bool rewriteT2FrameIndex(MachineInstr &MI, unsigned FrameRegIdx,
358 unsigned FrameReg, int &Offset,
359 const ARMBaseInstrInfo &TII);
Evan Cheng6495f632009-07-28 05:48:47 +0000360
361} // End llvm namespace
362
David Goodwin334c2642009-07-08 16:09:28 +0000363#endif