Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: src/arm64/cpu-arm64.cc

Issue 1921173004: [arm64] Use 'dc civac' to work around some errata. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // CPU specific code for arm independent of OS goes here. 5 // CPU specific code for arm independent of OS goes here.
6 6
7 #if V8_TARGET_ARCH_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/arm64/utils-arm64.h" 9 #include "src/arm64/utils-arm64.h"
10 #include "src/assembler.h" 10 #include "src/assembler.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // Cache line sizes are always a power of 2. 51 // Cache line sizes are always a power of 2.
52 DCHECK(CountSetBits(dsize, 64) == 1); 52 DCHECK(CountSetBits(dsize, 64) == 1);
53 DCHECK(CountSetBits(isize, 64) == 1); 53 DCHECK(CountSetBits(isize, 64) == 1);
54 uintptr_t dstart = start & ~(dsize - 1); 54 uintptr_t dstart = start & ~(dsize - 1);
55 uintptr_t istart = start & ~(isize - 1); 55 uintptr_t istart = start & ~(isize - 1);
56 uintptr_t end = start + length; 56 uintptr_t end = start + length;
57 57
58 __asm__ __volatile__ ( // NOLINT 58 __asm__ __volatile__ ( // NOLINT
59 // Clean every line of the D cache containing the target data. 59 // Clean every line of the D cache containing the target data.
60 "0: \n\t" 60 "0: \n\t"
61 // dc : Data Cache maintenance 61 // dc : Data Cache maintenance
62 // c : Clean 62 // c : Clean
63 // va : by (Virtual) Address 63 // i : Invalidate
64 // u : to the point of Unification 64 // va : by (Virtual) Address
65 // The point of unification for a processor is the point by which the 65 // c : to the point of Coherency
66 // instruction and data caches are guaranteed to see the same copy of a 66 // See ARM DDI 0406B page B2-12 for more information.
67 // memory location. See ARM DDI 0406B page B2-12 for more information. 67 // We would prefer to use "cvau" (clean to the point of unification) here
68 "dc cvau, %[dline] \n\t" 68 // but we use "civac" to work around Cortex-A53 errata 819472, 826319,
69 // 827319 and 824069.
70 "dc civac, %[dline] \n\t"
69 "add %[dline], %[dline], %[dsize] \n\t" 71 "add %[dline], %[dline], %[dsize] \n\t"
70 "cmp %[dline], %[end] \n\t" 72 "cmp %[dline], %[end] \n\t"
71 "b.lt 0b \n\t" 73 "b.lt 0b \n\t"
72 // Barrier to make sure the effect of the code above is visible to the rest 74 // Barrier to make sure the effect of the code above is visible to the rest
73 // of the world. 75 // of the world.
74 // dsb : Data Synchronisation Barrier 76 // dsb : Data Synchronisation Barrier
75 // ish : Inner SHareable domain 77 // ish : Inner SHareable domain
76 // The point of unification for an Inner Shareable shareability domain is 78 // The point of unification for an Inner Shareable shareability domain is
77 // the point by which the instruction and data caches of all the processors 79 // the point by which the instruction and data caches of all the processors
78 // in that Inner Shareable shareability domain are guaranteed to see the 80 // in that Inner Shareable shareability domain are guaranteed to see the
(...skipping 26 matching lines...) Expand all
105 // move this code before the code is generated. 107 // move this code before the code is generated.
106 : "cc", "memory" 108 : "cc", "memory"
107 ); // NOLINT 109 ); // NOLINT
108 #endif // V8_HOST_ARCH_ARM64 110 #endif // V8_HOST_ARCH_ARM64
109 } 111 }
110 112
111 } // namespace internal 113 } // namespace internal
112 } // namespace v8 114 } // namespace v8
113 115
114 #endif // V8_TARGET_ARCH_ARM64 116 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698