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

Side by Side Diff: pydir/crosstest.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 | « no previous file | pydir/szbuild.py » ('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 re 5 import re
6 import subprocess 6 import subprocess
7 import sys 7 import sys
8 import tempfile 8 import tempfile
9 9
10 from utils import shellcmd 10 from utils import shellcmd
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 '-O' + args.optlevel, 103 '-O' + args.optlevel,
104 '-mattr=' + args.attr, 104 '-mattr=' + args.attr,
105 '--target=' + args.target, 105 '--target=' + args.target,
106 '--prefix=' + args.prefix, 106 '--prefix=' + args.prefix,
107 '-allow-uninitialized-globals', 107 '-allow-uninitialized-globals',
108 '-build-on-read=0', 108 '-build-on-read=0',
109 '-o=' + asm_sz, 109 '-o=' + asm_sz,
110 bitcode]) 110 bitcode])
111 shellcmd(['llvm-mc', 111 shellcmd(['llvm-mc',
112 '-arch=' + arch_map[args.target], 112 '-arch=' + arch_map[args.target],
113 '-x86-asm-syntax=intel',
114 '-filetype=obj', 113 '-filetype=obj',
115 '-o=' + obj_sz, 114 '-o=' + obj_sz,
116 asm_sz]) 115 asm_sz])
117 objs.append(obj_sz) 116 objs.append(obj_sz)
118 # Each original bitcode file needs to be translated by the 117 # Each original bitcode file needs to be translated by the
119 # LLVM toolchain and have its object file linked in. There 118 # LLVM toolchain and have its object file linked in. There
120 # are two ways to do this: explicitly use llc, or include the 119 # are two ways to do this: explicitly use llc, or include the
121 # .ll file in the link command. It turns out that these two 120 # .ll file in the link command. It turns out that these two
122 # approaches can produce different semantics on some undefined 121 # approaches can produce different semantics on some undefined
123 # bitcode behavior. Specifically, LLVM produces different 122 # bitcode behavior. Specifically, LLVM produces different
(...skipping 21 matching lines...) Expand all
145 objs.append(( 144 objs.append((
146 '{root}/toolchain_build/src/subzero/runtime/szrt.{ext}' 145 '{root}/toolchain_build/src/subzero/runtime/szrt.{ext}'
147 ).format(root=nacl_root, ext='c' if pure_c else 'cpp')) 146 ).format(root=nacl_root, ext='c' if pure_c else 'cpp'))
148 objs.append(( 147 objs.append((
149 '{root}/toolchain_build/src/subzero/runtime/szrt_i686.ll' 148 '{root}/toolchain_build/src/subzero/runtime/szrt_i686.ll'
150 ).format(root=nacl_root)) 149 ).format(root=nacl_root))
151 linker = 'clang' if pure_c else 'clang++' 150 linker = 'clang' if pure_c else 'clang++'
152 shellcmd([linker, '-g', '-m32', args.driver] + 151 shellcmd([linker, '-g', '-m32', args.driver] +
153 objs + 152 objs +
154 ['-lm', '-lpthread', '-o', os.path.join(args.dir, args.output)]) 153 ['-lm', '-lpthread', '-o', os.path.join(args.dir, args.output)])
OLDNEW
« no previous file with comments | « no previous file | pydir/szbuild.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698