Roll src/third_party/WebKit 06cb9e9:a978ee5 (svn 202558:202559)
[chromium-blink-merge.git] / third_party / tcmalloc / vendor / src / windows / shortproc.asm
blob7e8e3d78395af1c4afc0c3efe650746b84d4c333
1 ; Copyright (c) 2011, Google Inc.
2 ; All rights reserved.
3 ;
4 ; Redistribution and use in source and binary forms, with or without
5 ; modification, are permitted provided that the following conditions are
6 ; met:
7 ;
8 ; * Redistributions of source code must retain the above copyright
9 ; notice, this list of conditions and the following disclaimer.
10 ; * Redistributions in binary form must reproduce the above
11 ; copyright notice, this list of conditions and the following disclaimer
12 ; in the documentation and/or other materials provided with the
13 ; distribution.
14 ; * Neither the name of Google Inc. nor the names of its
15 ; contributors may be used to endorse or promote products derived from
16 ; this software without specific prior written permission.
18 ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 ; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 ; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 ; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 ; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 ; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 ; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 ; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 ; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 ; ---
31 ; Author: Scott Francis
33 ; Unit tests for PreamblePatcher
35 .MODEL small
37 .CODE
39 TooShortFunction PROC
40 ret
41 TooShortFunction ENDP
43 JumpShortCondFunction PROC
44 test cl, 1
45 jnz jumpspot
46 int 3
47 int 3
48 int 3
49 int 3
50 int 3
51 int 3
52 int 3
53 int 3
54 int 3
55 int 3
56 int 3
57 int 3
58 int 3
59 int 3
60 int 3
61 int 3
62 int 3
63 int 3
64 int 3
65 int 3
66 int 3
67 int 3
68 int 3
69 int 3
70 int 3
71 int 3
72 int 3
73 int 3
74 jumpspot:
75 nop
76 nop
77 nop
78 nop
79 mov rax, 1
80 ret
81 JumpShortCondFunction ENDP
83 JumpNearCondFunction PROC
84 test cl, 1
85 jnz jumpspot
86 mov rdx, 0ffff1111H
87 mov rdx, 0ffff1111H
88 mov rdx, 0ffff1111H
89 mov rdx, 0ffff1111H
90 mov rdx, 0ffff1111H
91 mov rdx, 0ffff1111H
92 mov rdx, 0ffff1111H
93 mov rdx, 0ffff1111H
94 mov rdx, 0ffff1111H
95 mov rdx, 0ffff1111H
96 mov rdx, 0ffff1111H
97 mov rdx, 0ffff1111H
98 mov rdx, 0ffff1111H
99 mov rdx, 0ffff1111H
100 mov rdx, 0ffff1111H
101 mov rdx, 0ffff1111H
102 mov rdx, 0ffff1111H
103 mov rdx, 0ffff1111H
104 mov rdx, 0ffff1111H
105 mov rdx, 0ffff1111H
106 jumpspot:
109 mov rax, 1
111 JumpNearCondFunction ENDP
113 JumpAbsoluteFunction PROC
114 test cl, 1
115 jmp jumpspot
116 mov rdx, 0ffff1111H
117 mov rdx, 0ffff1111H
118 mov rdx, 0ffff1111H
119 mov rdx, 0ffff1111H
120 mov rdx, 0ffff1111H
121 mov rdx, 0ffff1111H
122 mov rdx, 0ffff1111H
123 mov rdx, 0ffff1111H
124 mov rdx, 0ffff1111H
125 mov rdx, 0ffff1111H
126 mov rdx, 0ffff1111H
127 mov rdx, 0ffff1111H
128 mov rdx, 0ffff1111H
129 mov rdx, 0ffff1111H
130 mov rdx, 0ffff1111H
131 mov rdx, 0ffff1111H
132 mov rdx, 0ffff1111H
133 mov rdx, 0ffff1111H
134 mov rdx, 0ffff1111H
135 mov rdx, 0ffff1111H
136 mov rdx, 0ffff1111H
137 mov rdx, 0ffff1111H
138 mov rdx, 0ffff1111H
139 mov rdx, 0ffff1111H
140 mov rdx, 0ffff1111H
141 mov rdx, 0ffff1111H
142 mov rdx, 0ffff1111H
143 jumpspot:
146 mov rax, 1
148 JumpAbsoluteFunction ENDP
150 CallNearRelativeFunction PROC
151 test cl, 1
152 call TooShortFunction
153 mov rdx, 0ffff1111H
154 mov rdx, 0ffff1111H
155 mov rdx, 0ffff1111H
156 mov rdx, 0ffff1111H
157 mov rdx, 0ffff1111H
158 mov rdx, 0ffff1111H
159 mov rdx, 0ffff1111H
160 mov rdx, 0ffff1111H
161 mov rdx, 0ffff1111H
162 mov rdx, 0ffff1111H
167 CallNearRelativeFunction ENDP