2009-08-22 20:48:53 +00:00
|
|
|
//===-- PIC16MCAsmInfo.cpp - PIC16 asm properties -------------------------===//
|
2008-05-13 09:02:57 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2009-08-22 20:48:53 +00:00
|
|
|
// This file contains the declarations of the PIC16MCAsmInfo properties.
|
2008-05-13 09:02:57 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2009-08-22 20:48:53 +00:00
|
|
|
#include "PIC16MCAsmInfo.h"
|
2008-05-13 09:02:57 +00:00
|
|
|
|
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"
|
2009-10-15 19:26:25 +00:00
|
|
|
#include "PIC16ABINames.h"
|
2009-08-02 04:41:14 +00:00
|
|
|
#include "PIC16ISelLowering.h"
|
2008-05-13 09:02:57 +00:00
|
|
|
using namespace llvm;
|
|
|
|
|
2010-07-14 22:38:02 +00:00
|
|
|
PIC16MCAsmInfo::PIC16MCAsmInfo(const Target &T, StringRef TT) {
|
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;
|
2009-07-27 05:32:16 +00:00
|
|
|
|
2009-07-28 03:13:23 +00:00
|
|
|
RomData8bitsDirective = " dw ";
|
|
|
|
RomData16bitsDirective = " rom_di ";
|
|
|
|
RomData32bitsDirective = " rom_dl ";
|
2010-01-26 20:40:54 +00:00
|
|
|
HasSetDirective = false;
|
2009-07-28 03:13:23 +00:00
|
|
|
|
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-08-22 20:48:53 +00:00
|
|
|
const char *PIC16MCAsmInfo::getDataASDirective(unsigned Size,
|
|
|
|
unsigned AS) const {
|
2009-07-28 03:13:23 +00:00
|
|
|
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
|
|
|
|