| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 private: | 50 private: |
| 51 SaveFPRegsMode save_doubles_; | 51 SaveFPRegsMode save_doubles_; |
| 52 | 52 |
| 53 Major MajorKey() { return StoreBufferOverflow; } | 53 Major MajorKey() { return StoreBufferOverflow; } |
| 54 int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } | 54 int MinorKey() { return (save_doubles_ == kSaveFPRegs) ? 1 : 0; } |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 | 57 |
| 58 class StringHelper : public AllStatic { | 58 class StringHelper : public AllStatic { |
| 59 public: | 59 public: |
| 60 // Probe the string table for a two character string. If the string is | 60 // TODO(all): These don't seem to be used any more. Delete them. |
| 61 // not found by probing a jump to the label not_found is performed. This jump | |
| 62 // does not guarantee that the string is not in the string table. If the | |
| 63 // string is found the code falls through with the string in register x0. | |
| 64 // Contents of both c1 and c2 registers are modified. At the exit c1 is | |
| 65 // guaranteed to contain halfword with low and high bytes equal to | |
| 66 // initial contents of c1 and c2 respectively. | |
| 67 static void GenerateTwoCharacterStringTableProbe(MacroAssembler* masm, | |
| 68 Register c1, | |
| 69 Register c2, | |
| 70 Register scratch1, | |
| 71 Register scratch2, | |
| 72 Register scratch3, | |
| 73 Register scratch4, | |
| 74 Register scratch5, | |
| 75 Label* not_found); | |
| 76 | |
| 77 | |
| 78 // Get the instance types for a pair of input strings. | |
| 79 static void LoadPairInstanceTypes(MacroAssembler* masm, | |
| 80 Register first_type, | |
| 81 Register second_type, | |
| 82 Register first_string, | |
| 83 Register second_string); | |
| 84 | |
| 85 | 61 |
| 86 // Generate string hash. | 62 // Generate string hash. |
| 87 static void GenerateHashInit(MacroAssembler* masm, | 63 static void GenerateHashInit(MacroAssembler* masm, |
| 88 Register hash, | 64 Register hash, |
| 89 Register character); | 65 Register character); |
| 90 | 66 |
| 91 static void GenerateHashAddCharacter(MacroAssembler* masm, | 67 static void GenerateHashAddCharacter(MacroAssembler* masm, |
| 92 Register hash, | 68 Register hash, |
| 93 Register character); | 69 Register character); |
| 94 | 70 |
| 95 static void GenerateHashGetHash(MacroAssembler* masm, | 71 static void GenerateHashGetHash(MacroAssembler* masm, |
| 96 Register hash, | 72 Register hash, |
| 97 Register scratch); | 73 Register scratch); |
| 98 | 74 |
| 99 private: | 75 private: |
| 100 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); | 76 DISALLOW_IMPLICIT_CONSTRUCTORS(StringHelper); |
| 101 }; | 77 }; |
| 102 | 78 |
| 103 | 79 |
| 104 class StringAddStub: public PlatformCodeStub { | |
| 105 public: | |
| 106 explicit StringAddStub(StringAddFlags flags) : flags_(flags) {} | |
| 107 | |
| 108 private: | |
| 109 Major MajorKey() { return StringAdd; } | |
| 110 int MinorKey() { return flags_; } | |
| 111 | |
| 112 void Generate(MacroAssembler* masm); | |
| 113 | |
| 114 void GenerateConvertArgument(MacroAssembler* masm, | |
| 115 Register arg, | |
| 116 Register scratch1, | |
| 117 Register scratch2, | |
| 118 Register scratch3, | |
| 119 Register scratch4, | |
| 120 Label* slow); | |
| 121 | |
| 122 void GenerateRegisterArgsPush(MacroAssembler* masm); | |
| 123 void GenerateRegisterArgsPop(MacroAssembler* masm); | |
| 124 | |
| 125 const StringAddFlags flags_; | |
| 126 }; | |
| 127 | |
| 128 | |
| 129 class RecordWriteStub: public PlatformCodeStub { | 80 class RecordWriteStub: public PlatformCodeStub { |
| 130 public: | 81 public: |
| 131 // Stub to record the write of 'value' at 'address' in 'object'. | 82 // Stub to record the write of 'value' at 'address' in 'object'. |
| 132 // Typically 'address' = 'object' + <some offset>. | 83 // Typically 'address' = 'object' + <some offset>. |
| 133 // See MacroAssembler::RecordWriteField() for example. | 84 // See MacroAssembler::RecordWriteField() for example. |
| 134 RecordWriteStub(Register object, | 85 RecordWriteStub(Register object, |
| 135 Register value, | 86 Register value, |
| 136 Register address, | 87 Register address, |
| 137 RememberedSetAction remembered_set_action, | 88 RememberedSetAction remembered_set_action, |
| 138 SaveFPRegsMode fp_mode) | 89 SaveFPRegsMode fp_mode) |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 TargetAddressStorageMode storage_mode() { return storage_mode_; } | 460 TargetAddressStorageMode storage_mode() { return storage_mode_; } |
| 510 | 461 |
| 511 private: | 462 private: |
| 512 TargetAddressStorageMode storage_mode_; | 463 TargetAddressStorageMode storage_mode_; |
| 513 }; | 464 }; |
| 514 | 465 |
| 515 | 466 |
| 516 } } // namespace v8::internal | 467 } } // namespace v8::internal |
| 517 | 468 |
| 518 #endif // V8_A64_CODE_STUBS_A64_H_ | 469 #endif // V8_A64_CODE_STUBS_A64_H_ |
| OLD | NEW |