| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 953 | 953 |
| 954 template<typename Field> | 954 template<typename Field> |
| 955 void DecodeField(Register reg) { | 955 void DecodeField(Register reg) { |
| 956 static const int shift = Field::kShift + kSmiShift; | 956 static const int shift = Field::kShift + kSmiShift; |
| 957 static const int mask = Field::kMask >> Field::kShift; | 957 static const int mask = Field::kMask >> Field::kShift; |
| 958 shr(reg, Immediate(shift)); | 958 shr(reg, Immediate(shift)); |
| 959 and_(reg, Immediate(mask)); | 959 and_(reg, Immediate(mask)); |
| 960 shl(reg, Immediate(kSmiShift)); | 960 shl(reg, Immediate(kSmiShift)); |
| 961 } | 961 } |
| 962 | 962 |
| 963 // Abort execution if argument is not a number. Used in debug code. | 963 // Abort execution if argument is not a number, enabled via --debug-code. |
| 964 void AbortIfNotNumber(Register object); | 964 void AssertNumber(Register object); |
| 965 | 965 |
| 966 // Abort execution if argument is a smi. Used in debug code. | 966 // Abort execution if argument is a smi, enabled via --debug-code. |
| 967 void AbortIfSmi(Register object); | 967 void AssertNotSmi(Register object); |
| 968 | 968 |
| 969 // Abort execution if argument is not a smi. Used in debug code. | 969 // Abort execution if argument is not a smi, enabled via --debug-code. |
| 970 void AbortIfNotSmi(Register object); | 970 void AssertSmi(Register object); |
| 971 void AbortIfNotSmi(const Operand& object); | 971 void AssertSmi(const Operand& object); |
| 972 | 972 |
| 973 // Abort execution if a 64 bit register containing a 32 bit payload does not | 973 // Abort execution if a 64 bit register containing a 32 bit payload does not |
| 974 // have zeros in the top 32 bits. | 974 // have zeros in the top 32 bits, enabled via --debug-code. |
| 975 void AbortIfNotZeroExtended(Register reg); | 975 void AssertZeroExtended(Register reg); |
| 976 | 976 |
| 977 // Abort execution if argument is a string. Used in debug code. | 977 // Abort execution if argument is not a string, enabled via --debug-code. |
| 978 void AbortIfNotString(Register object); | 978 void AssertString(Register object); |
| 979 | 979 |
| 980 // Abort execution if argument is not the root value with the given index. | 980 // Abort execution if argument is not the root value with the given index, |
| 981 void AbortIfNotRootValue(Register src, | 981 // enabled via --debug-code. |
| 982 Heap::RootListIndex root_value_index, | 982 void AssertRootValue(Register src, |
| 983 const char* message); | 983 Heap::RootListIndex root_value_index, |
| 984 const char* message); |
| 984 | 985 |
| 985 // --------------------------------------------------------------------------- | 986 // --------------------------------------------------------------------------- |
| 986 // Exception handling | 987 // Exception handling |
| 987 | 988 |
| 988 // Push a new try handler and link it into try handler chain. | 989 // Push a new try handler and link it into try handler chain. |
| 989 void PushTryHandler(StackHandler::Kind kind, int handler_index); | 990 void PushTryHandler(StackHandler::Kind kind, int handler_index); |
| 990 | 991 |
| 991 // Unlink the stack handler on top of the stack from the try handler chain. | 992 // Unlink the stack handler on top of the stack from the try handler chain. |
| 992 void PopTryHandler(); | 993 void PopTryHandler(); |
| 993 | 994 |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1496 masm->popfd(); \ | 1497 masm->popfd(); \ |
| 1497 } \ | 1498 } \ |
| 1498 masm-> | 1499 masm-> |
| 1499 #else | 1500 #else |
| 1500 #define ACCESS_MASM(masm) masm-> | 1501 #define ACCESS_MASM(masm) masm-> |
| 1501 #endif | 1502 #endif |
| 1502 | 1503 |
| 1503 } } // namespace v8::internal | 1504 } } // namespace v8::internal |
| 1504 | 1505 |
| 1505 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1506 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
| OLD | NEW |