Add register-reuse to frame-index register scavenging. When a target uses
[oota-llvm.git] / lib / Target / PIC16 / PIC16MCAsmInfo.cpp
1 //===-- PIC16MCAsmInfo.cpp - PIC16 asm properties -------------------------===//
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 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the declarations of the PIC16MCAsmInfo properties.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #include "PIC16MCAsmInfo.h"
15
16 // FIXME: Layering violation to get enums and static function, should be moved
17 // to separate headers.
18 #include "PIC16.h"
19 #include "PIC16ISelLowering.h"
20 using namespace llvm;
21
22 PIC16MCAsmInfo::PIC16MCAsmInfo(const Target &T, const StringRef &TT) {
23   CommentString = ";";
24   GlobalPrefix = PAN::getTagName(PAN::PREFIX_SYMBOL);
25   GlobalDirective = "\tglobal\t";
26   ExternDirective = "\textern\t";
27
28   Data8bitsDirective = " db ";
29   Data16bitsDirective = " dw ";
30   Data32bitsDirective = " dl ";
31   Data64bitsDirective = NULL;
32   ZeroDirective = NULL;
33   AsciiDirective = " dt ";
34   AscizDirective = NULL;
35     
36   RomData8bitsDirective = " dw ";
37   RomData16bitsDirective = " rom_di ";
38   RomData32bitsDirective = " rom_dl ";
39     
40     
41   // Set it to false because we weed to generate c file name and not bc file
42   // name.
43   HasSingleParameterDotFile = false;
44 }
45
46 const char *PIC16MCAsmInfo::getDataASDirective(unsigned Size,
47                                                unsigned AS) const {
48   if (AS != PIC16ISD::ROM_SPACE)
49     return 0;
50   
51   switch (Size) {
52   case  8: return RomData8bitsDirective;
53   case 16: return RomData16bitsDirective;
54   case 32: return RomData32bitsDirective;
55   default: return NULL;
56   }
57 }
58