| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 StaticType* type, | 493 StaticType* type, |
| 494 OverwriteMode overwrite_mode, | 494 OverwriteMode overwrite_mode, |
| 495 bool no_negative_zero); | 495 bool no_negative_zero); |
| 496 | 496 |
| 497 // If possible, combine two constant smi values using op to produce | 497 // If possible, combine two constant smi values using op to produce |
| 498 // a smi result, and push it on the virtual frame, all at compile time. | 498 // a smi result, and push it on the virtual frame, all at compile time. |
| 499 // Returns true if it succeeds. Otherwise it has no effect. | 499 // Returns true if it succeeds. Otherwise it has no effect. |
| 500 bool FoldConstantSmis(Token::Value op, int left, int right); | 500 bool FoldConstantSmis(Token::Value op, int left, int right); |
| 501 | 501 |
| 502 // Emit code to perform a binary operation on a constant | 502 // Emit code to perform a binary operation on a constant |
| 503 // smi and a likely smi. Consumes the Result *operand. | 503 // smi and a likely smi. Consumes the Result operand. |
| 504 Result ConstantSmiBinaryOperation(Token::Value op, | 504 Result ConstantSmiBinaryOperation(Token::Value op, |
| 505 Result* operand, | 505 Result* operand, |
| 506 Handle<Object> constant_operand, | 506 Handle<Object> constant_operand, |
| 507 StaticType* type, | 507 StaticType* type, |
| 508 bool reversed, | 508 bool reversed, |
| 509 OverwriteMode overwrite_mode, | 509 OverwriteMode overwrite_mode, |
| 510 bool no_negative_zero); | 510 bool no_negative_zero); |
| 511 | 511 |
| 512 // Emit code to perform a binary operation on two likely smis. | 512 // Emit code to perform a binary operation on two likely smis. |
| 513 // The code to handle smi arguments is produced inline. | 513 // The code to handle smi arguments is produced inline. |
| 514 // Consumes the Results *left and *right. | 514 // Consumes the Results left and right. |
| 515 Result LikelySmiBinaryOperation(Token::Value op, | 515 Result LikelySmiBinaryOperation(Token::Value op, |
| 516 Result* left, | 516 Result* left, |
| 517 Result* right, | 517 Result* right, |
| 518 OverwriteMode overwrite_mode, | 518 OverwriteMode overwrite_mode, |
| 519 bool no_negative_zero); | 519 bool no_negative_zero); |
| 520 | 520 |
| 521 | 521 |
| 522 // Emit code to perform a binary operation on two untagged int32 values. | 522 // Emit code to perform a binary operation on two untagged int32 values. |
| 523 // The values are on top of the frame, and the result is pushed on the frame. | 523 // The values are on top of the frame, and the result is pushed on the frame. |
| 524 void Int32BinaryOperation(BinaryOperation* node); | 524 void Int32BinaryOperation(BinaryOperation* node); |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1044 return ObjectBits::encode(object_.code()) | | 1044 return ObjectBits::encode(object_.code()) | |
| 1045 AddressBits::encode(addr_.code()) | | 1045 AddressBits::encode(addr_.code()) | |
| 1046 ScratchBits::encode(scratch_.code()); | 1046 ScratchBits::encode(scratch_.code()); |
| 1047 } | 1047 } |
| 1048 }; | 1048 }; |
| 1049 | 1049 |
| 1050 | 1050 |
| 1051 } } // namespace v8::internal | 1051 } } // namespace v8::internal |
| 1052 | 1052 |
| 1053 #endif // V8_IA32_CODEGEN_IA32_H_ | 1053 #endif // V8_IA32_CODEGEN_IA32_H_ |
| OLD | NEW |