2 # Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
8 # Test ARM float ABI to ensure that it is the hard ABI and not soft.
10 # Only test ARM. Since we are only generating a .o file, do not run
11 # in pexe mode, only run as a nonpexe_test.
12 if (not env.Bit('build_arm') or env.Bit('pnacl_generate_pexe')):
15 # Force native .o generation and optimization (so that checks are cleaner).
16 if env.Bit('bitcode'):
17 env.PNaClForceNative()
18 env.Append(CFLAGS=['-O2'])
20 arm_float_abi_obj = env.ComponentObject('arm_float_abi_obj',
21 'arm_float_abi_test.c')
24 # Disassemble the .o file and look for register passing.
25 node = env.CommandTestFileDumpCheck('arm_float_abi_test.out',
27 env.File('arm_float_abi_test.c'),
29 # Hard-float ABI is used on TOOLCHAIN_FEATURE_VERSION >= 9 for Non-SFI target.
30 is_arm_float_abi_test_broken = (env.Bit('nonsfi_nacl')
31 and env['TOOLCHAIN_FEATURE_VERSION'] < 9)
32 env.AddNodeToTestSuite(node,
33 ['small_tests', 'nonpexe_tests', 'toolchain_tests'],
34 'run_arm_float_abi_test',
35 is_broken=is_arm_float_abi_test_broken)