Changeset 90352 in webkit for trunk/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
- Timestamp:
- Jul 3, 2011, 10:59:03 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/assembler/MacroAssemblerX86Common.h
r90237 r90352 845 845 } 846 846 847 Jump branch32(RelationalCondition cond, TrustedImm32 left, RegisterID right)848 {849 if (((cond == Equal) || (cond == NotEqual)) && !left.m_value)850 m_assembler.testl_rr(right, right);851 else852 m_assembler.cmpl_ir(left.m_value, right);853 return Jump(m_assembler.jCC(x86Condition(commute(cond))));854 }855 856 847 Jump branch32(RelationalCondition cond, RegisterID left, Address right) 857 848 { … … 1202 1193 } 1203 1194 1204 // Commute a relational condition, returns a new condition that will produce1205 // the same results given the same inputs but with their positions exchanged.1206 static RelationalCondition commute(RelationalCondition cond)1207 {1208 // Equality is commutative!1209 if (cond == Equal || cond == NotEqual)1210 return cond;1211 1212 // Based on the values of x86 condition codes, remap > with < and >= with <=1213 if (cond >= LessThan) {1214 ASSERT(cond == LessThan || cond == LessThanOrEqual || cond == GreaterThan || cond == GreaterThanOrEqual);1215 return static_cast<RelationalCondition>(X86Assembler::ConditionL + X86Assembler::ConditionG - cond);1216 }1217 1218 // As above, for unsigned conditions.1219 ASSERT(cond == Below || cond == BelowOrEqual || cond == Above || cond == AboveOrEqual);1220 return static_cast<RelationalCondition>(X86Assembler::ConditionB + X86Assembler::ConditionA - cond);1221 }1222 1223 1195 void nop() 1224 1196 {
Note:
See TracChangeset
for help on using the changeset viewer.