2008-05-13 09:02:57 +00:00
|
|
|
//===-- PIC16TargetAsmInfo.cpp - PIC16 asm properties ---------------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file contains the declarations of the PIC16TargetAsmInfo properties.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "PIC16TargetAsmInfo.h"
|
|
|
|
|
2009-08-02 04:41:14 +00:00
|
|
|
// FIXME: Layering violation to get enums and static function, should be moved
|
|
|
|
// to separate headers.
|
|
|
|
#include "PIC16.h"
|
|
|
|
#include "PIC16ISelLowering.h"
|
2008-05-13 09:02:57 +00:00
|
|
|
using namespace llvm;
|
|
|
|
|
|
|
|
PIC16TargetAsmInfo::
|
2009-08-02 04:41:14 +00:00
|
|
|
PIC16TargetAsmInfo() {
|
2008-05-13 09:02:57 +00:00
|
|
|
CommentString = ";";
|
2009-05-10 05:23:47 +00:00
|
|
|
GlobalPrefix = PAN::getTagName(PAN::PREFIX_SYMBOL);
|
|
|
|
GlobalDirective = "\tglobal\t";
|
|
|
|
ExternDirective = "\textern\t";
|
|
|
|
|
2008-11-19 11:00:54 +00:00
|
|
|
Data8bitsDirective = " db ";
|
2009-01-30 04:25:10 +00:00
|
|
|
Data16bitsDirective = " dw ";
|
|
|
|
Data32bitsDirective = " dl ";
|
2009-07-06 18:09:11 +00:00
|
|
|
Data64bitsDirective = NULL;
|
2008-11-19 11:00:54 +00:00
|
|
|
ZeroDirective = NULL;
|
2009-01-13 19:18:47 +00:00
|
|
|
AsciiDirective = " dt ";
|
|
|
|
AscizDirective = NULL;
|
|
|
|
SwitchToSectionDirective = "";
|
2009-07-27 05:32:16 +00:00
|
|
|
|
2009-07-28 03:13:23 +00:00
|
|
|
RomData8bitsDirective = " dw ";
|
|
|
|
RomData16bitsDirective = " rom_di ";
|
|
|
|
RomData32bitsDirective = " rom_dl ";
|
|
|
|
|
|
|
|
|
2009-05-28 18:24:11 +00:00
|
|
|
// Set it to false because we weed to generate c file name and not bc file
|
|
|
|
// name.
|
|
|
|
HasSingleParameterDotFile = false;
|
2008-05-13 09:02:57 +00:00
|
|
|
}
|
2009-01-30 04:25:10 +00:00
|
|
|
|
2009-07-28 03:13:23 +00:00
|
|
|
const char *PIC16TargetAsmInfo::
|
|
|
|
getDataASDirective(unsigned Size, unsigned AS) const {
|
|
|
|
if (AS != PIC16ISD::ROM_SPACE)
|
|
|
|
return 0;
|
|
|
|
|
2009-07-20 17:12:46 +00:00
|
|
|
switch (Size) {
|
|
|
|
case 8: return RomData8bitsDirective;
|
|
|
|
case 16: return RomData16bitsDirective;
|
|
|
|
case 32: return RomData32bitsDirective;
|
|
|
|
default: return NULL;
|
|
|
|
}
|
2009-02-02 16:53:06 +00:00
|
|
|
}
|
2009-01-30 04:25:10 +00:00
|
|
|
|