OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 enum class Size { | 60 enum class Size { |
61 Byte, | 61 Byte, |
62 HalfWord, | 62 HalfWord, |
63 Word, | 63 Word, |
64 }; | 64 }; |
65 | 65 |
66 MemoryAccess() : kind(Kind::None) {} | 66 MemoryAccess() : kind(Kind::None) {} |
67 MemoryAccess(Kind kind, Size size, size_t offset, int value = 0) | 67 MemoryAccess(Kind kind, Size size, size_t offset, int value = 0) |
68 : kind(kind), size(size), offset(offset), value(value) {} | 68 : kind(kind), size(size), offset(offset), value(value) {} |
69 | 69 |
70 Kind kind; | 70 Kind kind = Kind::None; |
71 Size size; | 71 Size size = Size::Byte; |
72 size_t offset; | 72 size_t offset = 0; |
73 int value; | 73 int value = 0; |
74 }; | 74 }; |
75 | 75 |
76 struct TestData { | 76 struct TestData { |
77 explicit TestData(int w) : w(w) {} | 77 explicit TestData(int w) : w(w) {} |
78 | 78 |
79 union { | 79 union { |
80 int32_t w; | 80 int32_t w; |
81 int16_t h; | 81 int16_t h; |
82 int8_t b; | 82 int8_t b; |
83 }; | 83 }; |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 CHECK_EQ(1, ExecuteMemoryAccess(isolate, &test_data, strex_w)); | 378 CHECK_EQ(1, ExecuteMemoryAccess(isolate, &test_data, strex_w)); |
379 CHECK_EQ(1, test_data.w); | 379 CHECK_EQ(1, test_data.w); |
380 | 380 |
381 thread.Finish(); | 381 thread.Finish(); |
382 thread.Join(); | 382 thread.Join(); |
383 } | 383 } |
384 | 384 |
385 #undef __ | 385 #undef __ |
386 | 386 |
387 #endif // USE_SIMULATOR | 387 #endif // USE_SIMULATOR |
OLD | NEW |