~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/lib/Target/X86/X86JITInfo.h

  • 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
//===- X86JITInfo.h - X86 implementation of the JIT interface  --*- 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 X86 implementation of the TargetJITInfo class.
 
11
//
 
12
//===----------------------------------------------------------------------===//
 
13
 
 
14
#ifndef X86JITINFO_H
 
15
#define X86JITINFO_H
 
16
 
 
17
#include "llvm/Function.h"
 
18
#include "llvm/CodeGen/JITCodeEmitter.h"
 
19
#include "llvm/Target/TargetJITInfo.h"
 
20
 
 
21
namespace llvm {
 
22
  class X86TargetMachine;
 
23
  class X86Subtarget;
 
24
 
 
25
  class X86JITInfo : public TargetJITInfo {
 
26
    X86TargetMachine &TM;
 
27
    const X86Subtarget *Subtarget;
 
28
    uintptr_t PICBase;
 
29
    char* TLSOffset;
 
30
  public:
 
31
    explicit X86JITInfo(X86TargetMachine &tm);
 
32
 
 
33
    /// replaceMachineCodeForFunction - Make it so that calling the function
 
34
    /// whose machine code is at OLD turns into a call to NEW, perhaps by
 
35
    /// overwriting OLD with a branch to NEW.  This is used for self-modifying
 
36
    /// code.
 
37
    ///
 
38
    virtual void replaceMachineCodeForFunction(void *Old, void *New);
 
39
 
 
40
    /// emitGlobalValueIndirectSym - Use the specified JITCodeEmitter object
 
41
    /// to emit an indirect symbol which contains the address of the specified
 
42
    /// ptr.
 
43
    virtual void *emitGlobalValueIndirectSym(const GlobalValue* GV, void *ptr,
 
44
                                             JITCodeEmitter &JCE);
 
45
 
 
46
    // getStubLayout - Returns the size and alignment of the largest call stub
 
47
    // on X86.
 
48
    virtual StubLayout getStubLayout();
 
49
 
 
50
    /// emitFunctionStub - Use the specified JITCodeEmitter object to emit a
 
51
    /// small native function that simply calls the function at the specified
 
52
    /// address.
 
53
    virtual void *emitFunctionStub(const Function* F, void *Target,
 
54
                                   JITCodeEmitter &JCE);
 
55
 
 
56
    /// getPICJumpTableEntry - Returns the value of the jumptable entry for the
 
57
    /// specific basic block.
 
58
    virtual uintptr_t getPICJumpTableEntry(uintptr_t BB, uintptr_t JTBase);
 
59
 
 
60
    /// getLazyResolverFunction - Expose the lazy resolver to the JIT.
 
61
    virtual LazyResolverFn getLazyResolverFunction(JITCompilerFn);
 
62
 
 
63
    /// relocate - Before the JIT can run a block of code that has been emitted,
 
64
    /// it must rewrite the code to contain the actual addresses of any
 
65
    /// referenced global symbols.
 
66
    virtual void relocate(void *Function, MachineRelocation *MR,
 
67
                          unsigned NumRelocs, unsigned char* GOTBase);
 
68
    
 
69
    /// allocateThreadLocalMemory - Each target has its own way of
 
70
    /// handling thread local variables. This method returns a value only
 
71
    /// meaningful to the target.
 
72
    virtual char* allocateThreadLocalMemory(size_t size);
 
73
 
 
74
    /// setPICBase / getPICBase - Getter / setter of PICBase, used to compute
 
75
    /// PIC jumptable entry.
 
76
    void setPICBase(uintptr_t Base) { PICBase = Base; }
 
77
    uintptr_t getPICBase() const { return PICBase; }
 
78
  };
 
79
}
 
80
 
 
81
#endif