| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 void LoadRoot(Register destination, Heap::RootListIndex index); | 72 void LoadRoot(Register destination, Heap::RootListIndex index); |
| 73 void CompareRoot(Register with, Heap::RootListIndex index); | 73 void CompareRoot(Register with, Heap::RootListIndex index); |
| 74 void CompareRoot(Operand with, Heap::RootListIndex index); | 74 void CompareRoot(Operand with, Heap::RootListIndex index); |
| 75 void PushRoot(Heap::RootListIndex index); | 75 void PushRoot(Heap::RootListIndex index); |
| 76 void StoreRoot(Register source, Heap::RootListIndex index); | 76 void StoreRoot(Register source, Heap::RootListIndex index); |
| 77 | 77 |
| 78 // --------------------------------------------------------------------------- | 78 // --------------------------------------------------------------------------- |
| 79 // GC Support | 79 // GC Support |
| 80 | 80 |
| 81 // Set the remebered set bit for an address which points into an | 81 // For page containing |object| mark region covering |addr| dirty. |
| 82 // object. RecordWriteHelper only works if the object is not in new | 82 // RecordWriteHelper only works if the object is not in new |
| 83 // space. | 83 // space. |
| 84 void RecordWriteHelper(Register object, | 84 void RecordWriteHelper(Register object, |
| 85 Register addr, | 85 Register addr, |
| 86 Register scratch); | 86 Register scratch); |
| 87 | 87 |
| 88 // Check if object is in new space. The condition cc can be equal or | 88 // Check if object is in new space. The condition cc can be equal or |
| 89 // not_equal. If it is equal a jump will be done if the object is on new | 89 // not_equal. If it is equal a jump will be done if the object is on new |
| 90 // space. The register scratch can be object itself, but it will be clobbered. | 90 // space. The register scratch can be object itself, but it will be clobbered. |
| 91 void InNewSpace(Register object, | 91 void InNewSpace(Register object, |
| 92 Register scratch, | 92 Register scratch, |
| 93 Condition cc, | 93 Condition cc, |
| 94 Label* branch); | 94 Label* branch); |
| 95 | 95 |
| 96 // Set the remembered set bit for [object+offset]. | 96 // For page containing |object| mark region covering [object+offset] dirty. |
| 97 // object is the object being stored into, value is the object being stored. | 97 // object is the object being stored into, value is the object being stored. |
| 98 // If offset is zero, then the scratch register contains the array index into | 98 // If offset is zero, then the scratch register contains the array index into |
| 99 // the elements array represented as a Smi. | 99 // the elements array represented as a Smi. |
| 100 // All registers are clobbered by the operation. | 100 // All registers are clobbered by the operation. |
| 101 void RecordWrite(Register object, | 101 void RecordWrite(Register object, |
| 102 int offset, | 102 int offset, |
| 103 Register value, | 103 Register value, |
| 104 Register scratch); | 104 Register scratch); |
| 105 | 105 |
| 106 // Set the remembered set bit for [object+offset]. | 106 // For page containing |object| mark region covering [object+offset] dirty. |
| 107 // The value is known to not be a smi. | 107 // The value is known to not be a smi. |
| 108 // object is the object being stored into, value is the object being stored. | 108 // object is the object being stored into, value is the object being stored. |
| 109 // If offset is zero, then the scratch register contains the array index into | 109 // If offset is zero, then the scratch register contains the array index into |
| 110 // the elements array represented as a Smi. | 110 // the elements array represented as a Smi. |
| 111 // All registers are clobbered by the operation. | 111 // All registers are clobbered by the operation. |
| 112 void RecordWriteNonSmi(Register object, | 112 void RecordWriteNonSmi(Register object, |
| 113 int offset, | 113 int offset, |
| 114 Register value, | 114 Register value, |
| 115 Register scratch); | 115 Register scratch); |
| 116 | 116 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 | 213 |
| 214 // Convert smi to 64-bit integer (sign extended if necessary). | 214 // Convert smi to 64-bit integer (sign extended if necessary). |
| 215 void SmiToInteger64(Register dst, Register src); | 215 void SmiToInteger64(Register dst, Register src); |
| 216 | 216 |
| 217 // Multiply a positive smi's integer value by a power of two. | 217 // Multiply a positive smi's integer value by a power of two. |
| 218 // Provides result as 64-bit integer value. | 218 // Provides result as 64-bit integer value. |
| 219 void PositiveSmiTimesPowerOfTwoToInteger64(Register dst, | 219 void PositiveSmiTimesPowerOfTwoToInteger64(Register dst, |
| 220 Register src, | 220 Register src, |
| 221 int power); | 221 int power); |
| 222 | 222 |
| 223 // Divide a positive smi's integer value by a power of two. |
| 224 // Provides result as 32-bit integer value. |
| 225 void PositiveSmiDivPowerOfTwoToInteger32(Register dst, |
| 226 Register src, |
| 227 int power); |
| 228 |
| 229 |
| 223 // Simple comparison of smis. | 230 // Simple comparison of smis. |
| 224 void SmiCompare(Register dst, Register src); | 231 void SmiCompare(Register dst, Register src); |
| 225 void SmiCompare(Register dst, Smi* src); | 232 void SmiCompare(Register dst, Smi* src); |
| 226 void SmiCompare(Register dst, const Operand& src); | 233 void SmiCompare(Register dst, const Operand& src); |
| 227 void SmiCompare(const Operand& dst, Register src); | 234 void SmiCompare(const Operand& dst, Register src); |
| 228 void SmiCompare(const Operand& dst, Smi* src); | 235 void SmiCompare(const Operand& dst, Smi* src); |
| 229 // Sets sign and zero flags depending on value of smi in register. | 236 // Sets sign and zero flags depending on value of smi in register. |
| 230 void SmiTest(Register src); | 237 void SmiTest(Register src); |
| 231 | 238 |
| 232 // Functions performing a check on a known or potential smi. Returns | 239 // Functions performing a check on a known or potential smi. Returns |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 // the label. | 306 // the label. |
| 300 void SmiTryAddConstant(Register dst, | 307 void SmiTryAddConstant(Register dst, |
| 301 Register src, | 308 Register src, |
| 302 Smi* constant, | 309 Smi* constant, |
| 303 Label* on_not_smi_result); | 310 Label* on_not_smi_result); |
| 304 | 311 |
| 305 // Add an integer constant to a tagged smi, giving a tagged smi as result. | 312 // Add an integer constant to a tagged smi, giving a tagged smi as result. |
| 306 // No overflow testing on the result is done. | 313 // No overflow testing on the result is done. |
| 307 void SmiAddConstant(Register dst, Register src, Smi* constant); | 314 void SmiAddConstant(Register dst, Register src, Smi* constant); |
| 308 | 315 |
| 316 // Add an integer constant to a tagged smi, giving a tagged smi as result. |
| 317 // No overflow testing on the result is done. |
| 318 void SmiAddConstant(const Operand& dst, Smi* constant); |
| 319 |
| 309 // Add an integer constant to a tagged smi, giving a tagged smi as result, | 320 // Add an integer constant to a tagged smi, giving a tagged smi as result, |
| 310 // or jumping to a label if the result cannot be represented by a smi. | 321 // or jumping to a label if the result cannot be represented by a smi. |
| 311 void SmiAddConstant(Register dst, | 322 void SmiAddConstant(Register dst, |
| 312 Register src, | 323 Register src, |
| 313 Smi* constant, | 324 Smi* constant, |
| 314 Label* on_not_smi_result); | 325 Label* on_not_smi_result); |
| 315 | 326 |
| 316 // Subtract an integer constant from a tagged smi, giving a tagged smi as | 327 // Subtract an integer constant from a tagged smi, giving a tagged smi as |
| 317 // result. No testing on the result is done. Sets the N and Z flags | 328 // result. No testing on the result is done. Sets the N and Z flags |
| 318 // based on the value of the resulting integer. | 329 // based on the value of the resulting integer. |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 } \ | 883 } \ |
| 873 masm-> | 884 masm-> |
| 874 #else | 885 #else |
| 875 #define ACCESS_MASM(masm) masm-> | 886 #define ACCESS_MASM(masm) masm-> |
| 876 #endif | 887 #endif |
| 877 | 888 |
| 878 | 889 |
| 879 } } // namespace v8::internal | 890 } } // namespace v8::internal |
| 880 | 891 |
| 881 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 892 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
| OLD | NEW |