~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/test/CodeGen/X86/2010-02-19-TailCallRetAddrBug.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 -mtriple=i386-apple-darwin -tailcallopt < %s | FileCheck %s
 
2
; Check that lowered argumens do not overwrite the return address before it is moved.
 
3
; Bug 6225
 
4
;
 
5
; If a call is a fastcc tail call and tail call optimization is enabled, the
 
6
; caller frame is replaced by the callee frame. This can require that arguments are 
 
7
; placed on the former return address stack slot. Special care needs to be taken
 
8
; taken that the return address is moved / or stored in a register before
 
9
; lowering of arguments potentially overwrites the value.
 
10
;
 
11
; Move return address (76(%esp)) to a temporary register (%ebp)
 
12
; CHECK: movl 76(%esp), %ebp
 
13
; Overwrite return addresss
 
14
; CHECK: movl %ecx, 76(%esp)
 
15
; Move return address from temporary register (%ebp) to new stack location (60(%esp))
 
16
; CHECK: movl %ebp, 60(%esp)
 
17
 
 
18
%tupl_p = type [9 x i32]*
 
19
 
 
20
declare fastcc void @l297(i32 %r10, i32 %r9, i32 %r8, i32 %r7, i32 %r6, i32 %r5, i32 %r3, i32 %r2) noreturn nounwind
 
21
declare fastcc void @l298(i32 %r10, i32 %r9, i32 %r4) noreturn nounwind
 
22
 
 
23
define fastcc void @l186(%tupl_p %r1) noreturn nounwind {
 
24
entry:
 
25
  %ptr1 = getelementptr %tupl_p %r1, i32 0, i32 0
 
26
  %r2 = load i32* %ptr1
 
27
  %ptr3 = getelementptr %tupl_p %r1, i32 0, i32 1
 
28
  %r3 = load i32* %ptr3
 
29
  %ptr5 = getelementptr %tupl_p %r1, i32 0, i32 2
 
30
  %r4 = load i32* %ptr5
 
31
  %ptr7 = getelementptr %tupl_p %r1, i32 0, i32 3
 
32
  %r5 = load i32* %ptr7
 
33
  %ptr9 = getelementptr %tupl_p %r1, i32 0, i32 4
 
34
  %r6 = load i32* %ptr9
 
35
  %ptr11 = getelementptr %tupl_p %r1, i32 0, i32 5
 
36
  %r7 = load i32* %ptr11
 
37
  %ptr13 = getelementptr %tupl_p %r1, i32 0, i32 6
 
38
  %r8 = load i32* %ptr13
 
39
  %ptr15 = getelementptr %tupl_p %r1, i32 0, i32 7
 
40
  %r9 = load i32* %ptr15
 
41
  %ptr17 = getelementptr %tupl_p %r1, i32 0, i32 8
 
42
  %r10 = load i32* %ptr17
 
43
  %cond = icmp eq i32 %r10, 3
 
44
  br i1 %cond, label %true, label %false
 
45
 
 
46
true:
 
47
  tail call fastcc void @l297(i32 %r10, i32 %r9, i32 %r8, i32 %r7, i32 %r6, i32 %r5, i32 %r3, i32 %r2) noreturn nounwind
 
48
  ret void
 
49
 
 
50
false:
 
51
  tail call fastcc void @l298(i32 %r10, i32 %r9, i32 %r4) noreturn nounwind
 
52
  ret void
 
53
}
 
54
 
 
55