util: Pull most code out of m5.c.

By pulling the code out, this code can be tested by unit tests.

Change-Id: I2d0510995d3e97d721f1de3024120f0c90b7a5ba
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27547
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
Gabe Black
2020-04-04 00:05:48 -07:00
parent 25b5f5dfa1
commit f5b5090be1
16 changed files with 583 additions and 361 deletions

View File

@@ -28,9 +28,13 @@ import os
Import('*')
# Raw source files.
m5_mmap = 'm5_mmap.c'
args = 'args.c'
call_type = 'call_type.c'
commands = 'commands.c'
m5 = 'm5.c'
m5_mmap = 'm5_mmap.c'
usage = 'usage.c'
jni = 'jni_gem5Op.c'
lua = 'lua_gem5Op.c'
@@ -65,7 +69,7 @@ libm5 = static_env.StaticLibrary('out/m5', [ m5_mmap ] + m5ops)
#
ct_support = list([ File('%s_call_type.c' % ct.name) for ct in call_types ])
m5_bin = static_env.Program('out/m5',
ct_support + [ args, m5, m5_mmap, libm5 ])
ct_support + [ args, call_type, commands, m5, m5_mmap, libm5, usage ])
# The shared version of the m5 op call sights, used by mutliple targets below.