~ubuntu-branches/ubuntu/wily/clamav/wily-proposed

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/include/llvm/CodeGen/MachineMemOperand.h

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman, Sebastian Andrzej Siewior, Andreas Cadhalpun, Scott Kitterman, Javier Fernández-Sanguino
  • Date: 2015-01-28 00:25:13 UTC
  • mfrom: (0.48.14 sid)
  • Revision ID: package-import@ubuntu.com-20150128002513-lil2oi74cooy4lzr
Tags: 0.98.6+dfsg-1
[ Sebastian Andrzej Siewior ]
* update "fix-ssize_t-size_t-off_t-printf-modifier", include of misc.h was
  missing but was pulled in via the systemd patch.
* Don't leak return codes from libmspack to clamav API. (Closes: #774686).

[ Andreas Cadhalpun ]
* Add patch to avoid emitting incremental progress messages when not
  outputting to a terminal. (Closes: #767350)
* Update lintian-overrides for unused-file-paragraph-in-dep5-copyright.
* clamav-base.postinst: always chown /var/log/clamav and /var/lib/clamav
  to clamav:clamav, not only on fresh installations. (Closes: #775400)
* Adapt the clamav-daemon and clamav-freshclam logrotate scripts,
  so that they correctly work under systemd.
* Move the PidFile variable from the clamd/freshclam configuration files
  to the init scripts. This makes the init scripts more robust against
  misconfiguration and avoids error messages with systemd. (Closes: #767353)
* debian/copyright: drop files from Files-Excluded only present in github
  tarballs
* Drop Workaround-a-bug-in-libc-on-Hurd.patch, because hurd got fixed.
  (see #752237)
* debian/rules: Remove useless --with-system-tommath --without-included-ltdl
  configure options.

[ Scott Kitterman ]
* Stop stripping llvm when repacking the tarball as the system llvm on some
  releases is too old to use
* New upstream bugfix release
  - Library shared object revisions.
  - Includes a patch from Sebastian Andrzej Siewior making ClamAV pid files
    compatible with systemd.
  - Fix a heap out of bounds condition with crafted Yoda's crypter files.
    This issue was discovered by Felix Groebert of the Google Security Team.
  - Fix a heap out of bounds condition with crafted mew packer files. This
    issue was discovered by Felix Groebert of the Google Security Team.
  - Fix a heap out of bounds condition with crafted upx packer files. This
    issue was discovered by Kevin Szkudlapski of Quarkslab.
  - Fix a heap out of bounds condition with crafted upack packer files. This
    issue was discovered by Sebastian Andrzej Siewior. CVE-2014-9328.
  - Compensate a crash due to incorrect compiler optimization when handling
    crafted petite packer files. This issue was discovered by Sebastian
    Andrzej Siewior.
* Update lintian override for embedded zlib to match new so version

[ Javier Fernández-Sanguino ]
* Updated Spanish Debconf template translation (Closes: #773563)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//==- llvm/CodeGen/MachineMemOperand.h - MachineMemOperand class -*- C++ -*-==//
 
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 declaration of the MachineMemOperand class, which is a
 
11
// description of a memory reference. It is used to help track dependencies
 
12
// in the backend.
 
13
//
 
14
//===----------------------------------------------------------------------===//
 
15
 
 
16
#ifndef LLVM_CODEGEN_MACHINEMEMOPERAND_H
 
17
#define LLVM_CODEGEN_MACHINEMEMOPERAND_H
 
18
 
 
19
#include "llvm/System/DataTypes.h"
 
20
 
 
21
namespace llvm {
 
22
 
 
23
class Value;
 
24
class FoldingSetNodeID;
 
25
class raw_ostream;
 
26
 
 
27
//===----------------------------------------------------------------------===//
 
28
/// MachineMemOperand - A description of a memory reference used in the backend.
 
29
/// Instead of holding a StoreInst or LoadInst, this class holds the address
 
30
/// Value of the reference along with a byte size and offset. This allows it
 
31
/// to describe lowered loads and stores. Also, the special PseudoSourceValue
 
32
/// objects can be used to represent loads and stores to memory locations
 
33
/// that aren't explicit in the regular LLVM IR.
 
34
///
 
35
class MachineMemOperand {
 
36
  int64_t Offset;
 
37
  uint64_t Size;
 
38
  const Value *V;
 
39
  unsigned int Flags;
 
40
 
 
41
public:
 
42
  /// Flags values. These may be or'd together.
 
43
  enum MemOperandFlags {
 
44
    /// The memory access reads data.
 
45
    MOLoad = 1,
 
46
    /// The memory access writes data.
 
47
    MOStore = 2,
 
48
    /// The memory access is volatile.
 
49
    MOVolatile = 4,
 
50
    /// The memory access is non-temporal.
 
51
    MONonTemporal = 8,
 
52
    // This is the number of bits we need to represent flags.
 
53
    MOMaxBits = 4
 
54
  };
 
55
 
 
56
  /// MachineMemOperand - Construct an MachineMemOperand object with the
 
57
  /// specified address Value, flags, offset, size, and base alignment.
 
58
  MachineMemOperand(const Value *v, unsigned int f, int64_t o, uint64_t s,
 
59
                    unsigned int base_alignment);
 
60
 
 
61
  /// getValue - Return the base address of the memory access. This may either
 
62
  /// be a normal LLVM IR Value, or one of the special values used in CodeGen.
 
63
  /// Special values are those obtained via
 
64
  /// PseudoSourceValue::getFixedStack(int), PseudoSourceValue::getStack, and
 
65
  /// other PseudoSourceValue member functions which return objects which stand
 
66
  /// for frame/stack pointer relative references and other special references
 
67
  /// which are not representable in the high-level IR.
 
68
  const Value *getValue() const { return V; }
 
69
 
 
70
  /// getFlags - Return the raw flags of the source value, \see MemOperandFlags.
 
71
  unsigned int getFlags() const { return Flags & ((1 << MOMaxBits) - 1); }
 
72
 
 
73
  /// getOffset - For normal values, this is a byte offset added to the base
 
74
  /// address. For PseudoSourceValue::FPRel values, this is the FrameIndex
 
75
  /// number.
 
76
  int64_t getOffset() const { return Offset; }
 
77
 
 
78
  /// getSize - Return the size in bytes of the memory reference.
 
79
  uint64_t getSize() const { return Size; }
 
80
 
 
81
  /// getAlignment - Return the minimum known alignment in bytes of the
 
82
  /// actual memory reference.
 
83
  uint64_t getAlignment() const;
 
84
 
 
85
  /// getBaseAlignment - Return the minimum known alignment in bytes of the
 
86
  /// base address, without the offset.
 
87
  uint64_t getBaseAlignment() const { return (1u << (Flags >> MOMaxBits)) >> 1; }
 
88
 
 
89
  bool isLoad() const { return Flags & MOLoad; }
 
90
  bool isStore() const { return Flags & MOStore; }
 
91
  bool isVolatile() const { return Flags & MOVolatile; }
 
92
  bool isNonTemporal() const { return Flags & MONonTemporal; }
 
93
 
 
94
  /// refineAlignment - Update this MachineMemOperand to reflect the alignment
 
95
  /// of MMO, if it has a greater alignment. This must only be used when the
 
96
  /// new alignment applies to all users of this MachineMemOperand.
 
97
  void refineAlignment(const MachineMemOperand *MMO);
 
98
 
 
99
  /// setValue - Change the SourceValue for this MachineMemOperand. This
 
100
  /// should only be used when an object is being relocated and all references
 
101
  /// to it are being updated.
 
102
  void setValue(const Value *NewSV) { V = NewSV; }
 
103
 
 
104
  /// Profile - Gather unique data for the object.
 
105
  ///
 
106
  void Profile(FoldingSetNodeID &ID) const;
 
107
};
 
108
 
 
109
raw_ostream &operator<<(raw_ostream &OS, const MachineMemOperand &MRO);
 
110
 
 
111
} // End llvm namespace
 
112
 
 
113
#endif