OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # | 2 # |
3 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 3 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 # | 6 # |
7 | 7 |
8 import sys | 8 import sys |
9 import os | 9 import os |
10 import textwrap | 10 import textwrap |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 ' caller will not return to the next instruction (start of next ' | 66 ' caller will not return to the next instruction (start of next ' |
67 'bundle)', | 67 'bundle)', |
68 0, 0], | 68 0, 0], |
69 'kProblemUnalignedJumpToTrampoline':['The destination of this ' | 69 'kProblemUnalignedJumpToTrampoline':['The destination of this ' |
70 'jump/branch instruction is in trampoline code section but ' | 70 'jump/branch instruction is in trampoline code section but ' |
71 'address is not bundle aligned', | 71 'address is not bundle aligned', |
72 0, 0], | 72 0, 0], |
73 'kProblemDataRegInDelaySlot':['This instruction changes value of a ' | 73 'kProblemDataRegInDelaySlot':['This instruction changes value of a ' |
74 'stack pointer but is located in the delay slot of jump/branch', | 74 'stack pointer but is located in the delay slot of jump/branch', |
75 1, 0], | 75 1, 0], |
| 76 'kProblemBranchInDelaySlot':['This instruction is a jump/branch ' |
| 77 'instruction and it is located in a delay slot of the previous ' |
| 78 'jump/branch instruction', |
| 79 1, 0], |
| 80 |
76 }[code] | 81 }[code] |
77 | 82 |
78 | 83 |
79 def _safety_msg(val): | 84 def _safety_msg(val): |
80 return { | 85 return { |
81 0: 'UNKNOWN', # Should not appear | 86 0: 'UNKNOWN', # Should not appear |
82 1: 'is undefined', | 87 1: 'is undefined', |
83 2: 'has unpredictable effects', | 88 2: 'has unpredictable effects', |
84 3: 'is deprecated', | 89 3: 'is deprecated', |
85 4: 'is forbidden', | 90 4: 'is forbidden', |
(...skipping 29 matching lines...) Expand all Loading... |
115 return 1 | 120 return 1 |
116 for line in sys.stdin: | 121 for line in sys.stdin: |
117 if line.startswith('ncval: '): | 122 if line.startswith('ncval: '): |
118 line = line[7:].strip() | 123 line = line[7:].strip() |
119 _explain_problem(sys.argv[1], *_parse_report(line)) | 124 _explain_problem(sys.argv[1], *_parse_report(line)) |
120 return 0 | 125 return 0 |
121 | 126 |
122 | 127 |
123 if __name__ == '__main__': | 128 if __name__ == '__main__': |
124 sys.exit(main(sys.argv)) | 129 sys.exit(main(sys.argv)) |
OLD | NEW |