| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 239 |
| 240 // --------------------------------------------------------------------------- | 240 // --------------------------------------------------------------------------- |
| 241 // JavaScript invokes | 241 // JavaScript invokes |
| 242 | 242 |
| 243 // Setup call kind marking in ecx. The method takes ecx as an | 243 // Setup call kind marking in ecx. The method takes ecx as an |
| 244 // explicit first parameter to make the code more readable at the | 244 // explicit first parameter to make the code more readable at the |
| 245 // call sites. | 245 // call sites. |
| 246 void SetCallKind(Register dst, CallKind kind); | 246 void SetCallKind(Register dst, CallKind kind); |
| 247 | 247 |
| 248 // Invoke the JavaScript function code by either calling or jumping. | 248 // Invoke the JavaScript function code by either calling or jumping. |
| 249 void InvokeCode(Register code, |
| 250 const ParameterCount& expected, |
| 251 const ParameterCount& actual, |
| 252 InvokeFlag flag, |
| 253 const CallWrapper& call_wrapper, |
| 254 CallKind call_kind) { |
| 255 InvokeCode(Operand(code), expected, actual, flag, call_wrapper, call_kind); |
| 256 } |
| 257 |
| 249 void InvokeCode(const Operand& code, | 258 void InvokeCode(const Operand& code, |
| 250 const ParameterCount& expected, | 259 const ParameterCount& expected, |
| 251 const ParameterCount& actual, | 260 const ParameterCount& actual, |
| 252 InvokeFlag flag, | 261 InvokeFlag flag, |
| 253 const CallWrapper& call_wrapper, | 262 const CallWrapper& call_wrapper, |
| 254 CallKind call_kind); | 263 CallKind call_kind); |
| 255 | 264 |
| 256 void InvokeCode(Handle<Code> code, | 265 void InvokeCode(Handle<Code> code, |
| 257 const ParameterCount& expected, | 266 const ParameterCount& expected, |
| 258 const ParameterCount& actual, | 267 const ParameterCount& actual, |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 | 389 |
| 381 void ClampDoubleToUint8(XMMRegister input_reg, | 390 void ClampDoubleToUint8(XMMRegister input_reg, |
| 382 XMMRegister scratch_reg, | 391 XMMRegister scratch_reg, |
| 383 Register result_reg); | 392 Register result_reg); |
| 384 | 393 |
| 385 | 394 |
| 386 // Smi tagging support. | 395 // Smi tagging support. |
| 387 void SmiTag(Register reg) { | 396 void SmiTag(Register reg) { |
| 388 STATIC_ASSERT(kSmiTag == 0); | 397 STATIC_ASSERT(kSmiTag == 0); |
| 389 STATIC_ASSERT(kSmiTagSize == 1); | 398 STATIC_ASSERT(kSmiTagSize == 1); |
| 390 add(reg, Operand(reg)); | 399 add(reg, reg); |
| 391 } | 400 } |
| 392 void SmiUntag(Register reg) { | 401 void SmiUntag(Register reg) { |
| 393 sar(reg, kSmiTagSize); | 402 sar(reg, kSmiTagSize); |
| 394 } | 403 } |
| 395 | 404 |
| 396 // Modifies the register even if it does not contain a Smi! | 405 // Modifies the register even if it does not contain a Smi! |
| 397 void SmiUntag(Register reg, Label* is_smi) { | 406 void SmiUntag(Register reg, Label* is_smi) { |
| 398 STATIC_ASSERT(kSmiTagSize == 1); | 407 STATIC_ASSERT(kSmiTagSize == 1); |
| 399 sar(reg, kSmiTagSize); | 408 sar(reg, kSmiTagSize); |
| 400 STATIC_ASSERT(kSmiTag == 0); | 409 STATIC_ASSERT(kSmiTag == 0); |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 } \ | 954 } \ |
| 946 masm-> | 955 masm-> |
| 947 #else | 956 #else |
| 948 #define ACCESS_MASM(masm) masm-> | 957 #define ACCESS_MASM(masm) masm-> |
| 949 #endif | 958 #endif |
| 950 | 959 |
| 951 | 960 |
| 952 } } // namespace v8::internal | 961 } } // namespace v8::internal |
| 953 | 962 |
| 954 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 963 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
| OLD | NEW |