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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 } | 483 } |
484 // Jump if register contain a non-smi. | 484 // Jump if register contain a non-smi. |
485 inline void JumpIfNotSmi(Register value, | 485 inline void JumpIfNotSmi(Register value, |
486 Label* not_smi_label, | 486 Label* not_smi_label, |
487 Label::Distance distance = Label::kFar) { | 487 Label::Distance distance = Label::kFar) { |
488 test(value, Immediate(kSmiTagMask)); | 488 test(value, Immediate(kSmiTagMask)); |
489 j(not_zero, not_smi_label, distance); | 489 j(not_zero, not_smi_label, distance); |
490 } | 490 } |
491 | 491 |
492 void LoadInstanceDescriptors(Register map, Register descriptors); | 492 void LoadInstanceDescriptors(Register map, Register descriptors); |
| 493 void EnumLength(Register dst, Register map); |
493 | 494 |
| 495 template<typename Field> |
| 496 void DecodeField(Register reg) { |
| 497 static const int full_shift = Field::kShift + kSmiTagSize; |
| 498 static const int low_mask = Field::kMask >> Field::kShift; |
| 499 sar(reg, full_shift); |
| 500 and_(reg, Immediate(low_mask)); |
| 501 } |
494 void LoadPowerOf2(XMMRegister dst, Register scratch, int power); | 502 void LoadPowerOf2(XMMRegister dst, Register scratch, int power); |
495 | 503 |
496 // Abort execution if argument is not a number. Used in debug code. | 504 // Abort execution if argument is not a number. Used in debug code. |
497 void AbortIfNotNumber(Register object); | 505 void AbortIfNotNumber(Register object); |
498 | 506 |
499 // Abort execution if argument is not a smi. Used in debug code. | 507 // Abort execution if argument is not a smi. Used in debug code. |
500 void AbortIfNotSmi(Register object); | 508 void AbortIfNotSmi(Register object); |
501 | 509 |
502 // Abort execution if argument is a smi. Used in debug code. | 510 // Abort execution if argument is a smi. Used in debug code. |
503 void AbortIfSmi(Register object); | 511 void AbortIfSmi(Register object); |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 } \ | 995 } \ |
988 masm-> | 996 masm-> |
989 #else | 997 #else |
990 #define ACCESS_MASM(masm) masm-> | 998 #define ACCESS_MASM(masm) masm-> |
991 #endif | 999 #endif |
992 | 1000 |
993 | 1001 |
994 } } // namespace v8::internal | 1002 } } // namespace v8::internal |
995 | 1003 |
996 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 1004 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |