mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 01:30:32 +00:00
Adds a simarmv5te build and test target.
Also: - Removes command line flags to choose simulated arm version. I think we should use build targets instead, like in this change, to make building and testing more obvious. - Skips pkg tests on all simulators. R=regis@google.com, ricow@google.com Review URL: https://codereview.chromium.org//1077823002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45181 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
031234d37f
commit
86bfd7cb30
|
@ -35,11 +35,6 @@ third_party/html5lib/test/tokenizer_test: SkipSlow # Times out
|
|||
[ $runtime == vm && $system == windows]
|
||||
analysis_server/test/analysis/get_errors_test: Skip # runtime error, Issue 22180
|
||||
|
||||
[ $runtime == vm && ( $arch == simarm || $arch == simmips ) ]
|
||||
docgen/test/*: SkipSlow
|
||||
third_party/html5lib/test/tokenizer_test: Pass, Slow
|
||||
analysis_server/*: SkipSlow # Timeout in some tests.
|
||||
|
||||
[ $compiler == dart2js ]
|
||||
collection/test/equality_test/01: Fail # Issue 1533
|
||||
collection/test/equality_test/02: Fail # Issue 1533
|
||||
|
@ -163,7 +158,7 @@ third_party/html5lib/test/parser_test: SkipByDesign # Uses dart:io.
|
|||
third_party/html5lib/test/selectors/*: SkipByDesign # Uses dart:io.
|
||||
third_party/html5lib/test/tokenizer_test: SkipByDesign # Uses dart:io.
|
||||
|
||||
[ $arch == simarm64 || $arch == armv5te ]
|
||||
[ $runtime == vm && ($arch == simarm64 || $arch == simarm || $arch == simarmv5te || $arch == simmips || $arch == armv5te) ]
|
||||
# Timeout. These are not unit tests. They do not run efficiently on our
|
||||
# simulator or low-end devices.
|
||||
*: Skip
|
||||
|
|
|
@ -40,7 +40,7 @@ cc/ThreadInterrupterHigh: Skip
|
|||
cc/ThreadInterrupterMedium: Skip
|
||||
cc/ThreadInterrupterLow: Skip
|
||||
|
||||
[ $arch == simarm || $arch == simmips ]
|
||||
[ $arch == simarm || $arch == simarmv5te || $arch == simarm64 || $arch == simmips ]
|
||||
cc/ThreadInterrupterHigh: Skip
|
||||
cc/ThreadInterrupterMedium: Skip
|
||||
cc/ThreadInterrupterLow: Skip
|
||||
|
|
|
@ -1807,12 +1807,14 @@ ASSEMBLER_TEST_RUN(IntDiv_supported, test) {
|
|||
|
||||
ASSEMBLER_TEST_GENERATE(IntDiv_unsupported, assembler) {
|
||||
#if defined(USING_SIMULATOR)
|
||||
bool orig = TargetCPUFeatures::integer_division_supported();
|
||||
HostCPUFeatures::set_integer_division_supported(false);
|
||||
__ mov(R0, Operand(27));
|
||||
__ mov(R1, Operand(9));
|
||||
__ IntegerDivide(R0, R0, R1, D0, D1);
|
||||
HostCPUFeatures::set_integer_division_supported(orig);
|
||||
if (TargetCPUFeatures::can_divide()) {
|
||||
bool orig = TargetCPUFeatures::integer_division_supported();
|
||||
HostCPUFeatures::set_integer_division_supported(false);
|
||||
__ mov(R0, Operand(27));
|
||||
__ mov(R1, Operand(9));
|
||||
__ IntegerDivide(R0, R0, R1, D0, D1);
|
||||
HostCPUFeatures::set_integer_division_supported(orig);
|
||||
}
|
||||
__ bx(LR);
|
||||
#else
|
||||
if (TargetCPUFeatures::can_divide()) {
|
||||
|
|
|
@ -20,13 +20,25 @@
|
|||
|
||||
namespace dart {
|
||||
|
||||
// TODO(zra): Add a target for ARMv6.
|
||||
#if defined(TARGET_ARCH_ARM_5TE)
|
||||
DEFINE_FLAG(bool, use_vfp, false, "Use vfp instructions if supported");
|
||||
DEFINE_FLAG(bool, use_neon, false, "Use neon instructions if supported");
|
||||
DEFINE_FLAG(bool, use_integer_division, false,
|
||||
"Use integer division instruction if supported");
|
||||
#else
|
||||
DEFINE_FLAG(bool, use_vfp, true, "Use vfp instructions if supported");
|
||||
DEFINE_FLAG(bool, use_neon, true, "Use neon instructions if supported");
|
||||
DEFINE_FLAG(bool, use_integer_division, true,
|
||||
"Use integer division instruction if supported");
|
||||
#endif
|
||||
|
||||
#if !defined(HOST_ARCH_ARM)
|
||||
DEFINE_FLAG(bool, sim_use_armv7, true, "Use all ARMv7 instructions");
|
||||
DEFINE_FLAG(bool, sim_use_armv5te, false, "Restrict to ARMv5TE instructions");
|
||||
DEFINE_FLAG(bool, sim_use_armv6, false, "Restrict to ARMv6 instructions");
|
||||
#if defined(TARGET_ARCH_ARM_5TE)
|
||||
DEFINE_FLAG(bool, sim_use_hardfp, false, "Use the softfp ABI.");
|
||||
#else
|
||||
DEFINE_FLAG(bool, sim_use_hardfp, true, "Use the softfp ABI.");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void CPU::FlushICache(uword start, uword size) {
|
||||
|
@ -121,10 +133,11 @@ void HostCPUFeatures::InitOnce() {
|
|||
bool is_krait = CpuInfo::FieldContains(kCpuInfoHardware, "QCT APQ8064");
|
||||
if (is_krait) {
|
||||
// Special case for Qualcomm Krait CPUs in Nexus 4 and 7.
|
||||
integer_division_supported_ = true;
|
||||
integer_division_supported_ = FLAG_use_integer_division;
|
||||
} else {
|
||||
integer_division_supported_ =
|
||||
CpuInfo::FieldContains(kCpuInfoFeatures, "idiva") || is_arm64;
|
||||
(CpuInfo::FieldContains(kCpuInfoFeatures, "idiva") || is_arm64) &&
|
||||
FLAG_use_integer_division;
|
||||
}
|
||||
neon_supported_ =
|
||||
(CpuInfo::FieldContains(kCpuInfoFeatures, "neon") || is_arm64) &&
|
||||
|
@ -160,19 +173,17 @@ void HostCPUFeatures::Cleanup() {
|
|||
void HostCPUFeatures::InitOnce() {
|
||||
CpuInfo::InitOnce();
|
||||
hardware_ = CpuInfo::GetCpuModel();
|
||||
|
||||
#if defined(TARGET_ARCH_ARM_5TE)
|
||||
arm_version_ = ARMv5TE;
|
||||
#else
|
||||
arm_version_ = ARMv7;
|
||||
#endif
|
||||
|
||||
integer_division_supported_ = FLAG_use_integer_division;
|
||||
vfp_supported_ = FLAG_use_vfp;
|
||||
neon_supported_ = FLAG_use_vfp && FLAG_use_neon;
|
||||
hardfp_supported_ = FLAG_sim_use_hardfp;
|
||||
if (FLAG_sim_use_armv5te) {
|
||||
arm_version_ = ARMv5TE;
|
||||
integer_division_supported_ = false;
|
||||
} else if (FLAG_sim_use_armv6) {
|
||||
arm_version_ = ARMv6;
|
||||
integer_division_supported_ = true;
|
||||
} else if (FLAG_sim_use_armv7) {
|
||||
arm_version_ = ARMv7;
|
||||
integer_division_supported_ = true;
|
||||
}
|
||||
#if defined(DEBUG)
|
||||
initialized_ = true;
|
||||
#endif
|
||||
|
|
|
@ -1728,10 +1728,6 @@ void Simulator::DecodeType01(Instr* instr) {
|
|||
case 3: {
|
||||
// Registers rd, rn, rm, ra are encoded as rn, rm, rs, rd.
|
||||
// Format(instr, "mls'cond's 'rn, 'rm, 'rs, 'rd");
|
||||
if (TargetCPUFeatures::arm_version() != ARMv7) {
|
||||
UnimplementedInstruction(instr);
|
||||
break;
|
||||
}
|
||||
rd_val = get_register(rd);
|
||||
// fall through
|
||||
}
|
||||
|
@ -1740,6 +1736,10 @@ void Simulator::DecodeType01(Instr* instr) {
|
|||
// Format(instr, "mul'cond's 'rn, 'rm, 'rs");
|
||||
int32_t alu_out = rm_val * rs_val;
|
||||
if (instr->Bits(21, 3) == 3) { // mls
|
||||
if (TargetCPUFeatures::arm_version() != ARMv7) {
|
||||
UnimplementedInstruction(instr);
|
||||
break;
|
||||
}
|
||||
alu_out = -alu_out;
|
||||
}
|
||||
alu_out += rd_val;
|
||||
|
|
|
@ -984,7 +984,9 @@ void StubCode::GenerateUpdateStoreBufferStub(Assembler* assembler) {
|
|||
// R2: Header word.
|
||||
if (TargetCPUFeatures::arm_version() == ARMv5TE) {
|
||||
// TODO(21263): Implement 'swp' and use it below.
|
||||
#if !defined(USING_SIMULATOR)
|
||||
ASSERT(OS::NumberOfAvailableProcessors() <= 1);
|
||||
#endif
|
||||
__ orr(R2, R2, Operand(1 << RawObject::kRememberedBit));
|
||||
__ str(R2, FieldAddress(R0, Object::tags_offset()));
|
||||
} else {
|
||||
|
|
|
@ -70,7 +70,7 @@ LibTest/collection/ListBase/ListBase_class_A01_t02: Skip # co19 issue 673
|
|||
LibTest/isolate/Isolate/spawnUri_A01_t04: Crash, Pass # Issue 17440
|
||||
LibTest/isolate/Isolate/spawn_A01_t04: Crash, Pass # Issue 17440
|
||||
|
||||
[ $compiler == none && $runtime == vm && ($arch == simarm || $arch == simmips || $arch == simarm64) ]
|
||||
[ $compiler == none && $runtime == vm && ($arch == simarm || $arch == simarmv5te || $arch == simmips || $arch == simarm64) ]
|
||||
LibTest/core/Uri/Uri_A06_t03: Skip # Timeout
|
||||
LibTest/collection/ListMixin/ListMixin_class_A01_t01: Skip # Timeout
|
||||
LibTest/collection/ListBase/ListBase_class_A01_t01: Skip # Timeout
|
||||
|
|
|
@ -233,6 +233,10 @@ regexp/global_test: Skip # Timeout. Issue 21709 and 21708
|
|||
[ $mode == debug ]
|
||||
regexp/pcre_test: Pass, Slow # Timeout. Issue 22008
|
||||
|
||||
[ $runtime == vm && $arch == simarmv5te ]
|
||||
int_parse_radix_test/*: Pass, Slow
|
||||
big_integer_parsed_mul_div_vm_test: Pass, Slow
|
||||
|
||||
[ $compiler == dart2js && $cps_ir ]
|
||||
apply2_test: Crash # Instance of 'TypeOperator': unimplemented in CodeGenerator
|
||||
apply3_test: Crash # Instance of 'TypeOperator': unimplemented in CodeGenerator
|
||||
|
|
|
@ -118,6 +118,5 @@ large_class_declaration_test: SkipSlow # Times out. Issue 20352
|
|||
[ $compiler == none && $runtime == ContentShellOnAndroid ]
|
||||
gc_test: SkipSlow # Times out flakily. Issue 20956
|
||||
|
||||
[ $compiler == none && $runtime == vm && ( $arch == simarm || $arch == arm || $arch == armv5te || $arch == simarm64 || $arch == arm64 || $arch == simmips || $arch == mips) ]
|
||||
[ $compiler == none && $runtime == vm && ( $arch == simarm || $arch == arm || $arch == simarmv5te || $arch == armv5te || $arch == simarm64 || $arch == arm64 || $arch == simmips || $arch == mips) ]
|
||||
vm/load_to_load_unaligned_forwarding_vm_test: Pass, Crash # Unaligned offset. Issue 22151
|
||||
|
||||
|
|
|
@ -315,10 +315,13 @@ mirrors/*deferred*: Skip # Issue 17458
|
|||
[ $compiler == dart2js && $mode == debug ]
|
||||
mirrors/native_class_test: Pass, Slow
|
||||
|
||||
[ $arch == simarm ]
|
||||
[ $arch == simarm || $arch == simarmv5te ]
|
||||
convert/chunked_conversion_utf88_test: Skip # Pass, Slow Issue 12644.
|
||||
convert/utf85_test: Skip # Pass, Slow Issue 12644.
|
||||
|
||||
[ $arch == simarmv5te ]
|
||||
mirrors/mirrors_reader_test: Pass, Slow
|
||||
|
||||
[ $compiler == dart2js ]
|
||||
profiler/metrics_num_test: Skip # Because of a int / double type test.
|
||||
|
||||
|
@ -328,7 +331,7 @@ convert/utf85_test: Skip # Pass, Slow Issue 20111.
|
|||
[ $mode == debug && $arch == ia32 && $system == windows ]
|
||||
convert/streamed_conversion_json_utf8_decode_test: Skip # Verification OOM.
|
||||
|
||||
[ $mode == debug && $arch != ia32 && $arch != x64 && $arch != simarm ]
|
||||
[ $mode == debug && $arch != ia32 && $arch != x64 && $arch != simarm && $arch != simarmv5te ]
|
||||
convert/streamed_conversion_json_utf8_decode_test: Skip # Verification not yet implemented.
|
||||
|
||||
[ $runtime == vm && $mode == debug && $builder_tag == asan ]
|
||||
|
|
|
@ -111,7 +111,7 @@ oom_error_stacktrace_test: Pass # The test only fails at runtime.
|
|||
# Skip until we stabilize language tests.
|
||||
*: Skip
|
||||
|
||||
[ $arch == simarm || $arch == simmips]
|
||||
[ $arch == simarm || $arch == simarmv5te || $arch == simmips]
|
||||
out_of_memory_test: Skip # passes on Mac, crashes on Linux
|
||||
oom_error_stacktrace_test: Skip # Fails on Linux
|
||||
|
||||
|
@ -159,7 +159,7 @@ package/package_test: CompileTimeError
|
|||
[ $system == windows ]
|
||||
io/skipping_dart2js_compilations_test: Fail # Issue 19551.
|
||||
|
||||
[ $arch != ia32 && $arch != x64 && $arch != simarm && $mode == debug ]
|
||||
[ $arch != ia32 && $arch != x64 && $arch != simarm && $arch != simarmv5te && $mode == debug ]
|
||||
verified_mem_test: Skip # Not yet implemented.
|
||||
|
||||
[ $runtime == vm && $mode == debug && $builder_tag == asan ]
|
||||
|
|
|
@ -55,7 +55,8 @@ def BuildOptions():
|
|||
default=False, action="store_true")
|
||||
result.add_option("-a", "--arch",
|
||||
help='Target architectures (comma-separated).',
|
||||
metavar='[all,ia32,x64,simarm,arm,armv5te,simmips,mips,simarm64,arm64,]',
|
||||
metavar='[all,ia32,x64,simarm,arm,simarmv5te,armv5te,simmips,mips'
|
||||
',simarm64,arm64,]',
|
||||
default=utils.GuessArchitecture())
|
||||
result.add_option("--os",
|
||||
help='Target OSs (comma-separated).',
|
||||
|
@ -105,8 +106,8 @@ def ProcessOptions(options, args):
|
|||
print "Unknown mode %s" % mode
|
||||
return False
|
||||
for arch in options.arch:
|
||||
archs = ['ia32', 'x64', 'simarm', 'arm', 'armv5te', 'simmips', 'mips',
|
||||
'simarm64', 'arm64',]
|
||||
archs = ['ia32', 'x64', 'simarm', 'arm', 'simarmv5te', 'armv5te', 'simmips',
|
||||
'mips', 'simarm64', 'arm64',]
|
||||
if not arch in archs:
|
||||
print "Unknown arch %s" % arch
|
||||
return False
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
['"<(target_arch)"=="armv5te"', { 'dart_target_arch': 'ARMV5TE', }],
|
||||
['"<(target_arch)"=="arm64"', { 'dart_target_arch': 'ARM64', }],
|
||||
['"<(target_arch)"=="simarm"', { 'dart_target_arch': 'SIMARM', }],
|
||||
['"<(target_arch)"=="simarmv5te"', { 'dart_target_arch': 'SIMARMV5TE', }],
|
||||
['"<(target_arch)"=="simarm64"', { 'dart_target_arch': 'SIMARM64', }],
|
||||
['"<(target_arch)"=="mips"', { 'dart_target_arch': 'MIPS', }],
|
||||
['"<(target_arch)"=="simmips"', { 'dart_target_arch': 'SIMMIPS', }],
|
||||
|
@ -62,6 +63,14 @@
|
|||
]
|
||||
},
|
||||
|
||||
'Dart_simarmv5te_Base': {
|
||||
'abstract': 1,
|
||||
'defines': [
|
||||
'TARGET_ARCH_ARM',
|
||||
'TARGET_ARCH_ARM_5TE',
|
||||
]
|
||||
},
|
||||
|
||||
'Dart_arm_Base': {
|
||||
'abstract': 1,
|
||||
'defines': [
|
||||
|
@ -73,6 +82,7 @@
|
|||
'abstract': 1,
|
||||
'defines': [
|
||||
'TARGET_ARCH_ARM',
|
||||
'TARGET_ARCH_ARM_5TE',
|
||||
],
|
||||
},
|
||||
|
||||
|
@ -174,6 +184,27 @@
|
|||
],
|
||||
},
|
||||
|
||||
'DebugSIMARMV5TE': {
|
||||
'inherit_from': [
|
||||
'Dart_Base', 'Dart_simarmv5te_Base', 'Dart_Debug',
|
||||
'Dart_<(dart_target_os)_Base',
|
||||
'Dart_<(dart_target_os)_simarmv5te_Base',
|
||||
'Dart_<(dart_target_os)_Debug',
|
||||
],
|
||||
'defines': [
|
||||
'DEBUG',
|
||||
],
|
||||
},
|
||||
|
||||
'ReleaseSIMARMV5TE': {
|
||||
'inherit_from': [
|
||||
'Dart_Base', 'Dart_simarmv5te_Base', 'Dart_Release',
|
||||
'Dart_<(dart_target_os)_Base',
|
||||
'Dart_<(dart_target_os)_simarmv5te_Base',
|
||||
'Dart_<(dart_target_os)_Release',
|
||||
],
|
||||
},
|
||||
|
||||
'DebugSIMARM64': {
|
||||
'inherit_from': [
|
||||
'Dart_Base', 'Dart_simarm64_Base', 'Dart_Debug',
|
||||
|
|
|
@ -46,6 +46,12 @@
|
|||
'ldflags': [ '-m32', ],
|
||||
},
|
||||
|
||||
'Dart_Linux_simarmv5te_Base': {
|
||||
'abstract': 1,
|
||||
'cflags': [ '-O3', '-m32', '-msse2' ],
|
||||
'ldflags': [ '-m32', ],
|
||||
},
|
||||
|
||||
'Dart_Linux_simarm64_Base': {
|
||||
'abstract': 1,
|
||||
'cflags': [ '-O3', '-m64', '-msse2' ],
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
'Dart_Win_simarm_Base': {
|
||||
'abstract': 1,
|
||||
},
|
||||
'Dart_Win_simarmv5te_Base': {
|
||||
'abstract': 1,
|
||||
},
|
||||
'Dart_Win_simarm64_Base': {
|
||||
'abstract': 1,
|
||||
},
|
||||
|
|
|
@ -77,6 +77,9 @@
|
|||
'Dart_Macos_simarm_Base': {
|
||||
'abstract': 1,
|
||||
},
|
||||
'Dart_Macos_simarmv5te_Base': {
|
||||
'abstract': 1,
|
||||
},
|
||||
'Dart_Macos_simarm64_Base': {
|
||||
'abstract': 1,
|
||||
},
|
||||
|
|
|
@ -169,6 +169,7 @@ class DartVmRuntimeConfiguration extends RuntimeConfiguration {
|
|||
switch (arch) {
|
||||
case 'simarm':
|
||||
case 'arm':
|
||||
case' simarmv5te':
|
||||
case 'armv5te':
|
||||
case 'simmips':
|
||||
case 'mips':
|
||||
|
|
|
@ -110,7 +110,7 @@ class TestOptionsParser {
|
|||
'The architecture to run tests for',
|
||||
['-a', '--arch'],
|
||||
['all', 'ia32', 'x64', 'arm', 'armv5te', 'arm64', 'mips',
|
||||
'simarm', 'simarm64', 'simmips'],
|
||||
'simarm', 'simarmv5te', 'simarm64', 'simmips'],
|
||||
'ia32'),
|
||||
new _TestOptionSpecification(
|
||||
'system',
|
||||
|
|
|
@ -226,6 +226,7 @@ ARCH_FAMILY = {
|
|||
'arm64': 'arm',
|
||||
'mips': 'mips',
|
||||
'simarm': 'ia32',
|
||||
'simarmv5te': 'ia32',
|
||||
'simmips': 'ia32',
|
||||
'simarm64': 'ia32',
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue