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

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

Issue 23156006: [v8-dev] ARM: Improve Lithium register constraints. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 // MacroAssembler implements a collection of frequently used macros. 80 // MacroAssembler implements a collection of frequently used macros.
81 class MacroAssembler: public Assembler { 81 class MacroAssembler: public Assembler {
82 public: 82 public:
83 // The isolate parameter can be NULL if the macro assembler should 83 // The isolate parameter can be NULL if the macro assembler should
84 // not use isolate-dependent functionality. In this case, it's the 84 // not use isolate-dependent functionality. In this case, it's the
85 // responsibility of the caller to never invoke such function on the 85 // responsibility of the caller to never invoke such function on the
86 // macro assembler. 86 // macro assembler.
87 MacroAssembler(Isolate* isolate, void* buffer, int size); 87 MacroAssembler(Isolate* isolate, void* buffer, int size);
88 88
89 // Helper instructions using the macro assembler temporary register (ip) to
90 // perform their task. If the MemOperand is used used more than once then it
91 // is more efficient to load it separately.
92 void AddMemOperand(Register dst,
93 Register src1,
94 const MemOperand& src2,
95 SBit s = LeaveCC);
96 void SubMemOperand(Register dst,
97 Register src1,
98 const MemOperand& src2,
99 SBit s = LeaveCC);
100 void RsbMemOperand(Register dst,
101 Register src1,
102 const MemOperand& src2,
103 SBit s = LeaveCC);
104 void AndMemOperand(Register dst,
105 Register src1,
106 const MemOperand& src2,
107 SBit s = LeaveCC);
108 void OrrMemOperand(Register dst,
109 Register src1,
110 const MemOperand& src2,
111 SBit s = LeaveCC);
112 void EorMemOperand(Register dst,
113 Register src1,
114 const MemOperand& src2,
115 SBit s = LeaveCC);
116
89 // Jump, Call, and Ret pseudo instructions implementing inter-working. 117 // Jump, Call, and Ret pseudo instructions implementing inter-working.
90 void Jump(Register target, Condition cond = al); 118 void Jump(Register target, Condition cond = al);
91 void Jump(Address target, RelocInfo::Mode rmode, Condition cond = al); 119 void Jump(Address target, RelocInfo::Mode rmode, Condition cond = al);
92 void Jump(Handle<Code> code, RelocInfo::Mode rmode, Condition cond = al); 120 void Jump(Handle<Code> code, RelocInfo::Mode rmode, Condition cond = al);
93 static int CallSize(Register target, Condition cond = al); 121 static int CallSize(Register target, Condition cond = al);
94 void Call(Register target, Condition cond = al); 122 void Call(Register target, Condition cond = al);
95 int CallSize(Address target, RelocInfo::Mode rmode, Condition cond = al); 123 int CallSize(Address target, RelocInfo::Mode rmode, Condition cond = al);
96 static int CallSizeNotPredictableCodeSize(Address target, 124 static int CallSizeNotPredictableCodeSize(Address target,
97 RelocInfo::Mode rmode, 125 RelocInfo::Mode rmode,
98 Condition cond = al); 126 Condition cond = al);
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 // Ensure that FPSCR contains values needed by JavaScript. 482 // Ensure that FPSCR contains values needed by JavaScript.
455 // We need the NaNModeControlBit to be sure that operations like 483 // We need the NaNModeControlBit to be sure that operations like
456 // vadd and vsub generate the Canonical NaN (if a NaN must be generated). 484 // vadd and vsub generate the Canonical NaN (if a NaN must be generated).
457 // In VFP3 it will be always the Canonical NaN. 485 // In VFP3 it will be always the Canonical NaN.
458 // In VFP2 it will be either the Canonical NaN or the negative version 486 // In VFP2 it will be either the Canonical NaN or the negative version
459 // of the Canonical NaN. It doesn't matter if we have two values. The aim 487 // of the Canonical NaN. It doesn't matter if we have two values. The aim
460 // is to be sure to never generate the hole NaN. 488 // is to be sure to never generate the hole NaN.
461 void VFPEnsureFPSCRState(Register scratch); 489 void VFPEnsureFPSCRState(Register scratch);
462 490
463 // If the value is a NaN, canonicalize the value else, do nothing. 491 // If the value is a NaN, canonicalize the value else, do nothing.
492 void VFPCanonicalizeNaN(const DwVfpRegister result,
493 const DwVfpRegister value,
494 const Condition cond = al);
464 void VFPCanonicalizeNaN(const DwVfpRegister value, 495 void VFPCanonicalizeNaN(const DwVfpRegister value,
465 const Condition cond = al); 496 const Condition cond = al) {
497 VFPCanonicalizeNaN(value, value, cond);
498 }
466 499
467 // Compare double values and move the result to the normal condition flags. 500 // Compare double values and move the result to the normal condition flags.
468 void VFPCompareAndSetFlags(const DwVfpRegister src1, 501 void VFPCompareAndSetFlags(const DwVfpRegister src1,
469 const DwVfpRegister src2, 502 const DwVfpRegister src2,
470 const Condition cond = al); 503 const Condition cond = al);
471 void VFPCompareAndSetFlags(const DwVfpRegister src1, 504 void VFPCompareAndSetFlags(const DwVfpRegister src1,
472 const double src2, 505 const double src2,
473 const Condition cond = al); 506 const Condition cond = al);
474 507
475 // Compare double values and then load the fpscr flags to a register. 508 // Compare double values and then load the fpscr flags to a register.
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 Label* miss, 868 Label* miss,
836 bool miss_on_bound_function = false); 869 bool miss_on_bound_function = false);
837 870
838 // Compare object type for heap object. heap_object contains a non-Smi 871 // Compare object type for heap object. heap_object contains a non-Smi
839 // whose object type should be compared with the given type. This both 872 // whose object type should be compared with the given type. This both
840 // sets the flags and leaves the object type in the type_reg register. 873 // sets the flags and leaves the object type in the type_reg register.
841 // It leaves the map in the map register (unless the type_reg and map register 874 // It leaves the map in the map register (unless the type_reg and map register
842 // are the same register). It leaves the heap object in the heap_object 875 // are the same register). It leaves the heap object in the heap_object
843 // register unless the heap_object register is the same register as one of the 876 // register unless the heap_object register is the same register as one of the
844 // other registers. 877 // other registers.
878 // Type_reg can be no_reg. In that case ip is used.
845 void CompareObjectType(Register heap_object, 879 void CompareObjectType(Register heap_object,
846 Register map, 880 Register map,
847 Register type_reg, 881 Register type_reg,
848 InstanceType type); 882 InstanceType type);
849 883
884 // Compare object type for heap object. Branch to false_label if type
885 // is lower than min_type or greater than max_type.
886 void CheckObjectTypeRange(Register heap_object,
887 Register map,
888 InstanceType min_type,
889 InstanceType max_type,
890 Label* false_label);
891
850 // Compare instance type in a map. map contains a valid map object whose 892 // Compare instance type in a map. map contains a valid map object whose
851 // object type should be compared with the given type. This both 893 // object type should be compared with the given type. This both
852 // sets the flags and leaves the object type in the type_reg register. 894 // sets the flags and leaves the object type in the type_reg register.
853 void CompareInstanceType(Register map, 895 void CompareInstanceType(Register map,
854 Register type_reg, 896 Register type_reg,
855 InstanceType type); 897 InstanceType type);
856 898
857 899
858 // Check if a map for a JSObject indicates that the object has fast elements. 900 // Check if a map for a JSObject indicates that the object has fast elements.
859 // Jump to the specified label if it does not. 901 // Jump to the specified label if it does not.
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
1458 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 1500 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
1459 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 1501 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
1460 #else 1502 #else
1461 #define ACCESS_MASM(masm) masm-> 1503 #define ACCESS_MASM(masm) masm->
1462 #endif 1504 #endif
1463 1505
1464 1506
1465 } } // namespace v8::internal 1507 } } // namespace v8::internal
1466 1508
1467 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ 1509 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698