Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: test/NaCl/X86/pnacl-avoids-r11-x86-64.c

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/NaCl/X86/pic-nacl-x8632.ll ('k') | test/NaCl/X86/pnacl-avoids-r11-x86-64.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 Object file built using:
3 pnacl-clang -S -O2 -emit-llvm -o pnacl-avoids-r11-x86-64.ll \
4 pnacl-avoids-r11-x86-64.c
5 Then the comments below should be pasted into the .ll file,
6 replacing "RUNxxx" with "RUN".
7
8 ; The NACLON test verifies that %r11 and %r11d are not used except as
9 ; part of the return sequence.
10 ;
11 ; RUNxxx: pnacl-llc -O2 -mtriple=x86_64-none-nacl < %s | \
12 ; RUNxxx: FileCheck %s --check-prefix=NACLON
13 ;
14 ; The NACLOFF test verifies that %r11 would normally be used if PNaCl
15 ; weren't reserving r11 for its own uses, to be sure NACLON is a
16 ; valid test.
17 ;
18 ; RUNxxx: pnacl-llc -O2 -mtriple=x86_64-linux < %s | \
19 ; RUNxxx: FileCheck %s --check-prefix=NACLOFF
20 ;
21 ; NACLON: RegisterPressure:
22 ; NACLON-NOT: %r11
23 ; NACLON: popq %r11
24 ; NACLON: nacljmp %r11, %r15
25 ;
26 ; NACLOFF: RegisterPressure:
27 ; NACLOFF: %r11
28 ; NACLOFF: ret
29
30 */
31
32 // Function RegisterPressure() tries to induce maximal integer
33 // register pressure in a ~16 register machine, for both scratch and
34 // preserved registers. Repeated calls to Use() are designed to
35 // use all the preserved registers. The calculations on the local
36 // variables between function calls are designed to use all the
37 // scratch registers.
38
39 void RegisterPressure(void)
40 {
41 extern void Use(int, int, int, int, int, int, int, int,
42 int, int, int, int, int, int, int, int);
43 extern int GetValue(void);
44 extern volatile int v1a, v1b, v2a, v2b, v3a, v3b, v4a, v4b;
45
46 int i00 = GetValue();
47 int i01 = GetValue();
48 int i02 = GetValue();
49 int i03 = GetValue();
50 int i04 = GetValue();
51 int i05 = GetValue();
52 int i06 = GetValue();
53 int i07 = GetValue();
54 int i08 = GetValue();
55 int i09 = GetValue();
56 int i10 = GetValue();
57 int i11 = GetValue();
58 int i12 = GetValue();
59 int i13 = GetValue();
60 int i14 = GetValue();
61 int i15 = GetValue();
62
63 Use(i00, i01, i02, i03, i04, i05, i06, i07,
64 i08, i09, i10, i11, i12, i13, i14, i15);
65 Use(i00, i01, i02, i03, i04, i05, i06, i07,
66 i08, i09, i10, i11, i12, i13, i14, i15);
67 v1a = i00 + i01 + i02 + i03 + i04 + i05 + i06 + i07;
68 v1b = i08 + i09 + i10 + i11 + i12 + i13 + i14 + i15;
69 v2a = i00 + i01 + i02 + i03 + i08 + i09 + i10 + i11;
70 v2b = i04 + i05 + i06 + i07 + i12 + i13 + i14 + i15;
71 v3a = i00 + i01 + i04 + i05 + i08 + i09 + i12 + i13;
72 v3b = i02 + i03 + i06 + i07 + i10 + i11 + i14 + i15;
73 v4a = i00 + i02 + i04 + i06 + i08 + i10 + i12 + i14;
74 v4b = i01 + i03 + i05 + i07 + i09 + i11 + i13 + i15;
75 Use(i00, i01, i02, i03, i04, i05, i06, i07,
76 i08, i09, i10, i11, i12, i13, i14, i15);
77 Use(i00, i01, i02, i03, i04, i05, i06, i07,
78 i08, i09, i10, i11, i12, i13, i14, i15);
79 }
OLDNEW
« no previous file with comments | « test/NaCl/X86/pic-nacl-x8632.ll ('k') | test/NaCl/X86/pnacl-avoids-r11-x86-64.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698