Skip to content

Commit 80f358d

Browse files
committed
Adds targets for simarmv6 and armv6
related #25562 [email protected] Review URL: https://codereview.chromium.org/1624593002 .
1 parent 771fea4 commit 80f358d

18 files changed

+182
-17
lines changed

pkg/pkg.status

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ observe/test/transformer_test: Fail, OK # Uses dart:io.
157157
observe/test/unique_message_test: SkipByDesign # Uses dart:io.
158158
dart_messages/test/dart_messages_test: Skip # Uses dart:io.
159159

160-
[ $runtime == vm && ($arch == simarm64 || $arch == simarm || $arch == simarmv5te || $arch == simmips || $arch == armv5te) ]
160+
[ $runtime == vm && ($arch == simarm64 || $arch == simarm || $arch == simarmv6 || $arch == simarmv5te || $arch == simmips || $arch == armv6 || $arch == armv5te) ]
161161
# Timeout. These are not unit tests. They do not run efficiently on our
162162
# simulator or low-end devices.
163163
*: Skip

runtime/tests/vm/vm.status

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ cc/Service_Profile: Skip
3333
cc/Dart2JSCompilerStats: Skip
3434
cc/CorelibCompilerStats: Skip
3535

36-
[ $arch == simarm || $arch == simarmv5te || $arch == simarm64 || $arch == simmips ]
36+
[ $arch == simarm || $arch == simarmv6 || $arch == simarmv5te || $arch == simarm64 || $arch == simmips ]
3737
cc/Service_Profile: Skip
3838

3939
[ $arch == arm ]

runtime/tools/gyp/runtime-configurations.gypi

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,20 @@
9292
},
9393
},
9494

