isa_parser.py (12563:8d59ed22ae79) | isa_parser.py (12597:a2848203dcd0) |
---|---|
1# Copyright (c) 2014, 2016 ARM Limited 2# All rights reserved 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 1551 unchanged lines hidden (view full) --- 1560 fn = 'decoder-ns.hh.inc' 1561 assert(fn in self.files) 1562 f.write('namespace %s {\n#include "%s"\n}\n' 1563 % (self.namespace, fn)) 1564 1565 # decoder method - cannot be split 1566 file = 'decoder.cc' 1567 with self.open(file) as f: | 1# Copyright (c) 2014, 2016 ARM Limited 2# All rights reserved 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 1551 unchanged lines hidden (view full) --- 1560 fn = 'decoder-ns.hh.inc' 1561 assert(fn in self.files) 1562 f.write('namespace %s {\n#include "%s"\n}\n' 1563 % (self.namespace, fn)) 1564 1565 # decoder method - cannot be split 1566 file = 'decoder.cc' 1567 with self.open(file) as f: |
1568 fn = 'base/compiler.hh' 1569 f.write('#include "%s"\n' % fn) 1570 |
|
1568 fn = 'decoder-g.cc.inc' 1569 assert(fn in self.files) 1570 f.write('#include "%s"\n' % fn) 1571 1572 fn = 'decoder.hh' 1573 f.write('#include "%s"\n' % fn) 1574 1575 fn = 'decode-method.cc.inc' --- 625 unchanged lines hidden (view full) --- 2201 # Nested decode block: if the value of the current field matches 2202 # the specified constant(s), do a nested decode on some other field. 2203 def p_decode_stmt_decode(self, t): 2204 'decode_stmt : case_list COLON decode_block' 2205 case_list = t[1] 2206 codeObj = t[3] 2207 # just wrap the decoding code from the block as a case in the 2208 # outer switch statement. | 1571 fn = 'decoder-g.cc.inc' 1572 assert(fn in self.files) 1573 f.write('#include "%s"\n' % fn) 1574 1575 fn = 'decoder.hh' 1576 f.write('#include "%s"\n' % fn) 1577 1578 fn = 'decode-method.cc.inc' --- 625 unchanged lines hidden (view full) --- 2204 # Nested decode block: if the value of the current field matches 2205 # the specified constant(s), do a nested decode on some other field. 2206 def p_decode_stmt_decode(self, t): 2207 'decode_stmt : case_list COLON decode_block' 2208 case_list = t[1] 2209 codeObj = t[3] 2210 # just wrap the decoding code from the block as a case in the 2211 # outer switch statement. |
2209 codeObj.wrap_decode_block('\n%s\n' % ''.join(case_list)) | 2212 codeObj.wrap_decode_block('\n%s\n' % ''.join(case_list), 2213 'M5_UNREACHABLE;\n') |
2210 codeObj.has_decode_default = (case_list == ['default:']) 2211 t[0] = codeObj 2212 2213 # Instruction definition (finally!). 2214 def p_decode_stmt_inst(self, t): 2215 'decode_stmt : case_list COLON inst SEMI' 2216 case_list = t[1] 2217 codeObj = t[3] --- 398 unchanged lines hidden --- | 2214 codeObj.has_decode_default = (case_list == ['default:']) 2215 t[0] = codeObj 2216 2217 # Instruction definition (finally!). 2218 def p_decode_stmt_inst(self, t): 2219 'decode_stmt : case_list COLON inst SEMI' 2220 case_list = t[1] 2221 codeObj = t[3] --- 398 unchanged lines hidden --- |