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

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

Issue 7776010: Convert a bunch of ASSERTs to STATIC_ASSERTs (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | src/ia32/macro-assembler-ia32.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 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 268
269 void ClampUint8(Register reg); 269 void ClampUint8(Register reg);
270 270
271 void ClampDoubleToUint8(XMMRegister input_reg, 271 void ClampDoubleToUint8(XMMRegister input_reg,
272 XMMRegister scratch_reg, 272 XMMRegister scratch_reg,
273 Register result_reg); 273 Register result_reg);
274 274
275 275
276 // Smi tagging support. 276 // Smi tagging support.
277 void SmiTag(Register reg) { 277 void SmiTag(Register reg) {
278 ASSERT(kSmiTag == 0); 278 STATIC_ASSERT(kSmiTag == 0);
279 ASSERT(kSmiTagSize == 1); 279 STATIC_ASSERT(kSmiTagSize == 1);
280 add(reg, Operand(reg)); 280 add(reg, Operand(reg));
281 } 281 }
282 void SmiUntag(Register reg) { 282 void SmiUntag(Register reg) {
283 sar(reg, kSmiTagSize); 283 sar(reg, kSmiTagSize);
284 } 284 }
285 285
286 // Modifies the register even if it does not contain a Smi! 286 // Modifies the register even if it does not contain a Smi!
287 void SmiUntag(Register reg, Label* is_smi) { 287 void SmiUntag(Register reg, Label* is_smi) {
288 ASSERT(kSmiTagSize == 1); 288 STATIC_ASSERT(kSmiTagSize == 1);
289 sar(reg, kSmiTagSize); 289 sar(reg, kSmiTagSize);
290 ASSERT(kSmiTag == 0); 290 STATIC_ASSERT(kSmiTag == 0);
291 j(not_carry, is_smi); 291 j(not_carry, is_smi);
292 } 292 }
293 293
294 // Jump the register contains a smi. 294 // Jump the register contains a smi.
295 inline void JumpIfSmi(Register value, 295 inline void JumpIfSmi(Register value,
296 Label* smi_label, 296 Label* smi_label,
297 Label::Distance distance = Label::kFar) { 297 Label::Distance distance = Label::kFar) {
298 test(value, Immediate(kSmiTagMask)); 298 test(value, Immediate(kSmiTagMask));
299 j(zero, smi_label, distance); 299 j(zero, smi_label, distance);
300 } 300 }
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 } \ 799 } \
800 masm-> 800 masm->
801 #else 801 #else
802 #define ACCESS_MASM(masm) masm-> 802 #define ACCESS_MASM(masm) masm->
803 #endif 803 #endif
804 804
805 805
806 } } // namespace v8::internal 806 } } // namespace v8::internal
807 807
808 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ 808 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/ic-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698