95+
'Dart_simarmv6_Base': {
96+
'abstract': 1,
97+
'xcode_settings': {
98+
'ARCHS': [ 'i386' ],
99+
},
100+
},
101+
102+
'Dart_simarmv5te_Base': {
103+
'abstract': 1,
104+
'xcode_settings': {
105+
'ARCHS': [ 'i386' ],
106+
},
107+
},
108+
95109
'Dart_simmips_Base': {
96110
'abstract': 1,
97111
'xcode_settings': {

runtime/vm/assembler_arm_test.cc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1798,10 +1798,20 @@ ASSEMBLER_TEST_GENERATE(IntDiv_supported, assembler) {
17981798

17991799
ASSEMBLER_TEST_RUN(IntDiv_supported, test) {
18001800
EXPECT(test != NULL);
1801+
#if defined(USING_SIMULATOR)
1802+
bool orig = TargetCPUFeatures::integer_division_supported();
1803+
HostCPUFeatures::set_integer_division_supported(true);
1804+
if (TargetCPUFeatures::can_divide()) {
1805+
typedef int (*Tst)() DART_UNUSED;
1806+
EXPECT_EQ(3, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1807+
}
1808+
HostCPUFeatures::set_integer_division_supported(orig);
1809+
#else
18011810
if (TargetCPUFeatures::can_divide()) {
18021811
typedef int (*Tst)() DART_UNUSED;
18031812
EXPECT_EQ(3, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
18041813
}
1814+
#endif
18051815
}
18061816

18071817

@@ -1829,10 +1839,20 @@ ASSEMBLER_TEST_GENERATE(IntDiv_unsupported, assembler) {
18291839

18301840
ASSEMBLER_TEST_RUN(IntDiv_unsupported, test) {
18311841
EXPECT(test != NULL);
1842+
#if defined(USING_SIMULATOR)
1843+
bool orig = TargetCPUFeatures::integer_division_supported();
1844+
HostCPUFeatures::set_integer_division_supported(false);
18321845
if (TargetCPUFeatures::can_divide()) {
18331846
typedef int (*Tst)() DART_UNUSED;
18341847
EXPECT_EQ(3, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
18351848
}
1849+
HostCPUFeatures::set_integer_division_supported(orig);
1850+
#else
1851+
if (TargetCPUFeatures::can_divide()) {
1852+
typedef int (*Tst)() DART_UNUSED;
1853+
EXPECT_EQ(3, EXECUTE_TEST_CODE_INT32(Tst, test->entry()));
1854+
}
1855+
#endif
18361856
}
18371857

18381858

runtime/vm/cpu_arm.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,14 @@
5656

5757
namespace dart {
5858

59-
// TODO(zra): Add a target for ARMv6.
6059
#if defined(TARGET_ARCH_ARM_5TE)
6160
DEFINE_FLAG(bool, use_vfp, false, "Use vfp instructions if supported");
6261
DEFINE_FLAG(bool, use_neon, false, "Use neon instructions if supported");
62+
DEFINE_FLAG(bool, use_integer_division, false,
63+
"Use integer division instruction if supported");
64+
#elif defined(TARGET_ARCH_ARM_6)
65+
DEFINE_FLAG(bool, use_vfp, true, "Use vfp instructions if supported");
66+
DEFINE_FLAG(bool, use_neon, false, "Use neon instructions if supported");
6367
DEFINE_FLAG(bool, use_integer_division, false,
6468
"Use integer division instruction if supported");
6569
#else
@@ -242,6 +246,8 @@ void HostCPUFeatures::InitOnce() {
242246

243247
#if defined(TARGET_ARCH_ARM_5TE)
244248
arm_version_ = ARMv5TE;
249+
#elif defined(TARGET_ARCH_ARM_6)
250+
arm_version_ = ARMv6;
245251
#else
246252
arm_version_ = ARMv7;
247253
#endif

tests/co19/co19-runtime.status

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ LibTest/collection/ListBase/ListBase_class_A01_t02: Skip # co19 issue 673
7474
LibTest/isolate/Isolate/spawnUri_A01_t04: Crash, Pass # Issue 17440
7575
LibTest/isolate/Isolate/spawn_A01_t04: Crash, Pass # Issue 17440
7676

77-
[ ($compiler == none || $compiler == precompiler) && ($runtime == vm || $runtime == dart_precompiled) && ($arch == simarm || $arch == simarmv5te || $arch == simmips || $arch == simarm64) ]
77+
[ ($compiler == none || $compiler == precompiler) && ($runtime == vm || $runtime == dart_precompiled) && ($arch == simarm || $arch == simarmv6 || $arch == simarmv5te || $arch == simmips || $arch == simarm64) ]
7878
LibTest/core/Uri/Uri_A06_t03: Skip # Timeout
7979
LibTest/collection/ListMixin/ListMixin_class_A01_t01: Skip # Timeout
8080
LibTest/collection/ListBase/ListBase_class_A01_t01: Skip # Timeout

tests/language/language.status

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ large_class_declaration_test: SkipSlow # Times out. Issue 20352
104104
[ ($compiler == none || $compiler == precompiler) && $runtime == ContentShellOnAndroid ]
105105
gc_test: SkipSlow # Times out flakily. Issue 20956
106106

107-
[ ($compiler == none || $compiler == precompiler) && ($runtime == vm || $runtime == dart_precompiled) && ( $arch == simarm || $arch == arm || $arch == simarmv5te || $arch == armv5te || $arch == simarm64 || $arch == arm64 || $arch == simmips || $arch == mips) ]
107+
[ ($compiler == none || $compiler == precompiler) && ($runtime == vm || $runtime == dart_precompiled) && ( $arch == simarm || $arch == arm || $arch == simarmv6 || $arch == armv6 || $arch == simarmv5te || $arch == armv5te || $arch == simarm64 || $arch == arm64 || $arch == simmips || $arch == mips) ]
108108
vm/load_to_load_unaligned_forwarding_vm_test: Pass, Crash # Unaligned offset. Issue 22151
109109

110110
[ ($compiler == none || $compiler == precompiler) && $runtime == dartium ]

tests/lib/lib.status

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ mirrors/native_class_test: Pass, Slow
308308
[ ($compiler == none || $compiler == precompiler) && $arch == mips ]
309309
async/timer_regress22626_test: Pass, RuntimeError # Issue 22626
310310

311-
[ $arch == simarm || $arch == simarmv5te ]
311+
[ $arch == simarm || $arch == simarmv6 || $arch == simarmv5te ]
312312
convert/chunked_conversion_utf88_test: Skip # Pass, Slow Issue 12644.
313313
convert/utf85_test: Skip # Pass, Slow Issue 12644.
314314

@@ -331,7 +331,7 @@ convert/streamed_conversion_json_utf8_decode_test: Pass, Slow
331331
[ ($runtime == vm || $runtime == dart_precompiled) && $mode == release && $arch == ia32 && $system == windows ]
332332
convert/json_test: RuntimeError # Issue 24908
333333

334-
[ $mode == debug && $arch != ia32 && $arch != x64 && $arch != simarm && $arch != simarmv5te ]
334+
[ $mode == debug && $arch != ia32 && $arch != x64 && $arch != simarm && $arch != simarmv6 && $arch != simarmv5te ]
335335
convert/streamed_conversion_json_utf8_decode_test: Skip # Verification not yet implemented.
336336

337337
[ ($runtime == vm || $runtime == dart_precompiled) && $mode == debug && $builder_tag == asan ]

tests/standalone/standalone.status

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ oom_error_stacktrace_test: Pass # The test only fails at runtime.
140140
[ $compiler == dart2js && $browser ]
141141
*: Skip
142142

143-
[ $arch == simarm || $arch == simarmv5te || $arch == simmips ]
143+
[ $arch == simarm || $arch == simarmv6 || $arch == simarmv5te || $arch == simmips ]
144144
out_of_memory_test: Skip # passes on Mac, crashes on Linux
145145
oom_error_stacktrace_test: Skip # Fails on Linux
146146

@@ -268,4 +268,4 @@ io/raw_socket_cross_process_test: RuntimeError # Platform.executable
268268
io/test_extension_test: RuntimeError # Platform.executable
269269
io/regress_7679_test: RuntimeError # Platform.executable
270270

271-
io/process_*: Skip # Most use Platform.executable
271+
io/process_*: Skip # Most use Platform.executable

third_party/pkg_tested/pkg_tested.status

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub/*: SkipByDesign
2323
pub/test/run/app_can_read_from_stdin_test: Fail # Issue 19448
2424
pub/test/run/forwards_signal_posix_test: SkipByDesign
2525

26-
[ $runtime == vm && ($mode == debug || $arch == mips || $arch == simmips || $arch == simarm || $arch == simarmv5te || $arch == simarm64 || $builder_tag == asan) ]
26+
[ $runtime == vm && ($mode == debug || $arch == mips || $arch == simmips || $arch == simarm || $arch == simarmv6 || $arch == simarmv5te || $arch == simarm64 || $builder_tag == asan) ]
2727
dart_style/test/command_line_test: Skip # The test controller does not take into account that tests take much longer in debug mode or on simulators/mips.
2828
dart_style/test/formatter_test: Skip # The test controller does not take into account that tests take much longer in debug mode or on simulators/mips.
2929

tools/build.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ def BuildOptions():
5555
default=False, action="store_true")
5656
result.add_option("-a", "--arch",
5757
help='Target architectures (comma-separated).',
58-
metavar='[all,ia32,x64,simarm,arm,simarmv5te,armv5te,simmips,mips'
59-
',simarm64,arm64,]',
58+
metavar='[all,ia32,x64,simarm,arm,simarmv6,armv6,simarmv5te,armv5te,'
59+
'simmips,mips,simarm64,arm64,]',
6060
default=utils.GuessArchitecture())
6161
result.add_option("--os",
6262
help='Target OSs (comma-separated).',
@@ -101,8 +101,8 @@ def ProcessOptions(options, args):
101101
print "Unknown mode %s" % mode
102102
return False
103103
for arch in options.arch:
104-
archs = ['ia32', 'x64', 'simarm', 'arm', 'simarmv5te', 'armv5te', 'simmips',
105-
'mips', 'simarm64', 'arm64',]
104+
archs = ['ia32', 'x64', 'simarm', 'arm', 'simarmv6', 'armv6',
105+
'simarmv5te', 'armv5te', 'simmips', 'mips', 'simarm64', 'arm64',]
106106
if not arch in archs:
107107
print "Unknown arch %s" % arch
108108
return False
@@ -119,7 +119,7 @@ def ProcessOptions(options, args):
119119
print ("Cross-compilation to %s is not supported on host os %s."
120120
% (os_name, HOST_OS))
121121
return False
122-
if not arch in ['ia32', 'arm', 'armv5te', 'arm64', 'mips']:
122+
if not arch in ['ia32', 'arm', 'armv6', 'armv5te', 'arm64', 'mips']:
123123
print ("Cross-compilation to %s is not supported for architecture %s."
124124
% (os_name, arch))
125125
return False

tools/gyp/configurations.gypi

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717
['"<(target_arch)"=="ia32"', { 'dart_target_arch': 'IA32', }],
1818
['"<(target_arch)"=="x64"', { 'dart_target_arch': 'X64', }],
1919
['"<(target_arch)"=="arm"', { 'dart_target_arch': 'ARM', }],
20+
['"<(target_arch)"=="armv6"', { 'dart_target_arch': 'ARMV6', }],
2021
['"<(target_arch)"=="armv5te"', { 'dart_target_arch': 'ARMV5TE', }],
2122
['"<(target_arch)"=="arm64"', { 'dart_target_arch': 'ARM64', }],
2223
['"<(target_arch)"=="simarm"', { 'dart_target_arch': 'SIMARM', }],
24+
['"<(target_arch)"=="simarmv6"', { 'dart_target_arch': 'SIMARMV6', }],
2325
['"<(target_arch)"=="simarmv5te"', { 'dart_target_arch': 'SIMARMV5TE', }],
2426
['"<(target_arch)"=="simarm64"', { 'dart_target_arch': 'SIMARM64', }],
2527
['"<(target_arch)"=="mips"', { 'dart_target_arch': 'MIPS', }],
@@ -63,6 +65,14 @@
6365
]
6466
},
6567

68+
'Dart_simarmv6_Base': {
69+
'abstract': 1,
70+
'defines': [
71+
'TARGET_ARCH_ARM',
72+
'TARGET_ARCH_ARM_6',
73+
]
74+
},
75+
6676
'Dart_simarmv5te_Base': {
6777
'abstract': 1,
6878
'defines': [
@@ -78,6 +88,14 @@
7888
],
7989
},
8090

91+
'Dart_armv6_Base': {
92+
'abstract': 1,
93+
'defines': [
94+
'TARGET_ARCH_ARM',
95+
'TARGET_ARCH_ARM_6',
96+
],
97+
},
98+
8199
'Dart_armv5te_Base': {
82100
'abstract': 1,
83101
'defines': [
@@ -184,6 +202,27 @@
184202
],
185203
},
186204

205+
'DebugSIMARMV6': {
206+
'inherit_from': [
207+
'Dart_Base', 'Dart_simarmv6_Base', 'Dart_Debug',
208+
'Dart_<(dart_target_os)_Base',
209+
'Dart_<(dart_target_os)_simarmv6_Base',
210+
'Dart_<(dart_target_os)_Debug',
211+
],
212+
'defines': [
213+
'DEBUG',
214+
],
215+
},
216+
217+
'ReleaseSIMARMV6': {
218+
'inherit_from': [
219+
'Dart_Base', 'Dart_simarmv6_Base', 'Dart_Release',
220+
'Dart_<(dart_target_os)_Base',
221+
'Dart_<(dart_target_os)_simarmv6_Base',
222+
'Dart_<(dart_target_os)_Release',
223+
],
224+
},
225+
187226
'DebugSIMARMV5TE': {
188227
'inherit_from': [
189228
'Dart_Base', 'Dart_simarmv5te_Base', 'Dart_Debug',
@@ -285,6 +324,42 @@
285324
],
286325
},
287326

327+
'DebugXARMV6': {
328+
'inherit_from': [
329+
'Dart_Base', 'Dart_armv6_Base', 'Dart_Debug',
330+
'Dart_Linux_Base',
331+
'Dart_Linux_xarmv6_Base',
332+
'Dart_Linux_Debug',
333+
],
334+
},
335+
336+
'ReleaseXARMV6': {
337+
'inherit_from': [
338+
'Dart_Base', 'Dart_armv6_Base', 'Dart_Release',
339+
'Dart_Linux_Base',
340+
'Dart_Linux_xarmv6_Base',
341+
'Dart_Linux_Release',
342+
],
343+
},
344+
345+
'DebugARMV6': {
346+
'inherit_from': [
347+
'Dart_Base', 'Dart_armv6_Base', 'Dart_Debug',
348+
'Dart_Linux_Base',
349+
'Dart_Linux_armv6_Base',
350+
'Dart_Linux_Debug',
351+
],
352+
},
353+
354+
'ReleaseARMV6': {
355+
'inherit_from': [
356+
'Dart_Base', 'Dart_armv6_Base', 'Dart_Release',
357+
'Dart_Linux_Base',
358+
'Dart_Linux_armv6_Base',
359+
'Dart_Linux_Release',
360+
],
361+
},
362+
288363
'DebugXARMV5TE': {
289364
'inherit_from': [
290365
'Dart_Base', 'Dart_armv5te_Base', 'Dart_Debug',

tools/gyp/configurations_make.gypi

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@
7676
'ldflags': [ '-m32', ],
7777
},
7878

79+
'Dart_Linux_simarmv6_Base': {
80+
'abstract': 1,
81+
'cflags': [ '-O3', '-m32', '-msse2', '-mfpmath=sse' ],
82+
'ldflags': [ '-m32', ],
83+
},
84+
7985
'Dart_Linux_simarmv5te_Base': {
8086
'abstract': 1,
8187
'cflags': [ '-O3', '-m32', '-msse2', '-mfpmath=sse' ],
@@ -117,6 +123,35 @@
117123
],
118124
},
119125

126+
# ARMv6 cross-build
127+
'Dart_Linux_xarmv6_Base': {
128+
'abstract': 1,
129+
'target_conditions': [
130+
['_toolset=="target"', {
131+
'cflags': [
132+
'-march=armv6',
133+
'-mfpu=vfp',
134+
'-Wno-psabi', # suppresses va_list warning
135+
'-fno-strict-overflow',
136+
],
137+
}],
138+
['_toolset=="host"', {
139+
'cflags': ['-m32', '-msse2', '-mfpmath=sse' ],
140+
'ldflags': ['-m32'],
141+
}]]
142+
},
143+
144+
# ARMv6 native build
145+
'Dart_Linux_armv6_Base': {
146+
'abstract': 1,
147+
'cflags': [
148+
'-march=armv6',
149+
'-mfpu=vfp',
150+
'-Wno-psabi', # suppresses va_list warning
151+
'-fno-strict-overflow',
152+
],
153+
},
154+
120155
# ARMv5 cross-build
121156
'Dart_Linux_xarmv5te_Base': {
122157
'abstract': 1,

tools/gyp/configurations_msvs.gypi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
'Dart_Win_simarm_Base': {
2525
'abstract': 1,
2626
},
27+
'Dart_Win_simarmv6_Base': {
28+
'abstract': 1,
29+
},
2730
'Dart_Win_simarmv5te_Base': {
2831
'abstract': 1,
2932
},

tools/gyp/configurations_xcode.gypi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@
7878
'Dart_Macos_simarm_Base': {
7979
'abstract': 1,
8080
},
81+
'Dart_Macos_simarmv6_Base': {
82+
'abstract': 1,
83+
},
8184
'Dart_Macos_simarmv5te_Base': {
8285
'abstract': 1,
8386
},

tools/testing/dart/runtime_configuration.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ class DartVmRuntimeConfiguration extends RuntimeConfiguration {
172172
switch (arch) {
173173
case 'simarm':
174174
case 'arm':
175+
case 'simarmv6':
176+
case 'armv6':
175177
case' simarmv5te':
176178
case 'armv5te':
177179
case 'simmips':

tools/testing/dart/test_options.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ class TestOptionsParser {
108108
'arch',
109109
'The architecture to run tests for',
110110
['-a', '--arch'],
111-
['all', 'ia32', 'x64', 'arm', 'armv5te', 'arm64', 'mips',
112-
'simarm', 'simarmv5te', 'simarm64', 'simmips'],
111+
['all', 'ia32', 'x64', 'arm', 'armv6', 'armv5te', 'arm64', 'mips',
112+
'simarm', 'simarmv6', 'simarmv5te', 'simarm64', 'simmips'],
113113
'x64'),
114114
new _TestOptionSpecification(
115115
'system',

0 commit comments

Comments
 (0)