| 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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 // This will truncate a floating-point value outside of the singed 32bit | 566 // This will truncate a floating-point value outside of the singed 32bit |
| 567 // integer range to a 32bit signed integer. | 567 // integer range to a 32bit signed integer. |
| 568 // Expects the double value loaded in input_high and input_low. | 568 // Expects the double value loaded in input_high and input_low. |
| 569 // Exits with the answer in 'result'. | 569 // Exits with the answer in 'result'. |
| 570 // Note that this code does not work for values in the 32bit range! | 570 // Note that this code does not work for values in the 32bit range! |
| 571 void EmitOutOfInt32RangeTruncate(Register result, | 571 void EmitOutOfInt32RangeTruncate(Register result, |
| 572 Register input_high, | 572 Register input_high, |
| 573 Register input_low, | 573 Register input_low, |
| 574 Register scratch); | 574 Register scratch); |
| 575 | 575 |
| 576 // Performs a truncating conversion of a floating point number as used by |
| 577 // the JS bitwise operations. See ECMA-262 9.5: ToInt32. |
| 578 // Exits with 'result' holding the answer and all other registers clobbered. |
| 579 void EmitECMATruncate(Register result, |
| 580 FPURegister double_input, |
| 581 FPURegister single_scratch, |
| 582 Register scratch, |
| 583 Register scratch2, |
| 584 Register scratch3); |
| 585 |
| 576 // ------------------------------------------------------------------------- | 586 // ------------------------------------------------------------------------- |
| 577 // Activation frames. | 587 // Activation frames. |
| 578 | 588 |
| 579 void EnterInternalFrame() { EnterFrame(StackFrame::INTERNAL); } | 589 void EnterInternalFrame() { EnterFrame(StackFrame::INTERNAL); } |
| 580 void LeaveInternalFrame() { LeaveFrame(StackFrame::INTERNAL); } | 590 void LeaveInternalFrame() { LeaveFrame(StackFrame::INTERNAL); } |
| 581 | 591 |
| 582 void EnterConstructFrame() { EnterFrame(StackFrame::CONSTRUCT); } | 592 void EnterConstructFrame() { EnterFrame(StackFrame::CONSTRUCT); } |
| 583 void LeaveConstructFrame() { LeaveFrame(StackFrame::CONSTRUCT); } | 593 void LeaveConstructFrame() { LeaveFrame(StackFrame::CONSTRUCT); } |
| 584 | 594 |
| 585 // Enter exit frame. | 595 // Enter exit frame. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 614 // Setup call kind marking in t1. The method takes t1 as an | 624 // Setup call kind marking in t1. The method takes t1 as an |
| 615 // explicit first parameter to make the code more readable at the | 625 // explicit first parameter to make the code more readable at the |
| 616 // call sites. | 626 // call sites. |
| 617 void SetCallKind(Register dst, CallKind kind); | 627 void SetCallKind(Register dst, CallKind kind); |
| 618 | 628 |
| 619 // Invoke the JavaScript function code by either calling or jumping. | 629 // Invoke the JavaScript function code by either calling or jumping. |
| 620 void InvokeCode(Register code, | 630 void InvokeCode(Register code, |
| 621 const ParameterCount& expected, | 631 const ParameterCount& expected, |
| 622 const ParameterCount& actual, | 632 const ParameterCount& actual, |
| 623 InvokeFlag flag, | 633 InvokeFlag flag, |
| 624 const CallWrapper& call_wrapper = NullCallWrapper(), | 634 const CallWrapper& call_wrapper, |
| 625 CallKind call_kind = CALL_AS_METHOD); | 635 CallKind call_kind); |
| 626 | 636 |
| 627 void InvokeCode(Handle<Code> code, | 637 void InvokeCode(Handle<Code> code, |
| 628 const ParameterCount& expected, | 638 const ParameterCount& expected, |
| 629 const ParameterCount& actual, | 639 const ParameterCount& actual, |
| 630 RelocInfo::Mode rmode, | 640 RelocInfo::Mode rmode, |
| 631 InvokeFlag flag, | 641 InvokeFlag flag, |
| 632 CallKind call_kind = CALL_AS_METHOD); | 642 CallKind call_kind); |
| 633 | 643 |
| 634 // Invoke the JavaScript function in the given register. Changes the | 644 // Invoke the JavaScript function in the given register. Changes the |
| 635 // current context to the context in the function before invoking. | 645 // current context to the context in the function before invoking. |
| 636 void InvokeFunction(Register function, | 646 void InvokeFunction(Register function, |
| 637 const ParameterCount& actual, | 647 const ParameterCount& actual, |
| 638 InvokeFlag flag, | 648 InvokeFlag flag, |
| 639 const CallWrapper& call_wrapper = NullCallWrapper(), | 649 const CallWrapper& call_wrapper, |
| 640 CallKind call_kind = CALL_AS_METHOD); | 650 CallKind call_kind); |
| 641 | 651 |
| 642 void InvokeFunction(JSFunction* function, | 652 void InvokeFunction(JSFunction* function, |
| 643 const ParameterCount& actual, | 653 const ParameterCount& actual, |
| 644 InvokeFlag flag); | 654 InvokeFlag flag, |
| 655 CallKind call_kind); |
| 645 | 656 |
| 646 | 657 |
| 647 void IsObjectJSObjectType(Register heap_object, | 658 void IsObjectJSObjectType(Register heap_object, |
| 648 Register map, | 659 Register map, |
| 649 Register scratch, | 660 Register scratch, |
| 650 Label* fail); | 661 Label* fail); |
| 651 | 662 |
| 652 void IsInstanceJSObjectType(Register map, | 663 void IsInstanceJSObjectType(Register map, |
| 653 Register scratch, | 664 Register scratch, |
| 654 Label* fail); | 665 Label* fail); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 // clobbered. | 716 // clobbered. |
| 706 void TryGetFunctionPrototype(Register function, | 717 void TryGetFunctionPrototype(Register function, |
| 707 Register result, | 718 Register result, |
| 708 Register scratch, | 719 Register scratch, |
| 709 Label* miss); | 720 Label* miss); |
| 710 | 721 |
| 711 void GetObjectType(Register function, | 722 void GetObjectType(Register function, |
| 712 Register map, | 723 Register map, |
| 713 Register type_reg); | 724 Register type_reg); |
| 714 | 725 |
| 726 // Check if a map for a JSObject indicates that the object has fast elements. |
| 727 // Jump to the specified label if it does not. |
| 728 void CheckFastElements(Register map, |
| 729 Register scratch, |
| 730 Label* fail); |
| 731 |
| 715 // Check if the map of an object is equal to a specified map (either | 732 // Check if the map of an object is equal to a specified map (either |
| 716 // given directly or as an index into the root list) and branch to | 733 // given directly or as an index into the root list) and branch to |
| 717 // label if not. Skip the smi check if not required (object is known | 734 // label if not. Skip the smi check if not required (object is known |
| 718 // to be a heap object). | 735 // to be a heap object). |
| 719 void CheckMap(Register obj, | 736 void CheckMap(Register obj, |
| 720 Register scratch, | 737 Register scratch, |
| 721 Handle<Map> map, | 738 Handle<Map> map, |
| 722 Label* fail, | 739 Label* fail, |
| 723 SmiCheckType smi_check_type); | 740 SmiCheckType smi_check_type); |
| 724 | 741 |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1096 Register r1 = zero_reg, const Operand& r2 = Operand(zero_reg), | 1113 Register r1 = zero_reg, const Operand& r2 = Operand(zero_reg), |
| 1097 BranchDelaySlot bd = PROTECT); | 1114 BranchDelaySlot bd = PROTECT); |
| 1098 | 1115 |
| 1099 // Helper functions for generating invokes. | 1116 // Helper functions for generating invokes. |
| 1100 void InvokePrologue(const ParameterCount& expected, | 1117 void InvokePrologue(const ParameterCount& expected, |
| 1101 const ParameterCount& actual, | 1118 const ParameterCount& actual, |
| 1102 Handle<Code> code_constant, | 1119 Handle<Code> code_constant, |
| 1103 Register code_reg, | 1120 Register code_reg, |
| 1104 Label* done, | 1121 Label* done, |
| 1105 InvokeFlag flag, | 1122 InvokeFlag flag, |
| 1106 const CallWrapper& call_wrapper = NullCallWrapper(), | 1123 const CallWrapper& call_wrapper, |
| 1107 CallKind call_kind = CALL_AS_METHOD); | 1124 CallKind call_kind); |
| 1108 | 1125 |
| 1109 // Get the code for the given builtin. Returns if able to resolve | 1126 // Get the code for the given builtin. Returns if able to resolve |
| 1110 // the function in the 'resolved' flag. | 1127 // the function in the 'resolved' flag. |
| 1111 Handle<Code> ResolveBuiltin(Builtins::JavaScript id, bool* resolved); | 1128 Handle<Code> ResolveBuiltin(Builtins::JavaScript id, bool* resolved); |
| 1112 | 1129 |
| 1113 // Activation support. | 1130 // Activation support. |
| 1114 void EnterFrame(StackFrame::Type type); | 1131 void EnterFrame(StackFrame::Type type); |
| 1115 void LeaveFrame(StackFrame::Type type); | 1132 void LeaveFrame(StackFrame::Type type); |
| 1116 | 1133 |
| 1117 void InitializeNewString(Register string, | 1134 void InitializeNewString(Register string, |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1202 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 1219 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
| 1203 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1220 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 1204 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1221 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 1205 #else | 1222 #else |
| 1206 #define ACCESS_MASM(masm) masm-> | 1223 #define ACCESS_MASM(masm) masm-> |
| 1207 #endif | 1224 #endif |
| 1208 | 1225 |
| 1209 } } // namespace v8::internal | 1226 } } // namespace v8::internal |
| 1210 | 1227 |
| 1211 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1228 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
| OLD | NEW |