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

Side by Side Diff: pydir/szbuild.py

Issue 695993004: Subzero: Switch to AT&T asm syntax. I give up. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add opcode suffix to xchg. Use .L$ prefix for constant pool entries. Created 6 years, 1 month 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
« no previous file with comments | « pydir/crosstest.py ('k') | src/IceCfg.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python2 1 #!/usr/bin/env python2
2 2
3 import argparse 3 import argparse
4 import os 4 import os
5 import pipes 5 import pipes
6 import re 6 import re
7 import sys 7 import sys
8 8
9 from utils import shellcmd 9 from utils import shellcmd
10 from utils import FindBaseNaCl 10 from utils import FindBaseNaCl
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 '-O' + opt_level, 195 '-O' + opt_level,
196 '-bitcode-format=pnacl', 196 '-bitcode-format=pnacl',
197 '-externalize', 197 '-externalize',
198 '-ffunction-sections', 198 '-ffunction-sections',
199 '-fdata-sections', 199 '-fdata-sections',
200 '-o', asm_sz] + 200 '-o', asm_sz] +
201 args.sz_args + 201 args.sz_args +
202 [pexe], 202 [pexe],
203 echo=args.verbose) 203 echo=args.verbose)
204 shellcmd(( 204 shellcmd((
205 'llvm-mc -arch=x86 -x86-asm-syntax=intel -filetype=obj -o {obj} ' + 205 'llvm-mc -arch=x86 -filetype=obj -o {obj} {asm}'
206 '{asm}'
207 ).format(asm=asm_sz, obj=obj_sz), echo=args.verbose) 206 ).format(asm=asm_sz, obj=obj_sz), echo=args.verbose)
208 shellcmd(( 207 shellcmd((
209 'objcopy --redefine-sym _start=_user_start {obj}' 208 'objcopy --redefine-sym _start=_user_start {obj}'
210 ).format(obj=obj_sz), echo=args.verbose) 209 ).format(obj=obj_sz), echo=args.verbose)
211 shellcmd(( 210 shellcmd((
212 'nm {obj} | sed -n "s/.* [a-zA-Z] //p" > {sym}' 211 'nm {obj} | sed -n "s/.* [a-zA-Z] //p" > {sym}'
213 ).format(obj=obj_sz, sym=sym_sz), echo=args.verbose) 212 ).format(obj=obj_sz, sym=sym_sz), echo=args.verbose)
214 213
215 with open(sym_sz_unescaped) as f: 214 with open(sym_sz_unescaped) as f:
216 sz_syms = f.read().splitlines() 215 sz_syms = f.read().splitlines()
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 # Put the extra verbose printing at the end. 269 # Put the extra verbose printing at the end.
271 if args.verbose: 270 if args.verbose:
272 print 'PATH={path}'.format(path=os.environ['PATH']) 271 print 'PATH={path}'.format(path=os.environ['PATH'])
273 print 'include={regex}'.format(regex=re_include_str) 272 print 'include={regex}'.format(regex=re_include_str)
274 print 'exclude={regex}'.format(regex=re_exclude_str) 273 print 'exclude={regex}'.format(regex=re_exclude_str)
275 print 'default_match={dm}'.format(dm=default_match) 274 print 'default_match={dm}'.format(dm=default_match)
276 print 'Number of Subzero syms = {num}'.format(num=len(sz_syms)) 275 print 'Number of Subzero syms = {num}'.format(num=len(sz_syms))
277 276
278 if __name__ == '__main__': 277 if __name__ == '__main__':
279 main() 278 main()
OLDNEW
« no previous file with comments | « pydir/crosstest.py ('k') | src/IceCfg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698