| OLD | NEW |
| 1 # -*- python -*- | 1 # -*- python -*- |
| 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 Import('env') | 6 Import('env') |
| 7 | 7 |
| 8 # So far, all tests involve native assembler | 8 # So far, all tests involve native assembler |
| 9 | 9 |
| 10 HALT_SLED_SIZE=32 | 10 HALT_SLED_SIZE=32 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 raise Exception('unknown architecture') | 37 raise Exception('unknown architecture') |
| 38 | 38 |
| 39 def NewAsmEnv(env, defines, rodata_address, rwdata_address): | 39 def NewAsmEnv(env, defines, rodata_address, rwdata_address): |
| 40 | 40 |
| 41 asm_env = env.Clone() | 41 asm_env = env.Clone() |
| 42 # NOTE(robertm): convert this to pure C code so that most of this | 42 # NOTE(robertm): convert this to pure C code so that most of this |
| 43 # special handling can be eliminated | 43 # special handling can be eliminated |
| 44 if asm_env.Bit('bitcode'): | 44 if asm_env.Bit('bitcode'): |
| 45 asm_env.PNaClForceNative() | 45 asm_env.PNaClForceNative() |
| 46 # NOTE: "PNACL_AS" controls small code adaptions needed for the | 46 # NOTE: "PNACL_AS" controls small code adaptions needed for the |
| 47 # pnacl assembler | 47 # pnacl assembler but we do not use the pnacl assembler for ARM yet |
| 48 asm_env.Append(ASFLAGS='-DPNACL_AS=1') | 48 # BUG: http://code.google.com/p/nativeclient/issues/detail?id=1968 |
| 49 if not env.Bit('target_arm'): |
| 50 asm_env.Append(ASFLAGS='-DPNACL_AS=1') |
| 49 # Windows uses CC for assembling | 51 # Windows uses CC for assembling |
| 50 asm_env.Append(CFLAGS='-DPNACL_AS=1') | 52 asm_env.Append(CFLAGS='-DPNACL_AS=1') |
| 51 link_cmd = ('${LD} -e _start ${TEXT_START} ${RO_START} ${RW_START}' + | 53 link_cmd = ('${LD} -e _start ${TEXT_START} ${RO_START} ${RW_START}' + |
| 52 ' -o ${TARGET} ${SOURCES}') | 54 ' -o ${TARGET} ${SOURCES}') |
| 53 | 55 |
| 54 if env.Bit('target_x86_32'): | 56 if env.Bit('target_x86_32'): |
| 55 link_cmd += ' -melf_nacl' | 57 link_cmd += ' -melf_nacl' |
| 56 elif env.Bit('target_x86_64'): | 58 elif env.Bit('target_x86_64'): |
| 57 link_cmd += ' -melf64_nacl' | 59 link_cmd += ' -melf64_nacl' |
| 58 elif env.Bit('target_arm'): | 60 elif env.Bit('target_arm'): |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 base_name = 'nacl_text_' + variant + '_pad' + name_modifier + '_test' | 162 base_name = 'nacl_text_' + variant + '_pad' + name_modifier + '_test' |
| 161 obj = asm_env.ComponentObject(base_name + '.o', nacl_text_pad_asm) | 163 obj = asm_env.ComponentObject(base_name + '.o', nacl_text_pad_asm) |
| 162 | 164 |
| 163 nexe = asm_env.ComponentProgram(base_name, [obj]) | 165 nexe = asm_env.ComponentProgram(base_name, [obj]) |
| 164 | 166 |
| 165 node = env.CommandSelLdrTestNacl(base_name + '.out', | 167 node = env.CommandSelLdrTestNacl(base_name + '.out', |
| 166 nexe) | 168 nexe) |
| 167 env.AddNodeToTestSuite(node, | 169 env.AddNodeToTestSuite(node, |
| 168 ['small_tests', 'sel_ldr_sled_tests'], | 170 ['small_tests', 'sel_ldr_sled_tests'], |
| 169 'run_' + base_name) | 171 'run_' + base_name) |
| OLD | NEW |