OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 // Note: A lot of the helper functions below will vanish when we use virtual | 126 // Note: A lot of the helper functions below will vanish when we use virtual |
127 // function instead of switch more often. | 127 // function instead of switch more often. |
128 void Generate(MacroAssembler* masm); | 128 void Generate(MacroAssembler* masm); |
129 | 129 |
130 void GenerateTypeTransition(MacroAssembler* masm); | 130 void GenerateTypeTransition(MacroAssembler* masm); |
131 | 131 |
132 void GenerateSmiStub(MacroAssembler* masm); | 132 void GenerateSmiStub(MacroAssembler* masm); |
133 void GenerateSmiStubSub(MacroAssembler* masm); | 133 void GenerateSmiStubSub(MacroAssembler* masm); |
134 void GenerateSmiStubBitNot(MacroAssembler* masm); | 134 void GenerateSmiStubBitNot(MacroAssembler* masm); |
135 void GenerateSmiCodeSub(MacroAssembler* masm, NearLabel* non_smi, Label* undo, | 135 void GenerateSmiCodeSub(MacroAssembler* masm, |
136 Label* slow); | 136 Label* non_smi, |
137 void GenerateSmiCodeBitNot(MacroAssembler* masm, NearLabel* non_smi); | 137 Label* undo, |
| 138 Label* slow, |
| 139 Label::Distance non_smi_near = Label::kFar, |
| 140 Label::Distance undo_near = Label::kFar, |
| 141 Label::Distance slow_near = Label::kFar); |
| 142 void GenerateSmiCodeBitNot(MacroAssembler* masm, |
| 143 Label* non_smi, |
| 144 Label::Distance non_smi_near = Label::kFar); |
138 void GenerateSmiCodeUndo(MacroAssembler* masm); | 145 void GenerateSmiCodeUndo(MacroAssembler* masm); |
139 | 146 |
140 void GenerateHeapNumberStub(MacroAssembler* masm); | 147 void GenerateHeapNumberStub(MacroAssembler* masm); |
141 void GenerateHeapNumberStubSub(MacroAssembler* masm); | 148 void GenerateHeapNumberStubSub(MacroAssembler* masm); |
142 void GenerateHeapNumberStubBitNot(MacroAssembler* masm); | 149 void GenerateHeapNumberStubBitNot(MacroAssembler* masm); |
143 void GenerateHeapNumberCodeSub(MacroAssembler* masm, Label* slow); | 150 void GenerateHeapNumberCodeSub(MacroAssembler* masm, Label* slow); |
144 void GenerateHeapNumberCodeBitNot(MacroAssembler* masm, Label* slow); | 151 void GenerateHeapNumberCodeBitNot(MacroAssembler* masm, Label* slow); |
145 | 152 |
146 void GenerateGenericStub(MacroAssembler* masm); | 153 void GenerateGenericStub(MacroAssembler* masm); |
147 void GenerateGenericStubSub(MacroAssembler* masm); | 154 void GenerateGenericStubSub(MacroAssembler* masm); |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 Register left, | 395 Register left, |
389 Register right, | 396 Register right, |
390 Register scratch1, | 397 Register scratch1, |
391 Register scratch2); | 398 Register scratch2); |
392 | 399 |
393 private: | 400 private: |
394 virtual Major MajorKey() { return StringCompare; } | 401 virtual Major MajorKey() { return StringCompare; } |
395 virtual int MinorKey() { return 0; } | 402 virtual int MinorKey() { return 0; } |
396 virtual void Generate(MacroAssembler* masm); | 403 virtual void Generate(MacroAssembler* masm); |
397 | 404 |
398 static void GenerateAsciiCharsCompareLoop(MacroAssembler* masm, | 405 static void GenerateAsciiCharsCompareLoop( |
399 Register left, | 406 MacroAssembler* masm, |
400 Register right, | 407 Register left, |
401 Register length, | 408 Register right, |
402 Register scratch, | 409 Register length, |
403 NearLabel* chars_not_equal); | 410 Register scratch, |
| 411 Label* chars_not_equal, |
| 412 Label::Distance chars_not_equal_near = Label::kFar); |
404 }; | 413 }; |
405 | 414 |
406 | 415 |
407 class NumberToStringStub: public CodeStub { | 416 class NumberToStringStub: public CodeStub { |
408 public: | 417 public: |
409 NumberToStringStub() { } | 418 NumberToStringStub() { } |
410 | 419 |
411 // Generate code to do a lookup in the number string cache. If the number in | 420 // Generate code to do a lookup in the number string cache. If the number in |
412 // the register object is found in the cache the generated code falls through | 421 // the register object is found in the cache the generated code falls through |
413 // with the result in the result register. The object and the result register | 422 // with the result in the result register. The object and the result register |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 Register dictionary_; | 510 Register dictionary_; |
502 Register result_; | 511 Register result_; |
503 Register index_; | 512 Register index_; |
504 LookupMode mode_; | 513 LookupMode mode_; |
505 }; | 514 }; |
506 | 515 |
507 | 516 |
508 } } // namespace v8::internal | 517 } } // namespace v8::internal |
509 | 518 |
510 #endif // V8_IA32_CODE_STUBS_IA32_H_ | 519 #endif // V8_IA32_CODE_STUBS_IA32_H_ |
OLD | NEW |