OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |