| 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 a tagged smi. |  201   // Is the value a tagged smi. | 
|  202   Condition CheckSmi(Register src); |  202   Condition CheckSmi(Register src); | 
|  203  |  203  | 
|  204   // Is the value a positive tagged smi. |  204   // Is the value a positive tagged smi. | 
|  205   Condition CheckPositiveSmi(Register src); |  205   Condition CheckPositiveSmi(Register src); | 
|  206  |  206  | 
|  207   // Are both values tagged smis. |  207   // Are both values tagged smis. | 
|  208   Condition CheckBothSmi(Register first, Register second); |  208   Condition CheckBothSmi(Register first, Register second); | 
|  209  |  209  | 
 |  210   // Are both values tagged smis. | 
 |  211   Condition CheckBothPositiveSmi(Register first, Register second); | 
 |  212  | 
|  210   // Are either value a tagged smi. |  213   // Are either value a tagged smi. | 
|  211   Condition CheckEitherSmi(Register first, Register second); |  214   Condition CheckEitherSmi(Register first, Register second); | 
|  212  |  215  | 
|  213   // Is the value the minimum smi value (since we are using |  216   // Is the value the minimum smi value (since we are using | 
|  214   // two's complement numbers, negating the value is known to yield |  217   // two's complement numbers, negating the value is known to yield | 
|  215   // a non-smi value). |  218   // a non-smi value). | 
|  216   Condition CheckIsMinSmi(Register src); |  219   Condition CheckIsMinSmi(Register src); | 
|  217  |  220  | 
|  218   // Checks whether an 32-bit integer value is a valid for conversion |  221   // Checks whether an 32-bit integer value is a valid for conversion | 
|  219   // to a smi. |  222   // to a smi. | 
| (...skipping 21 matching lines...) Expand all  Loading... | 
|  241   // Jump to label if the value is not a positive tagged smi. |  244   // Jump to label if the value is not a positive tagged smi. | 
|  242   void JumpIfNotPositiveSmi(Register src, Label* on_not_smi); |  245   void JumpIfNotPositiveSmi(Register src, Label* on_not_smi); | 
|  243  |  246  | 
|  244   // Jump to label if the value, which must be a tagged smi, has value equal |  247   // Jump to label if the value, which must be a tagged smi, has value equal | 
|  245   // to the constant. |  248   // to the constant. | 
|  246   void JumpIfSmiEqualsConstant(Register src,  Smi* constant, Label* on_equals); |  249   void JumpIfSmiEqualsConstant(Register src,  Smi* constant, Label* on_equals); | 
|  247  |  250  | 
|  248   // Jump if either or both register are not smi values. |  251   // Jump if either or both register are not smi values. | 
|  249   void JumpIfNotBothSmi(Register src1, Register src2, Label* on_not_both_smi); |  252   void JumpIfNotBothSmi(Register src1, Register src2, Label* on_not_both_smi); | 
|  250  |  253  | 
 |  254   // Jump if either or both register are not positive smi values. | 
 |  255   void JumpIfNotBothPositiveSmi(Register src1, Register src2, | 
 |  256                                 Label* on_not_both_smi); | 
 |  257  | 
|  251   // Operations on tagged smi values. |  258   // Operations on tagged smi values. | 
|  252  |  259  | 
|  253   // Smis represent a subset of integers. The subset is always equivalent to |  260   // Smis represent a subset of integers. The subset is always equivalent to | 
|  254   // a two's complement interpretation of a fixed number of bits. |  261   // a two's complement interpretation of a fixed number of bits. | 
|  255  |  262  | 
|  256   // Optimistically adds an integer constant to a supposed smi. |  263   // Optimistically adds an integer constant to a supposed smi. | 
|  257   // If the src is not a smi, or the result is not a smi, jump to |  264   // If the src is not a smi, or the result is not a smi, jump to | 
|  258   // the label. |  265   // the label. | 
|  259   void SmiTryAddConstant(Register dst, |  266   void SmiTryAddConstant(Register dst, | 
|  260                          Register src, |  267                          Register src, | 
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  445   // Compare object type for heap object. |  452   // Compare object type for heap object. | 
|  446   // Always use unsigned comparisons: above and below, not less and greater. |  453   // Always use unsigned comparisons: above and below, not less and greater. | 
|  447   // Incoming register is heap_object and outgoing register is map. |  454   // Incoming register is heap_object and outgoing register is map. | 
|  448   // They may be the same register, and may be kScratchRegister. |  455   // They may be the same register, and may be kScratchRegister. | 
|  449   void CmpObjectType(Register heap_object, InstanceType type, Register map); |  456   void CmpObjectType(Register heap_object, InstanceType type, Register map); | 
|  450  |  457  | 
|  451   // Compare instance type for map. |  458   // Compare instance type for map. | 
|  452   // Always use unsigned comparisons: above and below, not less and greater. |  459   // Always use unsigned comparisons: above and below, not less and greater. | 
|  453   void CmpInstanceType(Register map, InstanceType type); |  460   void CmpInstanceType(Register map, InstanceType type); | 
|  454  |  461  | 
 |  462   // Check if the object in register heap_object is a string. Afterwards the | 
 |  463   // register map contains the object map and the register instance_type | 
 |  464   // contains the instance_type. The registers map and instance_type can be the | 
 |  465   // same in which case it contains the instance type afterwards. Either of the | 
 |  466   // registers map and instance_type can be the same as heap_object. | 
 |  467   Condition IsObjectStringType(Register heap_object, | 
 |  468                                Register map, | 
 |  469                                Register instance_type); | 
 |  470  | 
|  455   // FCmp is similar to integer cmp, but requires unsigned |  471   // FCmp is similar to integer cmp, but requires unsigned | 
|  456   // jcc instructions (je, ja, jae, jb, jbe, je, and jz). |  472   // jcc instructions (je, ja, jae, jb, jbe, je, and jz). | 
|  457   void FCmp(); |  473   void FCmp(); | 
|  458  |  474  | 
|  459   // --------------------------------------------------------------------------- |  475   // --------------------------------------------------------------------------- | 
|  460   // Exception handling |  476   // Exception handling | 
|  461  |  477  | 
|  462   // Push a new try handler and link into try handler chain.  The return |  478   // Push a new try handler and link into try handler chain.  The return | 
|  463   // address must be pushed before calling this helper. |  479   // address must be pushed before calling this helper. | 
|  464   void PushTryHandler(CodeLocation try_location, HandlerType type); |  480   void PushTryHandler(CodeLocation try_location, HandlerType type); | 
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  767   }                                                                       \ |  783   }                                                                       \ | 
|  768   masm-> |  784   masm-> | 
|  769 #else |  785 #else | 
|  770 #define ACCESS_MASM(masm) masm-> |  786 #define ACCESS_MASM(masm) masm-> | 
|  771 #endif |  787 #endif | 
|  772  |  788  | 
|  773  |  789  | 
|  774 } }  // namespace v8::internal |  790 } }  // namespace v8::internal | 
|  775  |  791  | 
|  776 #endif  // V8_X64_MACRO_ASSEMBLER_X64_H_ |  792 #endif  // V8_X64_MACRO_ASSEMBLER_X64_H_ | 
| OLD | NEW |