
This change will allow to put code pointers in DWARF info fields that are larger than actual pointer size, e.g. 16-bit pointers into 32-bit fields. The need for this came up while creating support for MSP430 in LLDB. MSP430-GCC already generates DWARF info with 32-bit fields, so this change is necessary for LLDB to maintain compatibility with both GCC and LLVM binaries. Moreover, right now in LLDB there is no support for having DWARF pointer size different from ELF header type, e.g. 16-bit DWARF info within ELF32, and it seems there is no such thing as ELF16. Since other mainline targets are made to have the same pointer size in both MCAsmInfo and DataLayout, there is no need to change anything there. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D148042
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
//===-- MSP430MCAsmInfo.cpp - MSP430 asm properties -----------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file contains the declarations of the MSP430MCAsmInfo properties.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "MSP430MCAsmInfo.h"
|
|
using namespace llvm;
|
|
|
|
void MSP430MCAsmInfo::anchor() { }
|
|
|
|
MSP430MCAsmInfo::MSP430MCAsmInfo(const Triple &TT) {
|
|
// Since MSP430-GCC already generates 32-bit DWARF information, we will
|
|
// also store 16-bit pointers as 32-bit pointers in DWARF, because using
|
|
// 32-bit DWARF pointers is already a working and tested path for LLDB
|
|
// as well.
|
|
CodePointerSize = 4;
|
|
CalleeSaveStackSlotSize = 2;
|
|
|
|
CommentString = ";";
|
|
SeparatorString = "{";
|
|
|
|
AlignmentIsInBytes = false;
|
|
UsesELFSectionDirectiveForBSS = true;
|
|
|
|
SupportsDebugInformation = true;
|
|
|
|
ExceptionsType = ExceptionHandling::DwarfCFI;
|
|
}
|