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

Side by Side Diff: src/trusted/service_runtime/nacl.scons

Issue 10919162: [MIPS] Implementation of sel_ldr for MIPS architecture. (Closed) Base URL: http://src.chromium.org/native_client/trunk/src/native_client/
Patch Set: Rebase (Saturday morning). Created 8 years, 3 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
OLDNEW
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 # All tests below involve native assembler 8 # All tests below involve native assembler
9 9
10 HALT_SLED_SIZE=32 10 HALT_SLED_SIZE=32
(...skipping 15 matching lines...) Expand all
26 # ---------------------------------------------------------- 26 # ----------------------------------------------------------
27 # Tests that require a NaCl module 27 # Tests that require a NaCl module
28 # ---------------------------------------------------------- 28 # ----------------------------------------------------------
29 29
30 if env.Bit('target_x86_32'): 30 if env.Bit('target_x86_32'):
31 nacl_text_pad_asm = 'arch/x86_32/nacl_text_pad_test.S' 31 nacl_text_pad_asm = 'arch/x86_32/nacl_text_pad_test.S'
32 elif env.Bit('target_x86_64'): 32 elif env.Bit('target_x86_64'):
33 nacl_text_pad_asm = 'arch/x86_64/nacl_text_pad_test.S' 33 nacl_text_pad_asm = 'arch/x86_64/nacl_text_pad_test.S'
34 elif env.Bit('target_arm'): 34 elif env.Bit('target_arm'):
35 nacl_text_pad_asm = 'arch/arm/nacl_text_pad_test.S' 35 nacl_text_pad_asm = 'arch/arm/nacl_text_pad_test.S'
36 elif env.Bit('target_mips32'):
37 nacl_text_pad_asm = 'arch/mips/nacl_text_pad_test.S'
36 else: 38 else:
37 raise Exception('unknown architecture') 39 raise Exception('unknown architecture')
38 40
39 def NewAsmEnv(env, defines, rodata_address, rwdata_address): 41 def NewAsmEnv(env, defines, rodata_address, rwdata_address):
40 42
41 asm_env = env.Clone() 43 asm_env = env.Clone()
42 # NOTE(robertm): convert this to pure C code so that most of this 44 # NOTE(robertm): convert this to pure C code so that most of this
43 # special handling can be eliminated 45 # special handling can be eliminated
44 if asm_env.Bit('bitcode'): 46 if asm_env.Bit('bitcode'):
45 asm_env.PNaClForceNative() 47 asm_env.PNaClForceNative()
46 asm_env.Append(ASPPFLAGS=['-DPNACL_AS=1']) 48 asm_env.Append(ASPPFLAGS=['-DPNACL_AS=1'])
47 # On Windows, assembly pre-preprocessing uses $CCCOM instead of $ASPPCOM, 49 # On Windows, assembly pre-preprocessing uses $CCCOM instead of $ASPPCOM,
48 # so we need to set PNACL_AS=1 in CCFLAGS as well. 50 # so we need to set PNACL_AS=1 in CCFLAGS as well.
49 asm_env.Append(CCFLAGS=['-DPNACL_AS=1']) 51 asm_env.Append(CCFLAGS=['-DPNACL_AS=1'])
50 52
51 link_cmd = ('${LD} -static -e _start ${TEXT_START} ${RO_START} ${RW_START}' + 53 link_cmd = ('${LD} -static -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'):
59 link_cmd += ' -marmelf_nacl' 61 link_cmd += ' -marmelf_nacl'
62 elif env.Bit('target_mips32'):
63 link_cmd += ' -mmipselelf_nacl'
60 else: 64 else:
61 raise Exception('unknown architecture') 65 raise Exception('unknown architecture')
62 66
63 asm_env['LINKCOM'] = link_cmd 67 asm_env['LINKCOM'] = link_cmd
64 68
65 asm_env.Append(CPPDEFINES = [ 69 asm_env.Append(CPPDEFINES = [
66 ['NACL_BUILD_ARCH', '${BUILD_ARCHITECTURE}' ], 70 ['NACL_BUILD_ARCH', '${BUILD_ARCHITECTURE}' ],
67 ['NACL_BUILD_SUBARCH', '${BUILD_SUBARCH}' ], 71 ['NACL_BUILD_SUBARCH', '${BUILD_SUBARCH}' ],
68 ['NACL_TARGET_ARCH', '${TARGET_ARCHITECTURE}' ], 72 ['NACL_TARGET_ARCH', '${TARGET_ARCHITECTURE}' ],
69 ['NACL_TARGET_SUBARCH', '${TARGET_SUBARCH}' ], 73 ['NACL_TARGET_SUBARCH', '${TARGET_SUBARCH}' ],
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 obj = asm_env.ComponentObject(base_name + '.o', nacl_text_pad_asm) 163 obj = asm_env.ComponentObject(base_name + '.o', nacl_text_pad_asm)
160 164
161 nexe = asm_env.ComponentProgram(base_name, [obj]) 165 nexe = asm_env.ComponentProgram(base_name, [obj])
162 166
163 node = env.CommandSelLdrTestNacl(base_name + '.out', 167 node = env.CommandSelLdrTestNacl(base_name + '.out',
164 nexe) 168 nexe)
165 env.AddNodeToTestSuite(node, 169 env.AddNodeToTestSuite(node,
166 ['small_tests', 'sel_ldr_sled_tests', 170 ['small_tests', 'sel_ldr_sled_tests',
167 'nonpexe_tests'], 171 'nonpexe_tests'],
168 'run_' + base_name) 172 'run_' + base_name)
OLDNEW
« no previous file with comments | « src/trusted/service_runtime/linux/nacl_signal_mips.c ('k') | src/trusted/service_runtime/nacl_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698