Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(561)

Side by Side Diff: src/mips/macro-assembler-mips.h

Issue 23534011: MIPS: VFP cleanup now that VFP2 is the baseline. (Closed) Base URL: git@github.com:paul99/v8m-rb.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/mips/ic-mips.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 // Performs a truncating conversion of a floating point number as used by 790 // Performs a truncating conversion of a floating point number as used by
791 // the JS bitwise operations. See ECMA-262 9.5: ToInt32. 791 // the JS bitwise operations. See ECMA-262 9.5: ToInt32.
792 // Exits with 'result' holding the answer and all other registers clobbered. 792 // Exits with 'result' holding the answer and all other registers clobbered.
793 void EmitECMATruncate(Register result, 793 void EmitECMATruncate(Register result,
794 FPURegister double_input, 794 FPURegister double_input,
795 FPURegister single_scratch, 795 FPURegister single_scratch,
796 Register scratch, 796 Register scratch,
797 Register scratch2, 797 Register scratch2,
798 Register scratch3); 798 Register scratch3);
799 799
800 // Converts the smi or heap number in object to an int32 using the rules
801 // for ToInt32 as described in ECMAScript 9.5.: the value is truncated
802 // and brought into the range -2^31 .. +2^31 - 1.
803 void ConvertNumberToInt32(Register object,
804 Register dst,
805 Register heap_number_map,
806 Register scratch1,
807 Register scratch2,
808 Register scratch3,
809 FPURegister double_scratch,
810 Label* not_int32);
811
812 // Loads the number from object into dst register.
813 // If |object| is neither smi nor heap number, |not_number| is jumped to
814 // with |object| still intact.
815 void LoadNumber(Register object,
816 FPURegister dst,
817 Register heap_number_map,
818 Register scratch,
819 Label* not_number);
820
821 // Loads the number from object into double_dst in the double format.
822 // Control will jump to not_int32 if the value cannot be exactly represented
823 // by a 32-bit integer.
824 // Floating point value in the 32-bit integer range that are not exact integer
825 // won't be loaded.
826 void LoadNumberAsInt32Double(Register object,
827 DoubleRegister double_dst,
828 Register heap_number_map,
829 Register scratch1,
830 Register scratch2,
831 FPURegister double_scratch,
832 Label* not_int32);
833
834 // Loads the number from object into dst as a 32-bit integer.
835 // Control will jump to not_int32 if the object cannot be exactly represented
836 // by a 32-bit integer.
837 // Floating point value in the 32-bit integer range that are not exact integer
838 // won't be converted.
839 void LoadNumberAsInt32(Register object,
840 Register dst,
841 Register heap_number_map,
842 Register scratch1,
843 Register scratch2,
844 FPURegister double_scratch0,
845 FPURegister double_scratch1,
846 Label* not_int32);
847
800 // Enter exit frame. 848 // Enter exit frame.
801 // argc - argument count to be dropped by LeaveExitFrame. 849 // argc - argument count to be dropped by LeaveExitFrame.
802 // save_doubles - saves FPU registers on stack, currently disabled. 850 // save_doubles - saves FPU registers on stack, currently disabled.
803 // stack_space - extra stack space. 851 // stack_space - extra stack space.
804 void EnterExitFrame(bool save_doubles, 852 void EnterExitFrame(bool save_doubles,
805 int stack_space = 0); 853 int stack_space = 0);
806 854
807 // Leave the current exit frame. 855 // Leave the current exit frame.
808 void LeaveExitFrame(bool save_doubles, 856 void LeaveExitFrame(bool save_doubles,
809 Register arg_count, 857 Register arg_count,
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 Label* fail); 1027 Label* fail);
980 1028
981 // Check if a map for a JSObject indicates that the object has fast smi only 1029 // Check if a map for a JSObject indicates that the object has fast smi only
982 // elements. Jump to the specified label if it does not. 1030 // elements. Jump to the specified label if it does not.
983 void CheckFastSmiElements(Register map, 1031 void CheckFastSmiElements(Register map,
984 Register scratch, 1032 Register scratch,
985 Label* fail); 1033 Label* fail);
986 1034
987 // Check to see if maybe_number can be stored as a double in 1035 // Check to see if maybe_number can be stored as a double in
988 // FastDoubleElements. If it can, store it at the index specified by key in 1036 // FastDoubleElements. If it can, store it at the index specified by key in
989 // the FastDoubleElements array elements. Otherwise jump to fail, in which 1037 // the FastDoubleElements array elements. Otherwise jump to fail.
990 // case scratch2, scratch3 and scratch4 are unmodified.
991 void StoreNumberToDoubleElements(Register value_reg, 1038 void StoreNumberToDoubleElements(Register value_reg,
992 Register key_reg, 1039 Register key_reg,
993 // All regs below here overwritten.
994 Register elements_reg, 1040 Register elements_reg,
995 Register scratch1, 1041 Register scratch1,
996 Register scratch2, 1042 Register scratch2,
997 Register scratch3, 1043 Register scratch3,
998 Register scratch4,
999 Label* fail, 1044 Label* fail,
1000 int elements_offset = 0); 1045 int elements_offset = 0);
1001 1046
1002 // Compare an object's map with the specified map and its transitioned 1047 // Compare an object's map with the specified map and its transitioned
1003 // elements maps if mode is ALLOW_ELEMENT_TRANSITION_MAPS. Jumps to 1048 // elements maps if mode is ALLOW_ELEMENT_TRANSITION_MAPS. Jumps to
1004 // "branch_to" if the result of the comparison is "cond". If multiple map 1049 // "branch_to" if the result of the comparison is "cond". If multiple map
1005 // compares are required, the compare sequences branches to early_success. 1050 // compares are required, the compare sequences branches to early_success.
1006 void CompareMapAndBranch(Register obj, 1051 void CompareMapAndBranch(Register obj,
1007 Register scratch, 1052 Register scratch,
1008 Handle<Map> map, 1053 Handle<Map> map,
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 void DecrementCounter(StatsCounter* counter, int value, 1318 void DecrementCounter(StatsCounter* counter, int value,
1274 Register scratch1, Register scratch2); 1319 Register scratch1, Register scratch2);
1275 1320
1276 1321
1277 // ------------------------------------------------------------------------- 1322 // -------------------------------------------------------------------------
1278 // Debugging. 1323 // Debugging.
1279 1324
1280 // Calls Abort(msg) if the condition cc is not satisfied. 1325 // Calls Abort(msg) if the condition cc is not satisfied.
1281 // Use --debug_code to enable. 1326 // Use --debug_code to enable.
1282 void Assert(Condition cc, BailoutReason reason, Register rs, Operand rt); 1327 void Assert(Condition cc, BailoutReason reason, Register rs, Operand rt);
1283 void AssertRegisterIsRoot(Register reg, Heap::RootListIndex index);
1284 void AssertFastElements(Register elements); 1328 void AssertFastElements(Register elements);
1285 1329
1286 // Like Assert(), but always enabled. 1330 // Like Assert(), but always enabled.
1287 void Check(Condition cc, BailoutReason reason, Register rs, Operand rt); 1331 void Check(Condition cc, BailoutReason reason, Register rs, Operand rt);
1288 1332
1289 // Print a message to stdout and abort execution. 1333 // Print a message to stdout and abort execution.
1290 void Abort(BailoutReason msg); 1334 void Abort(BailoutReason msg);
1291 1335
1292 // Verify restrictions about code generated in stubs. 1336 // Verify restrictions about code generated in stubs.
1293 void set_generating_stub(bool value) { generating_stub_ = value; } 1337 void set_generating_stub(bool value) { generating_stub_ = value; }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
1360 // Abort execution if argument is a smi, enabled via --debug-code. 1404 // Abort execution if argument is a smi, enabled via --debug-code.
1361 void AssertNotSmi(Register object); 1405 void AssertNotSmi(Register object);
1362 void AssertSmi(Register object); 1406 void AssertSmi(Register object);
1363 1407
1364 // Abort execution if argument is not a string, enabled via --debug-code. 1408 // Abort execution if argument is not a string, enabled via --debug-code.
1365 void AssertString(Register object); 1409 void AssertString(Register object);
1366 1410
1367 // Abort execution if argument is not a name, enabled via --debug-code. 1411 // Abort execution if argument is not a name, enabled via --debug-code.
1368 void AssertName(Register object); 1412 void AssertName(Register object);
1369 1413
1370 // Abort execution if argument is not the root value with the given index, 1414 // Abort execution if reg is not the root value with the given index,
1371 // enabled via --debug-code. 1415 // enabled via --debug-code.
1372 void AssertRootValue(Register src, 1416 void AssertIsRoot(Register reg, Heap::RootListIndex index);
1373 Heap::RootListIndex root_value_index,
1374 BailoutReason reason);
1375 1417
1376 // --------------------------------------------------------------------------- 1418 // ---------------------------------------------------------------------------
1377 // HeapNumber utilities. 1419 // HeapNumber utilities.
1378 1420
1379 void JumpIfNotHeapNumber(Register object, 1421 void JumpIfNotHeapNumber(Register object,
1380 Register heap_number_map, 1422 Register heap_number_map,
1381 Register scratch, 1423 Register scratch,
1382 Label* on_not_heap_number); 1424 Label* on_not_heap_number);
1383 1425
1384 // ------------------------------------------------------------------------- 1426 // -------------------------------------------------------------------------
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1580 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) 1622 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x)
1581 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 1623 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
1582 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 1624 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
1583 #else 1625 #else
1584 #define ACCESS_MASM(masm) masm-> 1626 #define ACCESS_MASM(masm) masm->
1585 #endif 1627 #endif
1586 1628
1587 } } // namespace v8::internal 1629 } } // namespace v8::internal
1588 1630
1589 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ 1631 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/ic-mips.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698