| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 | 282 |
| 283 // Modifies the register even if it does not contain a Smi! | 283 // Modifies the register even if it does not contain a Smi! |
| 284 void SmiUntag(Register reg, Label* is_smi) { | 284 void SmiUntag(Register reg, Label* is_smi) { |
| 285 ASSERT(kSmiTagSize == 1); | 285 ASSERT(kSmiTagSize == 1); |
| 286 sar(reg, kSmiTagSize); | 286 sar(reg, kSmiTagSize); |
| 287 ASSERT(kSmiTag == 0); | 287 ASSERT(kSmiTag == 0); |
| 288 j(not_carry, is_smi); | 288 j(not_carry, is_smi); |
| 289 } | 289 } |
| 290 | 290 |
| 291 // Jump the register contains a smi. | 291 // Jump the register contains a smi. |
| 292 inline void JumpIfSmi(Register value, Label* smi_label) { | 292 inline void JumpIfSmi(Register value, |
| 293 Label* smi_label, |
| 294 Label::Distance distance = Label::kFar) { |
| 293 test(value, Immediate(kSmiTagMask)); | 295 test(value, Immediate(kSmiTagMask)); |
| 294 j(zero, smi_label); | 296 j(zero, smi_label, distance); |
| 297 } |
| 298 // Jump if the operand is a smi. |
| 299 inline void JumpIfSmi(Operand value, |
| 300 Label* smi_label, |
| 301 Label::Distance distance = Label::kFar) { |
| 302 test(value, Immediate(kSmiTagMask)); |
| 303 j(zero, smi_label, distance); |
| 295 } | 304 } |
| 296 // Jump if register contain a non-smi. | 305 // Jump if register contain a non-smi. |
| 297 inline void JumpIfNotSmi(Register value, Label* not_smi_label) { | 306 inline void JumpIfNotSmi(Register value, |
| 307 Label* not_smi_label, |
| 308 Label::Distance distance = Label::kFar) { |
| 298 test(value, Immediate(kSmiTagMask)); | 309 test(value, Immediate(kSmiTagMask)); |
| 299 j(not_zero, not_smi_label); | 310 j(not_zero, not_smi_label, distance); |
| 300 } | 311 } |
| 301 | 312 |
| 302 void LoadInstanceDescriptors(Register map, Register descriptors); | 313 void LoadInstanceDescriptors(Register map, Register descriptors); |
| 303 | 314 |
| 304 void LoadPowerOf2(XMMRegister dst, Register scratch, int power); | 315 void LoadPowerOf2(XMMRegister dst, Register scratch, int power); |
| 305 | 316 |
| 306 // Abort execution if argument is not a number. Used in debug code. | 317 // Abort execution if argument is not a number. Used in debug code. |
| 307 void AbortIfNotNumber(Register object); | 318 void AbortIfNotNumber(Register object); |
| 308 | 319 |
| 309 // Abort execution if argument is not a smi. Used in debug code. | 320 // Abort execution if argument is not a smi. Used in debug code. |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 } \ | 787 } \ |
| 777 masm-> | 788 masm-> |
| 778 #else | 789 #else |
| 779 #define ACCESS_MASM(masm) masm-> | 790 #define ACCESS_MASM(masm) masm-> |
| 780 #endif | 791 #endif |
| 781 | 792 |
| 782 | 793 |
| 783 } } // namespace v8::internal | 794 } } // namespace v8::internal |
| 784 | 795 |
| 785 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 796 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |