| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 | 200 |
| 201 // Is the value the minimum smi value (since we are using | 201 // Is the value the minimum smi value (since we are using |
| 202 // two's complement numbers, negating the value is known to yield | 202 // two's complement numbers, negating the value is known to yield |
| 203 // a non-smi value). | 203 // a non-smi value). |
| 204 Condition CheckIsMinSmi(Register src); | 204 Condition CheckIsMinSmi(Register src); |
| 205 | 205 |
| 206 // Checks whether an 32-bit integer value is a valid for conversion | 206 // Checks whether an 32-bit integer value is a valid for conversion |
| 207 // to a smi. | 207 // to a smi. |
| 208 Condition CheckInteger32ValidSmiValue(Register src); | 208 Condition CheckInteger32ValidSmiValue(Register src); |
| 209 | 209 |
| 210 // Checks whether an 32-bit unsigned integer value is a valid for |
| 211 // conversion to a smi. |
| 212 Condition CheckUInteger32ValidSmiValue(Register src); |
| 213 |
| 210 // Test-and-jump functions. Typically combines a check function | 214 // Test-and-jump functions. Typically combines a check function |
| 211 // above with a conditional jump. | 215 // above with a conditional jump. |
| 212 | 216 |
| 213 // Jump if the value cannot be represented by a smi. | 217 // Jump if the value cannot be represented by a smi. |
| 214 void JumpIfNotValidSmiValue(Register src, Label* on_invalid); | 218 void JumpIfNotValidSmiValue(Register src, Label* on_invalid); |
| 215 | 219 |
| 220 // Jump if the unsigned integer value cannot be represented by a smi. |
| 221 void JumpIfUIntNotValidSmiValue(Register src, Label* on_invalid); |
| 222 |
| 216 // Jump to label if the value is a tagged smi. | 223 // Jump to label if the value is a tagged smi. |
| 217 void JumpIfSmi(Register src, Label* on_smi); | 224 void JumpIfSmi(Register src, Label* on_smi); |
| 218 | 225 |
| 219 // Jump to label if the value is not a tagged smi. | 226 // Jump to label if the value is not a tagged smi. |
| 220 void JumpIfNotSmi(Register src, Label* on_not_smi); | 227 void JumpIfNotSmi(Register src, Label* on_not_smi); |
| 221 | 228 |
| 222 // Jump to label if the value is not a positive tagged smi. | 229 // Jump to label if the value is not a positive tagged smi. |
| 223 void JumpIfNotPositiveSmi(Register src, Label* on_not_smi); | 230 void JumpIfNotPositiveSmi(Register src, Label* on_not_smi); |
| 224 | 231 |
| 225 // Jump to label if the value, which must be a tagged smi, has value equal | 232 // Jump to label if the value, which must be a tagged smi, has value equal |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 Register scratch, | 498 Register scratch, |
| 492 Label* gc_required, | 499 Label* gc_required, |
| 493 AllocationFlags flags); | 500 AllocationFlags flags); |
| 494 | 501 |
| 495 // Undo allocation in new space. The object passed and objects allocated after | 502 // Undo allocation in new space. The object passed and objects allocated after |
| 496 // it will no longer be allocated. Make sure that no pointers are left to the | 503 // it will no longer be allocated. Make sure that no pointers are left to the |
| 497 // object(s) no longer allocated as they would be invalid when allocation is | 504 // object(s) no longer allocated as they would be invalid when allocation is |
| 498 // un-done. | 505 // un-done. |
| 499 void UndoAllocationInNewSpace(Register object); | 506 void UndoAllocationInNewSpace(Register object); |
| 500 | 507 |
| 508 // Allocate a heap number in new space with undefined value. Returns |
| 509 // tagged pointer in result register, or jumps to gc_required if new |
| 510 // space is full. |
| 511 void AllocateHeapNumber(Register result, |
| 512 Register scratch, |
| 513 Label* gc_required); |
| 514 |
| 501 // --------------------------------------------------------------------------- | 515 // --------------------------------------------------------------------------- |
| 502 // Support functions. | 516 // Support functions. |
| 503 | 517 |
| 504 // Check if result is zero and op is negative. | 518 // Check if result is zero and op is negative. |
| 505 void NegativeZeroTest(Register result, Register op, Label* then_label); | 519 void NegativeZeroTest(Register result, Register op, Label* then_label); |
| 506 | 520 |
| 507 // Check if result is zero and op is negative in code using jump targets. | 521 // Check if result is zero and op is negative in code using jump targets. |
| 508 void NegativeZeroTest(CodeGenerator* cgen, | 522 void NegativeZeroTest(CodeGenerator* cgen, |
| 509 Register result, | 523 Register result, |
| 510 Register op, | 524 Register op, |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 } \ | 707 } \ |
| 694 masm-> | 708 masm-> |
| 695 #else | 709 #else |
| 696 #define ACCESS_MASM(masm) masm-> | 710 #define ACCESS_MASM(masm) masm-> |
| 697 #endif | 711 #endif |
| 698 | 712 |
| 699 | 713 |
| 700 } } // namespace v8::internal | 714 } } // namespace v8::internal |
| 701 | 715 |
| 702 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 716 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
| OLD | NEW |