~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/test/CodeGen/X86/tailcall-largecode.ll

  • 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
; RUN: llc < %s -mtriple=x86_64-linux-gnu -tailcallopt -code-model=large | FileCheck %s
 
2
 
 
3
declare fastcc i32 @callee(i32 %arg)
 
4
define fastcc i32 @directcall(i32 %arg) {
 
5
entry:
 
6
; This is the large code model, so &callee may not fit into the jmp
 
7
; instruction.  Instead, stick it into a register.
 
8
;  CHECK: movabsq $callee, [[REGISTER:%r[a-z0-9]+]]
 
9
;  CHECK: jmpq    *[[REGISTER]]  # TAILCALL
 
10
  %res = tail call fastcc i32 @callee(i32 %arg)
 
11
  ret i32 %res
 
12
}
 
13
 
 
14
; Check that the register used for an indirect tail call doesn't
 
15
; clobber any of the arguments.
 
16
define fastcc i32 @indirect_manyargs(i32(i32,i32,i32,i32,i32,i32,i32)* %target) {
 
17
; Adjust the stack to enter the function.  (The amount of the
 
18
; adjustment may change in the future, in which case the location of
 
19
; the stack argument and the return adjustment will change too.)
 
20
;  CHECK: subq $8, %rsp
 
21
; Put the call target into R11, which won't be clobbered while restoring
 
22
; callee-saved registers and won't be used for passing arguments.
 
23
;  CHECK: movq %rdi, %r11
 
24
; Pass the stack argument.
 
25
;  CHECK: movl $7, 16(%rsp)
 
26
; Pass the register arguments, in the right registers.
 
27
;  CHECK: movl $1, %edi
 
28
;  CHECK: movl $2, %esi
 
29
;  CHECK: movl $3, %edx
 
30
;  CHECK: movl $4, %ecx
 
31
;  CHECK: movl $5, %r8d
 
32
;  CHECK: movl $6, %r9d
 
33
; Adjust the stack to "return".
 
34
;  CHECK: addq $8, %rsp
 
35
; And tail-call to the target.
 
36
;  CHECK: jmpq *%r11  # TAILCALL
 
37
  %res = tail call fastcc i32 %target(i32 1, i32 2, i32 3, i32 4, i32 5,
 
38
                                      i32 6, i32 7)
 
39
  ret i32 %res
 
40
}
 
41
 
 
42
; Check that the register used for a direct tail call doesn't clobber
 
43
; any of the arguments.
 
44
declare fastcc i32 @manyargs_callee(i32,i32,i32,i32,i32,i32,i32)
 
45
define fastcc i32 @direct_manyargs() {
 
46
; Adjust the stack to enter the function.  (The amount of the
 
47
; adjustment may change in the future, in which case the location of
 
48
; the stack argument and the return adjustment will change too.)
 
49
;  CHECK: subq $8, %rsp
 
50
; Pass the stack argument.
 
51
;  CHECK: movl $7, 16(%rsp)
 
52
; Pass the register arguments, in the right registers.
 
53
;  CHECK: movl $1, %edi
 
54
;  CHECK: movl $2, %esi
 
55
;  CHECK: movl $3, %edx
 
56
;  CHECK: movl $4, %ecx
 
57
;  CHECK: movl $5, %r8d
 
58
;  CHECK: movl $6, %r9d
 
59
; This is the large code model, so &manyargs_callee may not fit into
 
60
; the jmp instruction.  Put it into R11, which won't be clobbered
 
61
; while restoring callee-saved registers and won't be used for passing
 
62
; arguments.
 
63
;  CHECK: movabsq $manyargs_callee, %r11
 
64
; Adjust the stack to "return".
 
65
;  CHECK: addq $8, %rsp
 
66
; And tail-call to the target.
 
67
;  CHECK: jmpq *%r11  # TAILCALL
 
68
  %res = tail call fastcc i32 @manyargs_callee(i32 1, i32 2, i32 3, i32 4,
 
69
                                               i32 5, i32 6, i32 7)
 
70
  ret i32 %res
 
71
}