OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 Condition CheckNotBothSmi(Register first, Register second); | 186 Condition CheckNotBothSmi(Register first, Register second); |
187 | 187 |
188 // Is the value the minimum smi value (since we are using | 188 // Is the value the minimum smi value (since we are using |
189 // two's complement numbers, negating the value is known to yield | 189 // two's complement numbers, negating the value is known to yield |
190 // a non-smi value). | 190 // a non-smi value). |
191 Condition CheckIsMinSmi(Register src); | 191 Condition CheckIsMinSmi(Register src); |
192 | 192 |
193 // Check whether a tagged smi is equal to a constant. | 193 // Check whether a tagged smi is equal to a constant. |
194 Condition CheckSmiEqualsConstant(Register src, int constant); | 194 Condition CheckSmiEqualsConstant(Register src, int constant); |
195 | 195 |
| 196 // Check whether a tagged smi is greater than or equal to a constant. |
| 197 Condition CheckSmiGreaterEqualsConstant(Register src, int constant); |
| 198 |
196 // Checks whether an 32-bit integer value is a valid for conversion | 199 // Checks whether an 32-bit integer value is a valid for conversion |
197 // to a smi. | 200 // to a smi. |
198 Condition CheckInteger32ValidSmiValue(Register src); | 201 Condition CheckInteger32ValidSmiValue(Register src); |
199 | 202 |
200 // Test-and-jump functions. Typically combines a check function | 203 // Test-and-jump functions. Typically combines a check function |
201 // above with a conditional jump. | 204 // above with a conditional jump. |
202 | 205 |
203 // Jump if the value cannot be represented by a smi. | 206 // Jump if the value cannot be represented by a smi. |
204 void JumpIfNotValidSmiValue(Register src, Label* on_invalid); | 207 void JumpIfNotValidSmiValue(Register src, Label* on_invalid); |
205 | 208 |
206 // Jump to label if the value is a tagged smi. | 209 // Jump to label if the value is a tagged smi. |
207 void JumpIfSmi(Register src, Label* on_smi); | 210 void JumpIfSmi(Register src, Label* on_smi); |
208 | 211 |
209 // Jump to label if the value is not a tagged smi. | 212 // Jump to label if the value is not a tagged smi. |
210 void JumpIfNotSmi(Register src, Label* on_not_smi); | 213 void JumpIfNotSmi(Register src, Label* on_not_smi); |
211 | 214 |
212 // Jump to label if the value is not a positive tagged smi. | 215 // Jump to label if the value is not a positive tagged smi. |
213 void JumpIfNotPositiveSmi(Register src, Label* on_not_smi); | 216 void JumpIfNotPositiveSmi(Register src, Label* on_not_smi); |
214 | 217 |
215 // Jump to label if the value is a tagged smi with value equal | 218 // Jump to label if the value is a tagged smi with value equal |
216 // to the constant. | 219 // to the constant. |
217 void JumpIfSmiEqualsConstant(Register src, int constant, Label* on_equals); | 220 void JumpIfSmiEqualsConstant(Register src, int constant, Label* on_equals); |
218 | 221 |
| 222 // Jump to label if the value is a tagged smi with value greater than or equal |
| 223 // to the constant. |
| 224 void JumpIfSmiGreaterEqualsConstant(Register src, |
| 225 int constant, |
| 226 Label* on_equals); |
| 227 |
219 // Jump if either or both register are not smi values. | 228 // Jump if either or both register are not smi values. |
220 void JumpIfNotBothSmi(Register src1, Register src2, Label* on_not_both_smi); | 229 void JumpIfNotBothSmi(Register src1, Register src2, Label* on_not_both_smi); |
221 | 230 |
222 // Operations on tagged smi values. | 231 // Operations on tagged smi values. |
223 | 232 |
224 // Smis represent a subset of integers. The subset is always equivalent to | 233 // Smis represent a subset of integers. The subset is always equivalent to |
225 // a two's complement interpretation of a fixed number of bits. | 234 // a two's complement interpretation of a fixed number of bits. |
226 | 235 |
227 // Optimistically adds an integer constant to a supposed smi. | 236 // Optimistically adds an integer constant to a supposed smi. |
228 // If the src is not a smi, or the result is not a smi, jump to | 237 // If the src is not a smi, or the result is not a smi, jump to |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 } \ | 676 } \ |
668 masm-> | 677 masm-> |
669 #else | 678 #else |
670 #define ACCESS_MASM(masm) masm-> | 679 #define ACCESS_MASM(masm) masm-> |
671 #endif | 680 #endif |
672 | 681 |
673 | 682 |
674 } } // namespace v8::internal | 683 } } // namespace v8::internal |
675 | 684 |
676 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 685 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |