| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 14 matching lines...) Expand all Loading... |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #ifndef V8_MACRO_ASSEMBLER_IA32_H_ | 28 #ifndef V8_MACRO_ASSEMBLER_IA32_H_ |
| 29 #define V8_MACRO_ASSEMBLER_IA32_H_ | 29 #define V8_MACRO_ASSEMBLER_IA32_H_ |
| 30 | 30 |
| 31 #include "assembler.h" | 31 #include "assembler.h" |
| 32 | 32 |
| 33 namespace v8 { namespace internal { | 33 namespace v8 { namespace internal { |
| 34 | 34 |
| 35 // Forward declaration. |
| 36 class JumpTarget; |
| 37 |
| 35 | 38 |
| 36 // Helper types to make flags easier to read at call sites. | 39 // Helper types to make flags easier to read at call sites. |
| 37 enum InvokeFlag { | 40 enum InvokeFlag { |
| 38 CALL_FUNCTION, | 41 CALL_FUNCTION, |
| 39 JUMP_FUNCTION | 42 JUMP_FUNCTION |
| 40 }; | 43 }; |
| 41 | 44 |
| 42 enum CodeLocation { | 45 enum CodeLocation { |
| 43 IN_JAVASCRIPT, | 46 IN_JAVASCRIPT, |
| 44 IN_JS_ENTRY, | 47 IN_JS_ENTRY, |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 Register scratch, | 175 Register scratch, |
| 173 Label* miss); | 176 Label* miss); |
| 174 | 177 |
| 175 | 178 |
| 176 // --------------------------------------------------------------------------- | 179 // --------------------------------------------------------------------------- |
| 177 // Support functions. | 180 // Support functions. |
| 178 | 181 |
| 179 // Check if result is zero and op is negative. | 182 // Check if result is zero and op is negative. |
| 180 void NegativeZeroTest(Register result, Register op, Label* then_label); | 183 void NegativeZeroTest(Register result, Register op, Label* then_label); |
| 181 | 184 |
| 185 // Check if result is zero and op is negative in code using jump targets. |
| 186 void NegativeZeroTest(CodeGenerator* cgen, |
| 187 Register result, |
| 188 Register op, |
| 189 JumpTarget* then_target); |
| 190 |
| 182 // Check if result is zero and any of op1 and op2 are negative. | 191 // Check if result is zero and any of op1 and op2 are negative. |
| 183 // Register scratch is destroyed, and it must be different from op2. | 192 // Register scratch is destroyed, and it must be different from op2. |
| 184 void NegativeZeroTest(Register result, Register op1, Register op2, | 193 void NegativeZeroTest(Register result, Register op1, Register op2, |
| 185 Register scratch, Label* then_label); | 194 Register scratch, Label* then_label); |
| 186 | 195 |
| 187 // Try to get function prototype of a function and puts the value in | 196 // Try to get function prototype of a function and puts the value in |
| 188 // the result register. Checks that the function really is a | 197 // the result register. Checks that the function really is a |
| 189 // function and jumps to the miss label if the fast checks fail. The | 198 // function and jumps to the miss label if the fast checks fail. The |
| 190 // function register will be untouched; the other registers may be | 199 // function register will be untouched; the other registers may be |
| 191 // clobbered. | 200 // clobbered. |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 static inline Operand FieldOperand(Register object, | 327 static inline Operand FieldOperand(Register object, |
| 319 Register index, | 328 Register index, |
| 320 ScaleFactor scale, | 329 ScaleFactor scale, |
| 321 int offset) { | 330 int offset) { |
| 322 return Operand(object, index, scale, offset - kHeapObjectTag); | 331 return Operand(object, index, scale, offset - kHeapObjectTag); |
| 323 } | 332 } |
| 324 | 333 |
| 325 } } // namespace v8::internal | 334 } } // namespace v8::internal |
| 326 | 335 |
| 327 #endif // V8_MACRO_ASSEMBLER_IA32_H_ | 336 #endif // V8_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |