| 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 22 matching lines...) Expand all Loading... |
| 33 #include "ic-inl.h" | 33 #include "ic-inl.h" |
| 34 | 34 |
| 35 namespace v8 { | 35 namespace v8 { |
| 36 namespace internal { | 36 namespace internal { |
| 37 | 37 |
| 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 enum ArgumentType { |
| 44 : type_(type) {} | 44 TAGGED = 0, |
| 45 UNTAGGED = 1 << TranscendentalCache::kTranscendentalTypeBits |
| 46 }; |
| 47 |
| 48 explicit TranscendentalCacheStub(TranscendentalCache::Type type, |
| 49 ArgumentType argument_type) |
| 50 : type_(type), argument_type_(argument_type) {} |
| 45 void Generate(MacroAssembler* masm); | 51 void Generate(MacroAssembler* masm); |
| 46 private: | 52 private: |
| 47 TranscendentalCache::Type type_; | 53 TranscendentalCache::Type type_; |
| 54 ArgumentType argument_type_; |
| 48 | 55 |
| 49 Major MajorKey() { return TranscendentalCache; } | 56 Major MajorKey() { return TranscendentalCache; } |
| 50 int MinorKey() { return type_; } | 57 int MinorKey() { return type_ | argument_type_; } |
| 51 Runtime::FunctionId RuntimeFunction(); | |
| 52 void GenerateOperation(MacroAssembler* masm); | |
| 53 }; | |
| 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(); | 58 Runtime::FunctionId RuntimeFunction(); |
| 70 void GenerateOperation(MacroAssembler* masm); | 59 void GenerateOperation(MacroAssembler* masm); |
| 71 }; | 60 }; |
| 72 | 61 |
| 73 | 62 |
| 74 class ToBooleanStub: public CodeStub { | 63 class ToBooleanStub: public CodeStub { |
| 75 public: | 64 public: |
| 76 ToBooleanStub() { } | 65 ToBooleanStub() { } |
| 77 | 66 |
| 78 void Generate(MacroAssembler* masm); | 67 void Generate(MacroAssembler* masm); |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 void Print() { | 496 void Print() { |
| 508 PrintF("NumberToStringStub\n"); | 497 PrintF("NumberToStringStub\n"); |
| 509 } | 498 } |
| 510 #endif | 499 #endif |
| 511 }; | 500 }; |
| 512 | 501 |
| 513 | 502 |
| 514 } } // namespace v8::internal | 503 } } // namespace v8::internal |
| 515 | 504 |
| 516 #endif // V8_IA32_CODE_STUBS_IA32_H_ | 505 #endif // V8_IA32_CODE_STUBS_IA32_H_ |
| OLD | NEW |