Fix part 1 of pr4682. PICADD is a 16-bit instruction even in thumb2 mode.
[llvm/avr.git] / lib / Target / PIC16 / PIC16TargetAsmInfo.cpp
blob50fba39112a229b0fd1a236975788de7d1b501f9
1 //===-- PIC16TargetAsmInfo.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 PIC16TargetAsmInfo properties.
12 //===----------------------------------------------------------------------===//
14 #include "PIC16TargetAsmInfo.h"
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;
22 PIC16TargetAsmInfo::
23 PIC16TargetAsmInfo() {
24 CommentString = ";";
25 GlobalPrefix = PAN::getTagName(PAN::PREFIX_SYMBOL);
26 GlobalDirective = "\tglobal\t";
27 ExternDirective = "\textern\t";
29 Data8bitsDirective = " db ";
30 Data16bitsDirective = " dw ";
31 Data32bitsDirective = " dl ";
32 Data64bitsDirective = NULL;
33 ZeroDirective = NULL;
34 AsciiDirective = " dt ";
35 AscizDirective = NULL;
36 SwitchToSectionDirective = "";
38 RomData8bitsDirective = " dw ";
39 RomData16bitsDirective = " rom_di ";
40 RomData32bitsDirective = " rom_dl ";
43 // Set it to false because we weed to generate c file name and not bc file
44 // name.
45 HasSingleParameterDotFile = false;
48 const char *PIC16TargetAsmInfo::
49 getDataASDirective(unsigned Size, unsigned AS) const {
50 if (AS != PIC16ISD::ROM_SPACE)
51 return 0;
53 switch (Size) {
54 case 8: return RomData8bitsDirective;
55 case 16: return RomData16bitsDirective;
56 case 32: return RomData32bitsDirective;
57 default: return NULL;