OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 Register map, | 175 Register map, |
176 Register instance_type); | 176 Register instance_type); |
177 | 177 |
178 // FCmp is similar to integer cmp, but requires unsigned | 178 // FCmp is similar to integer cmp, but requires unsigned |
179 // jcc instructions (je, ja, jae, jb, jbe, je, and jz). | 179 // jcc instructions (je, ja, jae, jb, jbe, je, and jz). |
180 void FCmp(); | 180 void FCmp(); |
181 | 181 |
182 // Smi tagging support. | 182 // Smi tagging support. |
183 void SmiTag(Register reg) { | 183 void SmiTag(Register reg) { |
184 ASSERT(kSmiTag == 0); | 184 ASSERT(kSmiTag == 0); |
185 shl(reg, kSmiTagSize); | 185 ASSERT(kSmiTagSize == 1); |
| 186 add(reg, Operand(reg)); |
186 } | 187 } |
187 void SmiUntag(Register reg) { | 188 void SmiUntag(Register reg) { |
188 sar(reg, kSmiTagSize); | 189 sar(reg, kSmiTagSize); |
189 } | 190 } |
190 | 191 |
191 // Abort execution if argument is not a number. Used in debug code. | 192 // Abort execution if argument is not a number. Used in debug code. |
192 void AbortIfNotNumber(Register object, const char* msg); | 193 void AbortIfNotNumber(Register object, const char* msg); |
193 | 194 |
194 // Abort execution if argument is not a smi. Used in debug code. | 195 // Abort execution if argument is not a smi. Used in debug code. |
195 void AbortIfNotSmi(Register object, const char* msg); | 196 void AbortIfNotSmi(Register object, const char* msg); |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 } \ | 580 } \ |
580 masm-> | 581 masm-> |
581 #else | 582 #else |
582 #define ACCESS_MASM(masm) masm-> | 583 #define ACCESS_MASM(masm) masm-> |
583 #endif | 584 #endif |
584 | 585 |
585 | 586 |
586 } } // namespace v8::internal | 587 } } // namespace v8::internal |
587 | 588 |
588 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ | 589 #endif // V8_IA32_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |