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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 204 |
205 // Multiply a positive smi's integer value by a power of two. | 205 // Multiply a positive smi's integer value by a power of two. |
206 // Provides result as 64-bit integer value. | 206 // Provides result as 64-bit integer value. |
207 void PositiveSmiTimesPowerOfTwoToInteger64(Register dst, | 207 void PositiveSmiTimesPowerOfTwoToInteger64(Register dst, |
208 Register src, | 208 Register src, |
209 int power); | 209 int power); |
210 | 210 |
211 // Simple comparison of smis. | 211 // Simple comparison of smis. |
212 void SmiCompare(Register dst, Register src); | 212 void SmiCompare(Register dst, Register src); |
213 void SmiCompare(Register dst, Smi* src); | 213 void SmiCompare(Register dst, Smi* src); |
| 214 void SmiCompare(Register dst, const Operand& src); |
214 void SmiCompare(const Operand& dst, Register src); | 215 void SmiCompare(const Operand& dst, Register src); |
215 void SmiCompare(const Operand& dst, Smi* src); | 216 void SmiCompare(const Operand& dst, Smi* src); |
216 // Sets sign and zero flags depending on value of smi in register. | 217 // Sets sign and zero flags depending on value of smi in register. |
217 void SmiTest(Register src); | 218 void SmiTest(Register src); |
218 | 219 |
219 // Functions performing a check on a known or potential smi. Returns | 220 // Functions performing a check on a known or potential smi. Returns |
220 // a condition that is satisfied if the check is successful. | 221 // a condition that is satisfied if the check is successful. |
221 | 222 |
222 // Is the value a tagged smi. | 223 // Is the value a tagged smi. |
223 Condition CheckSmi(Register src); | 224 Condition CheckSmi(Register src); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 void SmiAddConstant(Register dst, Register src, Smi* constant); | 295 void SmiAddConstant(Register dst, Register src, Smi* constant); |
295 | 296 |
296 // Add an integer constant to a tagged smi, giving a tagged smi as result, | 297 // Add an integer constant to a tagged smi, giving a tagged smi as result, |
297 // or jumping to a label if the result cannot be represented by a smi. | 298 // or jumping to a label if the result cannot be represented by a smi. |
298 void SmiAddConstant(Register dst, | 299 void SmiAddConstant(Register dst, |
299 Register src, | 300 Register src, |
300 Smi* constant, | 301 Smi* constant, |
301 Label* on_not_smi_result); | 302 Label* on_not_smi_result); |
302 | 303 |
303 // Subtract an integer constant from a tagged smi, giving a tagged smi as | 304 // Subtract an integer constant from a tagged smi, giving a tagged smi as |
304 // result. No testing on the result is done. | 305 // result. No testing on the result is done. Sets the N and Z flags |
| 306 // based on the value of the resulting integer. |
305 void SmiSubConstant(Register dst, Register src, Smi* constant); | 307 void SmiSubConstant(Register dst, Register src, Smi* constant); |
306 | 308 |
307 // Subtract an integer constant from a tagged smi, giving a tagged smi as | 309 // Subtract an integer constant from a tagged smi, giving a tagged smi as |
308 // result, or jumping to a label if the result cannot be represented by a smi. | 310 // result, or jumping to a label if the result cannot be represented by a smi. |
309 void SmiSubConstant(Register dst, | 311 void SmiSubConstant(Register dst, |
310 Register src, | 312 Register src, |
311 Smi* constant, | 313 Smi* constant, |
312 Label* on_not_smi_result); | 314 Label* on_not_smi_result); |
313 | 315 |
314 // Negating a smi can give a negative zero or too large positive value. | 316 // Negating a smi can give a negative zero or too large positive value. |
(...skipping 11 matching lines...) Expand all Loading... |
326 Label* on_not_smi_result); | 328 Label* on_not_smi_result); |
327 | 329 |
328 // Subtracts smi values and return the result as a smi. | 330 // Subtracts smi values and return the result as a smi. |
329 // If dst is src1, then src1 will be destroyed, even if | 331 // If dst is src1, then src1 will be destroyed, even if |
330 // the operation is unsuccessful. | 332 // the operation is unsuccessful. |
331 void SmiSub(Register dst, | 333 void SmiSub(Register dst, |
332 Register src1, | 334 Register src1, |
333 Register src2, | 335 Register src2, |
334 Label* on_not_smi_result); | 336 Label* on_not_smi_result); |
335 | 337 |
| 338 void SmiSub(Register dst, |
| 339 Register src1, |
| 340 Operand const& src2, |
| 341 Label* on_not_smi_result); |
| 342 |
336 // Multiplies smi values and return the result as a smi, | 343 // Multiplies smi values and return the result as a smi, |
337 // if possible. | 344 // if possible. |
338 // If dst is src1, then src1 will be destroyed, even if | 345 // If dst is src1, then src1 will be destroyed, even if |
339 // the operation is unsuccessful. | 346 // the operation is unsuccessful. |
340 void SmiMul(Register dst, | 347 void SmiMul(Register dst, |
341 Register src1, | 348 Register src1, |
342 Register src2, | 349 Register src2, |
343 Label* on_not_smi_result); | 350 Label* on_not_smi_result); |
344 | 351 |
345 // Divides one smi by another and returns the quotient. | 352 // Divides one smi by another and returns the quotient. |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 } \ | 862 } \ |
856 masm-> | 863 masm-> |
857 #else | 864 #else |
858 #define ACCESS_MASM(masm) masm-> | 865 #define ACCESS_MASM(masm) masm-> |
859 #endif | 866 #endif |
860 | 867 |
861 | 868 |
862 } } // namespace v8::internal | 869 } } // namespace v8::internal |
863 | 870 |
864 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 871 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |