~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/lib/MC/MCAsmInfo.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-03-12 11:30:04 UTC
  • mfrom: (0.41.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100312113004-b0fop4bkycszdd0z
Tags: 0.96~rc1+dfsg-0ubuntu1
* New upstream RC - FFE (LP: #537636):
  - Add OfficialDatabaseOnly option to clamav-base.postinst.in
  - Add LocalSocketGroup option to clamav-base.postinst.in
  - Add LocalSocketMode option to clamav-base.postinst.in
  - Add CrossFilesystems option to clamav-base.postinst.in
  - Add ClamukoScannerCount option to clamav-base.postinst.in
  - Add BytecodeSecurity opiton to clamav-base.postinst.in
  - Add DetectionStatsHostID option to clamav-freshclam.postinst.in
  - Add Bytecode option to clamav-freshclam.postinst.in
  - Add MilterSocketGroup option to clamav-milter.postinst.in
  - Add MilterSocketMode option to clamav-milter.postinst.in
  - Add ReportHostname option to clamav-milter.postinst.in
  - Bump libclamav SO version to 6.1.0 in libclamav6.install
  - Drop clamdmon from clamav.examples (no longer shipped by upstream)
  - Drop libclamav.a from libclamav-dev.install (not built by upstream)
  - Update SO version for lintian override for libclamav6
  - Add new Bytecode Testing Tool, usr/bin/clambc, to clamav.install
  - Add build-depends on python and python-setuptools for new test suite
  - Update debian/copyright for the embedded copy of llvm (using the system
    llvm is not currently feasible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//===-- MCAsmInfo.cpp - Asm Info -------------------------------------------==//
 
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 defines target asm properties related what form asm statements
 
11
// should take.
 
12
//
 
13
//===----------------------------------------------------------------------===//
 
14
 
 
15
#include "llvm/MC/MCAsmInfo.h"
 
16
#include "llvm/System/DataTypes.h"
 
17
#include <cctype>
 
18
#include <cstring>
 
19
using namespace llvm;
 
20
 
 
21
MCAsmInfo::MCAsmInfo() {
 
22
  HasSubsectionsViaSymbols = false;
 
23
  HasMachoZeroFillDirective = false;
 
24
  HasStaticCtorDtorReferenceInStaticMode = false;
 
25
  MaxInstLength = 4;
 
26
  PCSymbol = "$";
 
27
  SeparatorChar = ';';
 
28
  CommentColumn = 40;
 
29
  CommentString = "#";
 
30
  GlobalPrefix = "";
 
31
  PrivateGlobalPrefix = ".";
 
32
  LinkerPrivateGlobalPrefix = "";
 
33
  InlineAsmStart = "APP";
 
34
  InlineAsmEnd = "NO_APP";
 
35
  AssemblerDialect = 0;
 
36
  AllowQuotesInName = false;
 
37
  AllowNameToStartWithDigit = false;
 
38
  ZeroDirective = "\t.zero\t";
 
39
  AsciiDirective = "\t.ascii\t";
 
40
  AscizDirective = "\t.asciz\t";
 
41
  Data8bitsDirective = "\t.byte\t";
 
42
  Data16bitsDirective = "\t.short\t";
 
43
  Data32bitsDirective = "\t.long\t";
 
44
  Data64bitsDirective = "\t.quad\t";
 
45
  SunStyleELFSectionSwitchSyntax = false;
 
46
  UsesELFSectionDirectiveForBSS = false;
 
47
  AlignDirective = "\t.align\t";
 
48
  AlignmentIsInBytes = true;
 
49
  TextAlignFillValue = 0;
 
50
  GPRel32Directive = 0;
 
51
  GlobalDirective = "\t.globl\t";
 
52
  HasSetDirective = true;
 
53
  HasLCOMMDirective = false;
 
54
  COMMDirectiveAlignmentIsInBytes = true;
 
55
  HasDotTypeDotSizeDirective = true;
 
56
  HasSingleParameterDotFile = true;
 
57
  HasNoDeadStrip = false;
 
58
  WeakRefDirective = 0;
 
59
  WeakDefDirective = 0;
 
60
  LinkOnceDirective = 0;
 
61
  HiddenVisibilityAttr = MCSA_Hidden;
 
62
  ProtectedVisibilityAttr = MCSA_Protected;
 
63
  AbsoluteDebugSectionOffsets = false;
 
64
  AbsoluteEHSectionOffsets = false;
 
65
  HasLEB128 = false;
 
66
  HasDotLocAndDotFile = false;
 
67
  SupportsDebugInformation = false;
 
68
  ExceptionsType = ExceptionHandling::None;
 
69
  DwarfRequiresFrameSection = true;
 
70
  DwarfUsesInlineInfoSection = false;
 
71
  Is_EHSymbolPrivate = true;
 
72
  GlobalEHDirective = 0;
 
73
  SupportsWeakOmittedEHFrame = true;
 
74
  DwarfSectionOffsetDirective = 0;
 
75
 
 
76
  AsmTransCBE = 0;
 
77
}
 
78
 
 
79
MCAsmInfo::~MCAsmInfo() {
 
80
}
 
81
 
 
82
 
 
83
unsigned MCAsmInfo::getULEB128Size(unsigned Value) {
 
84
  unsigned Size = 0;
 
85
  do {
 
86
    Value >>= 7;
 
87
    Size += sizeof(int8_t);
 
88
  } while (Value);
 
89
  return Size;
 
90
}
 
91
 
 
92
unsigned MCAsmInfo::getSLEB128Size(int Value) {
 
93
  unsigned Size = 0;
 
94
  int Sign = Value >> (8 * sizeof(Value) - 1);
 
95
  bool IsMore;
 
96
 
 
97
  do {
 
98
    unsigned Byte = Value & 0x7f;
 
99
    Value >>= 7;
 
100
    IsMore = Value != Sign || ((Byte ^ Sign) & 0x40) != 0;
 
101
    Size += sizeof(int8_t);
 
102
  } while (IsMore);
 
103
  return Size;
 
104
}