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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 // we should save the new scratch0_. | 355 // we should save the new scratch0_. |
356 if (!scratch0_.is(scratch0_orig_)) masm->push(scratch0_); | 356 if (!scratch0_.is(scratch0_orig_)) masm->push(scratch0_); |
357 if (!rcx.is(scratch0_orig_) && | 357 if (!rcx.is(scratch0_orig_) && |
358 !rcx.is(object_orig_) && | 358 !rcx.is(object_orig_) && |
359 !rcx.is(address_orig_)) { | 359 !rcx.is(address_orig_)) { |
360 masm->push(rcx); | 360 masm->push(rcx); |
361 } | 361 } |
362 masm->push(scratch1_); | 362 masm->push(scratch1_); |
363 if (!address_.is(address_orig_)) { | 363 if (!address_.is(address_orig_)) { |
364 masm->push(address_); | 364 masm->push(address_); |
365 masm->movq(address_, address_orig_); | 365 masm->movp(address_, address_orig_); |
366 } | 366 } |
367 if (!object_.is(object_orig_)) { | 367 if (!object_.is(object_orig_)) { |
368 masm->push(object_); | 368 masm->push(object_); |
369 masm->movq(object_, object_orig_); | 369 masm->movp(object_, object_orig_); |
370 } | 370 } |
371 } | 371 } |
372 | 372 |
373 void Restore(MacroAssembler* masm) { | 373 void Restore(MacroAssembler* masm) { |
374 // These will have been preserved the entire time, so we just need to move | 374 // These will have been preserved the entire time, so we just need to move |
375 // them back. Only in one case is the orig_ reg different from the plain | 375 // them back. Only in one case is the orig_ reg different from the plain |
376 // one, since only one of them can alias with rcx. | 376 // one, since only one of them can alias with rcx. |
377 if (!object_.is(object_orig_)) { | 377 if (!object_.is(object_orig_)) { |
378 masm->movq(object_orig_, object_); | 378 masm->movp(object_orig_, object_); |
379 masm->pop(object_); | 379 masm->pop(object_); |
380 } | 380 } |
381 if (!address_.is(address_orig_)) { | 381 if (!address_.is(address_orig_)) { |
382 masm->movq(address_orig_, address_); | 382 masm->movp(address_orig_, address_); |
383 masm->pop(address_); | 383 masm->pop(address_); |
384 } | 384 } |
385 masm->pop(scratch1_); | 385 masm->pop(scratch1_); |
386 if (!rcx.is(scratch0_orig_) && | 386 if (!rcx.is(scratch0_orig_) && |
387 !rcx.is(object_orig_) && | 387 !rcx.is(object_orig_) && |
388 !rcx.is(address_orig_)) { | 388 !rcx.is(address_orig_)) { |
389 masm->pop(rcx); | 389 masm->pop(rcx); |
390 } | 390 } |
391 if (!scratch0_.is(scratch0_orig_)) masm->pop(scratch0_); | 391 if (!scratch0_.is(scratch0_orig_)) masm->pop(scratch0_); |
392 } | 392 } |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 RememberedSetAction remembered_set_action_; | 477 RememberedSetAction remembered_set_action_; |
478 SaveFPRegsMode save_fp_regs_mode_; | 478 SaveFPRegsMode save_fp_regs_mode_; |
479 Label slow_; | 479 Label slow_; |
480 RegisterAllocation regs_; | 480 RegisterAllocation regs_; |
481 }; | 481 }; |
482 | 482 |
483 | 483 |
484 } } // namespace v8::internal | 484 } } // namespace v8::internal |
485 | 485 |
486 #endif // V8_X64_CODE_STUBS_X64_H_ | 486 #endif // V8_X64_CODE_STUBS_X64_H_ |
OLD | NEW |