Chromium Code Reviews| Index: components/cronet/tools/enforce_no_neon.py |
| diff --git a/components/cronet/tools/enforce_no_neon.py b/components/cronet/tools/enforce_no_neon.py |
| new file mode 100755 |
| index 0000000000000000000000000000000000000000..f0add628a431f7d25dfd4976e4abc3e2b56504d5 |
| --- /dev/null |
| +++ b/components/cronet/tools/enforce_no_neon.py |
| @@ -0,0 +1,22 @@ |
| +#!/usr/bin/python |
| +# Copyright 2016 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +""" |
| +enforce_no_neon.py - Enforce modules do not contain ARM Neon instructions. |
|
mef
2016/06/28 16:46:24
nit: I don't think this script really enforces no
pauljensen
2016/06/29 12:47:42
Done.
|
| +""" |
| + |
| +import os |
| +import sys |
| + |
| +def main(): |
| + if len(sys.argv) != 3: |
| + print 'Usage: ' + os.path.basename(sys.argv[0]) + \ |
| + ' path/to/ARM/objdump files/to/check/*.o' |
| + return 1 |
| + return os.system(sys.argv[1] + ' -d --no-show-raw-insn ' + |
| + sys.argv[2] + ' | grep -q "vld[1-9]\\|vst[1-9]"') |
| + |
| +if __name__ == '__main__': |
| + sys.exit(0 if main() != 0 else -1) |