| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 | 190 |
| 191 // Multiply a positive smi's integer value by a power of two. | 191 // Multiply a positive smi's integer value by a power of two. |
| 192 // Provides result as 64-bit integer value. | 192 // Provides result as 64-bit integer value. |
| 193 void PositiveSmiTimesPowerOfTwoToInteger64(Register dst, | 193 void PositiveSmiTimesPowerOfTwoToInteger64(Register dst, |
| 194 Register src, | 194 Register src, |
| 195 int power); | 195 int power); |
| 196 | 196 |
| 197 // Simple comparison of smis. | 197 // Simple comparison of smis. |
| 198 void SmiCompare(Register dst, Register src); | 198 void SmiCompare(Register dst, Register src); |
| 199 void SmiCompare(Register dst, Smi* src); | 199 void SmiCompare(Register dst, Smi* src); |
| 200 void SmiCompare(Register dst, const Operand& src); | |
| 201 void SmiCompare(const Operand& dst, Register src); | 200 void SmiCompare(const Operand& dst, Register src); |
| 202 void SmiCompare(const Operand& dst, Smi* src); | 201 void SmiCompare(const Operand& dst, Smi* src); |
| 203 // Sets sign and zero flags depending on value of smi in register. | 202 // Sets sign and zero flags depending on value of smi in register. |
| 204 void SmiTest(Register src); | 203 void SmiTest(Register src); |
| 205 | 204 |
| 206 // Functions performing a check on a known or potential smi. Returns | 205 // Functions performing a check on a known or potential smi. Returns |
| 207 // a condition that is satisfied if the check is successful. | 206 // a condition that is satisfied if the check is successful. |
| 208 | 207 |
| 209 // Is the value a tagged smi. | 208 // Is the value a tagged smi. |
| 210 Condition CheckSmi(Register src); | 209 Condition CheckSmi(Register src); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 void SmiAddConstant(Register dst, Register src, Smi* constant); | 280 void SmiAddConstant(Register dst, Register src, Smi* constant); |
| 282 | 281 |
| 283 // Add an integer constant to a tagged smi, giving a tagged smi as result, | 282 // Add an integer constant to a tagged smi, giving a tagged smi as result, |
| 284 // or jumping to a label if the result cannot be represented by a smi. | 283 // or jumping to a label if the result cannot be represented by a smi. |
| 285 void SmiAddConstant(Register dst, | 284 void SmiAddConstant(Register dst, |
| 286 Register src, | 285 Register src, |
| 287 Smi* constant, | 286 Smi* constant, |
| 288 Label* on_not_smi_result); | 287 Label* on_not_smi_result); |
| 289 | 288 |
| 290 // Subtract an integer constant from a tagged smi, giving a tagged smi as | 289 // Subtract an integer constant from a tagged smi, giving a tagged smi as |
| 291 // result. No testing on the result is done. Sets the N and Z flags | 290 // result. No testing on the result is done. |
| 292 // based on the value of the resulting integer. | |
| 293 void SmiSubConstant(Register dst, Register src, Smi* constant); | 291 void SmiSubConstant(Register dst, Register src, Smi* constant); |
| 294 | 292 |
| 295 // Subtract an integer constant from a tagged smi, giving a tagged smi as | 293 // Subtract an integer constant from a tagged smi, giving a tagged smi as |
| 296 // result, or jumping to a label if the result cannot be represented by a smi. | 294 // result, or jumping to a label if the result cannot be represented by a smi. |
| 297 void SmiSubConstant(Register dst, | 295 void SmiSubConstant(Register dst, |
| 298 Register src, | 296 Register src, |
| 299 Smi* constant, | 297 Smi* constant, |
| 300 Label* on_not_smi_result); | 298 Label* on_not_smi_result); |
| 301 | 299 |
| 302 // Negating a smi can give a negative zero or too large positive value. | 300 // Negating a smi can give a negative zero or too large positive value. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 314 Label* on_not_smi_result); | 312 Label* on_not_smi_result); |
| 315 | 313 |
| 316 // Subtracts smi values and return the result as a smi. | 314 // Subtracts smi values and return the result as a smi. |
| 317 // If dst is src1, then src1 will be destroyed, even if | 315 // If dst is src1, then src1 will be destroyed, even if |
| 318 // the operation is unsuccessful. | 316 // the operation is unsuccessful. |
| 319 void SmiSub(Register dst, | 317 void SmiSub(Register dst, |
| 320 Register src1, | 318 Register src1, |
| 321 Register src2, | 319 Register src2, |
| 322 Label* on_not_smi_result); | 320 Label* on_not_smi_result); |
| 323 | 321 |
| 324 void SmiSub(Register dst, | |
| 325 Register src1, | |
| 326 Operand const& src2, | |
| 327 Label* on_not_smi_result); | |
| 328 | |
| 329 // Multiplies smi values and return the result as a smi, | 322 // Multiplies smi values and return the result as a smi, |
| 330 // if possible. | 323 // if possible. |
| 331 // If dst is src1, then src1 will be destroyed, even if | 324 // If dst is src1, then src1 will be destroyed, even if |
| 332 // the operation is unsuccessful. | 325 // the operation is unsuccessful. |
| 333 void SmiMul(Register dst, | 326 void SmiMul(Register dst, |
| 334 Register src1, | 327 Register src1, |
| 335 Register src2, | 328 Register src2, |
| 336 Label* on_not_smi_result); | 329 Label* on_not_smi_result); |
| 337 | 330 |
| 338 // Divides one smi by another and returns the quotient. | 331 // Divides one smi by another and returns the quotient. |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 } \ | 829 } \ |
| 837 masm-> | 830 masm-> |
| 838 #else | 831 #else |
| 839 #define ACCESS_MASM(masm) masm-> | 832 #define ACCESS_MASM(masm) masm-> |
| 840 #endif | 833 #endif |
| 841 | 834 |
| 842 | 835 |
| 843 } } // namespace v8::internal | 836 } } // namespace v8::internal |
| 844 | 837 |
| 845 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 838 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
| OLD | NEW |