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

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

Issue 24793002: Thumb2 Backend: Make arithmetic instructions set condition codes by default Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.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 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 // zero or negative, or jumps to the 'not_power_of_two' label if the value is 1184 // zero or negative, or jumps to the 'not_power_of_two' label if the value is
1185 // strictly positive but not a power of two. 1185 // strictly positive but not a power of two.
1186 void JumpIfNotPowerOfTwoOrZeroAndNeg(Register reg, 1186 void JumpIfNotPowerOfTwoOrZeroAndNeg(Register reg,
1187 Register scratch, 1187 Register scratch,
1188 Label* zero_and_neg, 1188 Label* zero_and_neg,
1189 Label* not_power_of_two); 1189 Label* not_power_of_two);
1190 1190
1191 // --------------------------------------------------------------------------- 1191 // ---------------------------------------------------------------------------
1192 // Smi utilities 1192 // Smi utilities
1193 1193
1194 void SmiTag(Register reg, SBit s = LeaveCC) { 1194 void SmiTag(Register reg, SBitMode smode = DontCareCC) {
1195 add(reg, reg, Operand(reg), s); 1195 add(reg, reg, Operand(reg), smode);
1196 } 1196 }
1197 void SmiTag(Register dst, Register src, SBit s = LeaveCC) { 1197 void SmiTag(Register dst, Register src, SBitMode smode = DontCareCC) {
1198 add(dst, src, Operand(src), s); 1198 add(dst, src, Operand(src), smode);
1199 } 1199 }
1200 1200
1201 // Try to convert int32 to smi. If the value is to large, preserve 1201 // Try to convert int32 to smi. If the value is to large, preserve
1202 // the original value and jump to not_a_smi. Destroys scratch and 1202 // the original value and jump to not_a_smi. Destroys scratch and
1203 // sets flags. 1203 // sets flags.
1204 void TrySmiTag(Register reg, Label* not_a_smi) { 1204 void TrySmiTag(Register reg, Label* not_a_smi) {
1205 TrySmiTag(reg, reg, not_a_smi); 1205 TrySmiTag(reg, reg, not_a_smi);
1206 } 1206 }
1207 void TrySmiTag(Register reg, Register src, Label* not_a_smi) { 1207 void TrySmiTag(Register reg, Register src, Label* not_a_smi) {
1208 SmiTag(ip, src, SetCC); 1208 SmiTag(ip, src, SetCC);
1209 b(vs, not_a_smi); 1209 b(vs, not_a_smi);
1210 mov(reg, ip); 1210 mov(reg, ip);
1211 } 1211 }
1212 1212
1213 1213
1214 void SmiUntag(Register reg, SBit s = LeaveCC) { 1214 void SmiUntag(Register reg, SBitMode smode = DontCareCC) {
1215 mov(reg, Operand::SmiUntag(reg), s); 1215 mov(reg, Operand::SmiUntag(reg), smode);
1216 } 1216 }
1217 void SmiUntag(Register dst, Register src, SBit s = LeaveCC) { 1217 void SmiUntag(Register dst, Register src, SBitMode smode = DontCareCC) {
1218 mov(dst, Operand::SmiUntag(src), s); 1218 mov(dst, Operand::SmiUntag(src), smode);
1219 } 1219 }
1220 1220
1221 // Untag the source value into destination and jump if source is a smi. 1221 // Untag the source value into destination and jump if source is a smi.
1222 // Souce and destination can be the same register. 1222 // Souce and destination can be the same register.
1223 void UntagAndJumpIfSmi(Register dst, Register src, Label* smi_case); 1223 void UntagAndJumpIfSmi(Register dst, Register src, Label* smi_case);
1224 1224
1225 // Untag the source value into destination and jump if source is not a smi. 1225 // Untag the source value into destination and jump if source is not a smi.
1226 // Souce and destination can be the same register. 1226 // Souce and destination can be the same register.
1227 void UntagAndJumpIfNotSmi(Register dst, Register src, Label* non_smi_case); 1227 void UntagAndJumpIfNotSmi(Register dst, Register src, Label* non_smi_case);
1228 1228
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1460 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 1460 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
1461 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 1461 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
1462 #else 1462 #else
1463 #define ACCESS_MASM(masm) masm-> 1463 #define ACCESS_MASM(masm) masm->
1464 #endif 1464 #endif
1465 1465
1466 1466
1467 } } // namespace v8::internal 1467 } } // namespace v8::internal
1468 1468
1469 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ 1469 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698