Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/usr/bin/python | |
| 2 # Copyright 2016 The Chromium Authors. All rights reserved. | |
| 3 # Use of this source code is governed by a BSD-style license that can be | |
| 4 # found in the LICENSE file. | |
| 5 | |
| 6 """ | |
| 7 enforce_no_neon.py - Enforce modules do not contain ARM Neon instructions. | |
|
mef
2016/06/29 15:48:06
nit: enforce -> check.
pauljensen
2016/07/19 10:26:44
Done.
| |
| 8 """ | |
| 9 | |
| 10 import os | |
| 11 import sys | |
| 12 | |
| 13 def main(): | |
| 14 if len(sys.argv) != 3: | |
| 15 print 'Usage: ' + os.path.basename(sys.argv[0]) + \ | |
| 16 ' path/to/ARM/objdump files/to/check/*.o' | |
| 17 return 1 | |
| 18 return os.system(sys.argv[1] + ' -d --no-show-raw-insn ' + | |
| 19 sys.argv[2] + ' | grep -q "vld[1-9]\\|vst[1-9]"') | |
| 20 | |
| 21 if __name__ == '__main__': | |
| 22 sys.exit(0 if main() != 0 else -1) | |
| OLD | NEW |