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 27 matching lines...) Expand all Loading... |
38 | 38 |
39 // Compute a transcendental math function natively, or call the | 39 // Compute a transcendental math function natively, or call the |
40 // TranscendentalCache runtime function. | 40 // TranscendentalCache runtime function. |
41 class TranscendentalCacheStub: public CodeStub { | 41 class TranscendentalCacheStub: public CodeStub { |
42 public: | 42 public: |
43 explicit TranscendentalCacheStub(TranscendentalCache::Type type) | 43 explicit TranscendentalCacheStub(TranscendentalCache::Type type) |
44 : type_(type) {} | 44 : type_(type) {} |
45 void Generate(MacroAssembler* masm); | 45 void Generate(MacroAssembler* masm); |
46 private: | 46 private: |
47 TranscendentalCache::Type type_; | 47 TranscendentalCache::Type type_; |
| 48 |
48 Major MajorKey() { return TranscendentalCache; } | 49 Major MajorKey() { return TranscendentalCache; } |
49 int MinorKey() { return type_; } | 50 int MinorKey() { return type_; } |
50 Runtime::FunctionId RuntimeFunction(); | 51 Runtime::FunctionId RuntimeFunction(); |
51 void GenerateOperation(MacroAssembler* masm); | 52 void GenerateOperation(MacroAssembler* masm); |
52 }; | 53 }; |
53 | 54 |
54 | 55 |
| 56 // Check the transcendental cache, or generate the result, using SSE2. |
| 57 // The argument and result will be in xmm1. |
| 58 // Only supports TranscendentalCache::LOG at this point. |
| 59 class TranscendentalCacheSSE2Stub: public CodeStub { |
| 60 public: |
| 61 explicit TranscendentalCacheSSE2Stub(TranscendentalCache::Type type) |
| 62 : type_(type) {} |
| 63 void Generate(MacroAssembler* masm); |
| 64 private: |
| 65 TranscendentalCache::Type type_; |
| 66 |
| 67 Major MajorKey() { return TranscendentalCacheSSE2; } |
| 68 int MinorKey() { return type_; } |
| 69 Runtime::FunctionId RuntimeFunction(); |
| 70 void GenerateOperation(MacroAssembler* masm); |
| 71 }; |
| 72 |
| 73 |
55 class ToBooleanStub: public CodeStub { | 74 class ToBooleanStub: public CodeStub { |
56 public: | 75 public: |
57 ToBooleanStub() { } | 76 ToBooleanStub() { } |
58 | 77 |
59 void Generate(MacroAssembler* masm); | 78 void Generate(MacroAssembler* masm); |
60 | 79 |
61 private: | 80 private: |
62 Major MajorKey() { return ToBoolean; } | 81 Major MajorKey() { return ToBoolean; } |
63 int MinorKey() { return 0; } | 82 int MinorKey() { return 0; } |
64 }; | 83 }; |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 void Print() { | 507 void Print() { |
489 PrintF("NumberToStringStub\n"); | 508 PrintF("NumberToStringStub\n"); |
490 } | 509 } |
491 #endif | 510 #endif |
492 }; | 511 }; |
493 | 512 |
494 | 513 |
495 } } // namespace v8::internal | 514 } } // namespace v8::internal |
496 | 515 |
497 #endif // V8_IA32_CODE_STUBS_IA32_H_ | 516 #endif // V8_IA32_CODE_STUBS_IA32_H_ |
OLD | NEW |