[gem5-dev] Change in gem5/gem5[develop]: arch-riscv: Fix illegal instruction error message

2021-08-02 Thread Hoa Nguyen (Gerrit) via gem5-dev
Hoa Nguyen has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/48923 )


Change subject: arch-riscv: Fix illegal instruction error message
..

arch-riscv: Fix illegal instruction error message

Previously, the reason for the fault was not printed to the output.

Change-Id: I931b0de96fbb241f24ba69ad7e84d5d1c9db9e60
Signed-off-by: Hoa Nguyen 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48923
Reviewed-by: Jason Lowe-Power 
Reviewed-by: Ayaz Akram 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M src/arch/riscv/faults.hh
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Jason Lowe-Power: Looks good to me, but someone else must approve; Looks  
good to me, approved

  Ayaz Akram: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/arch/riscv/faults.hh b/src/arch/riscv/faults.hh
index 38c5638..a8df3f5 100644
--- a/src/arch/riscv/faults.hh
+++ b/src/arch/riscv/faults.hh
@@ -166,7 +166,8 @@

   public:
 IllegalInstFault(std::string r, const ExtMachInst inst)
-: InstFault("Illegal instruction", inst)
+: InstFault("Illegal instruction", inst),
+  reason(r)
 {}

 void invokeSE(ThreadContext *tc, const StaticInstPtr ) override;

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48923
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I931b0de96fbb241f24ba69ad7e84d5d1c9db9e60
Gerrit-Change-Number: 48923
Gerrit-PatchSet: 3
Gerrit-Owner: Hoa Nguyen 
Gerrit-Reviewer: Ayaz Akram 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Hoa Nguyen 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Re: Build failed in Jenkins: compiler-checks #145

2021-08-02 Thread Jason Lowe-Power via gem5-dev
Looks like GCN is failing with clang-11. Could someone take a look? Bobby
is on vacation this week.

Cheers,
Jason

On Mon, Aug 2, 2021 at 12:07 AM jenkins-no-reply--- via gem5-dev <
gem5-dev@gem5.org> wrote:

> See <
> https://jenkins.gem5.org/job/compiler-checks/145/display/redirect?page=changes
> >
>
> Changes:
>
> [gabe.black] dev: Fix style in i8254xGBe_defs.hh.
>
> [gabe.black] dev: Fix style in pktfifo.hh.
>
> [gabe.black] dev: Fix style in i8254xGBE.cc.
>
>
> --
> Started by timer
> Running as SYSTEM
> Building in workspace 
> Selected Git installation does not exist. Using Default
> The recommended git tool is: NONE
> No credentials specified
>  > git rev-parse --resolve-git-dir <
> https://jenkins.gem5.org/job/compiler-checks/ws/.git> # timeout=10
> Fetching changes from the remote Git repository
>  > git config remote.origin.url https://gem5.googlesource.com/public/gem5
> # timeout=10
> Fetching upstream changes from https://gem5.googlesource.com/public/gem5
>  > git --version # timeout=10
>  > git --version # 'git version 2.25.1'
>  > git fetch --tags --force --progress --
> https://gem5.googlesource.com/public/gem5
> +refs/heads/*:refs/remotes/origin/* # timeout=10
>  > git rev-parse refs/remotes/origin/develop^{commit} # timeout=10
> Checking out Revision e24db5deddeed1a30c0a635b271b4d364a54c44d
> (refs/remotes/origin/develop)
>  > git config core.sparsecheckout # timeout=10
>  > git checkout -f e24db5deddeed1a30c0a635b271b4d364a54c44d # timeout=10
> Commit message: "dev: Fix style in i8254xGBE.cc."
>  > git rev-list --no-walk 2cde260198b395177040b48b81fe14615aeaae8c #
> timeout=10
> [compiler-checks] $ /bin/sh -xe /tmp/jenkins5372034535609594944.sh
> + ./tests/compiler-tests.sh -j 12
> Starting build tests with 'gcc-version-10'...
> 'gcc-version-10' was found in the comprehensive tests. All ISAs will be
> built.
>   * Building target 'ARM_MESI_Three_Level.opt' with 'gcc-version-10'...
> Done.
>   * Building target 'ARM_MESI_Three_Level.fast' with 'gcc-version-10'...
> Done.
>   * Building target 'SPARC.opt' with 'gcc-version-10'...
> Done.
>   * Building target 'SPARC.fast' with 'gcc-version-10'...
> Done.
>   * Building target 'NULL_MOESI_CMP_token.opt' with 'gcc-version-10'...
> Done.
>   * Building target 'NULL_MOESI_CMP_token.fast' with 'gcc-version-10'...
> Done.
>   * Building target 'ARM_MOESI_hammer.opt' with 'gcc-version-10'...
> Done.
>   * Building target 'ARM_MOESI_hammer.fast' with 'gcc-version-10'...
> Done.
>   * Building target 'POWER.opt' with 'gcc-version-10'...
> Done.
>   * Building target 'POWER.fast' with 'gcc-version-10'...
> Done.
>   * Building target 'ARM_MESI_Three_Level_HTM.opt' with 'gcc-version-10'...
> Done.
>   * Building target 'ARM_MESI_Three_Level_HTM.fast' with
> 'gcc-version-10'...
> Done.
>   * Building target 'NULL_MESI_Two_Level.opt' with 'gcc-version-10'...
> Done.
>   * Building target 'NULL_MESI_Two_Level.fast' with 'gcc-version-10'...
> Done.
>   * Building target 'X86.opt' with 'gcc-version-10'...
> Done.
>   * Building target 'X86.fast' with 'gcc-version-10'...
> Done.
>   * Building target 'NULL.opt' with 'gcc-version-10'...
> Done.
>   * Building target 'NULL.fast' with 'gcc-version-10'...
> Done.
>   * Building target 'Garnet_standalone.opt' with 'gcc-version-10'...
> Done.
>   * Building target 'Garnet_standalone.fast' with 'gcc-version-10'...
> Done.
>   * Building target 'RISCV.opt' with 'gcc-version-10'...
> Done.
>   * Building target 'RISCV.fast' with 'gcc-version-10'...
> Done.
>   * Building target 'NULL_MOESI_CMP_directory.opt' with 'gcc-version-10'...
> Done.
>   * Building target 'NULL_MOESI_CMP_directory.fast' with
> 'gcc-version-10'...
> Done.
>   * Building target 'X86_MESI_Two_Level.opt' with 'gcc-version-10'...
> Done.
>   * Building target 'X86_MESI_Two_Level.fast' with 'gcc-version-10'...
> Done.
>   * Building target 'X86_MOESI_AMD_Base.opt' with 'gcc-version-10'...
> Done.
>   * Building target 'X86_MOESI_AMD_Base.fast' with 'gcc-version-10'...
> Done.
>   * Building target 'NULL_MOESI_hammer.opt' with 'gcc-version-10'...
> Done.
>   * Building target 'NULL_MOESI_hammer.fast' with 'gcc-version-10'...
> Done.
>   * Building target 'GCN3_X86.opt' with 'gcc-version-10'...
> Done.
>   * Building target 'GCN3_X86.fast' with 'gcc-version-10'...
> Done.
>   * Building target 'ARM.opt' with 'gcc-version-10'...
> Done.
>   * Building target 'ARM.fast' with 'gcc-version-10'...
> Done.
>   * Building target 'MIPS.opt' with 'gcc-version-10'...
> Done.
>   * Building target 'MIPS.fast' with 'gcc-version-10'...
> Done.
> Starting build tests with 'gcc-version-9'...
>   * Building target 'SPARC.opt' with 'gcc-version-9'...
> Done.
>   * Building target 'SPARC.fast' with 'gcc-version-9'...
> Done.
> 

[gem5-dev] Change in gem5/gem5[develop]: tests: pyunit always exiting with 0

2021-08-02 Thread Giacomo Travaglini (Gerrit) via gem5-dev
Giacomo Travaglini has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/48969 )



Change subject: tests: pyunit always exiting with 0
..

tests: pyunit always exiting with 0

As unittest.TextTestRunner().run(suite) doesn't exit the script,
it won't set the exit code, even when some tests are failing.
This means testlib is always interpreting those unittests as passing
even when there are failures.

With this patch we are propagating the error to our CI system (testlib)

Change-Id: I63b7622661a19a9b40243d13b7391e510c2007d4
Signed-off-by: Giacomo Travaglini 
---
M tests/run_pyunit.py
1 file changed, 7 insertions(+), 2 deletions(-)



diff --git a/tests/run_pyunit.py b/tests/run_pyunit.py
index 00f5f9c..8bc4f17 100644
--- a/tests/run_pyunit.py
+++ b/tests/run_pyunit.py
@@ -35,8 +35,9 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+import sys
+
 if __name__ == "__main__":
-import sys
 print("ERROR: This file must be run from gem5.", file=sys.stderr)
 sys.exit(1)

@@ -47,5 +48,9 @@
 tests = loader.discover("pyunit", pattern='pyunit*.py')

 runner = unittest.runner.TextTestRunner(verbosity=2)
-runner.run(tests)
+result = runner.run(tests)
+if result.wasSuccessful():
+sys.exit(0)
+else:
+sys.exit(1)


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48969
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I63b7622661a19a9b40243d13b7391e510c2007d4
Gerrit-Change-Number: 48969
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: scons: Delete the unused do_embed_text function.

2021-08-02 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/48968 )



Change subject: scons: Delete the unused do_embed_text function.
..

scons: Delete the unused do_embed_text function.

Change-Id: I2ad37c9965e7a58e288711f0fa5bb1858f121c05
---
M src/mem/ruby/SConscript
1 file changed, 0 insertions(+), 30 deletions(-)



diff --git a/src/mem/ruby/SConscript b/src/mem/ruby/SConscript
index c3f8365..b3ea716 100644
--- a/src/mem/ruby/SConscript
+++ b/src/mem/ruby/SConscript
@@ -61,36 +61,6 @@
 'RubyDma', 'RubyPort', 'RubySequencer', 'RubyCacheTrace',
 'RubyPrefetcher'])

-def do_embed_text(target, source, env):
-"""convert a text file into a file that can be embedded in C
-using an #include statement, that defines a \"const char *\" pointing
-to the same text.
-
-This is useful to embed scripts and configuration files in object  
files.

-"""
-
-escape = [ "\'", "\"", "\\", "\?" ]
-
-# reads the text file in, line by line, converting it to a C string
-fin = open(str(source[0]), 'r')
-fout = open(str(target[0]), 'w' )
-fout.write("static const char *%s =\n" % source[1].get_contents());
-for l in fin:
-# add escape sequences for the characters in escape
-fout.write("\"")
-for char in l:
-if char == "\n":
-break
-if char in escape:
-fout.write("\\")
-fout.write(char)
-else:
-fout.write(char)
-fout.write("\\n\"\n");
-fout.write(";\n");
-fin.close()
-fout.close()
-
 #
 # Link includes
 #

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48968
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I2ad37c9965e7a58e288711f0fa5bb1858f121c05
Gerrit-Change-Number: 48968
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: scons: Simplify the CpuModel class into a function.

2021-08-02 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/48963 )



Change subject: scons: Simplify the CpuModel class into a function.
..

scons: Simplify the CpuModel class into a function.

The CpuModel class looks like it was originally intended to hold a lot
more information that it does now, which is just the name of a CPU, and
whether it should be enabled by default. All the built in configs in
build_opts already explicitly list a set of CPUs, and CPUs should not,
generally speaking, be enabled by default, since they almost always need
to be specifically supported by an ISA. This is mutual, since usually
ISAs definitions are not quite correct or complete, and this is often
exposed by plugging them into different, and/or more complex CPU models
which stress those short comings.

This change drops the idea of a "default" CPU, and since the only thing
being tracked at this point is a list of CPUs, it turns CpuModel() into
a simple function which adds a name to a set of supported CPUs.

Change-Id: Id7475d5dc8548802b5253f79839da8c76ef4d165
---
M src/cpu/SConsopts
M src/cpu/minor/SConsopts
M src/cpu/o3/SConsopts
M src/cpu/simple/SConsopts
4 files changed, 8 insertions(+), 25 deletions(-)



diff --git a/src/cpu/SConsopts b/src/cpu/SConsopts
index 6a182f1..2dec0d5 100644
--- a/src/cpu/SConsopts
+++ b/src/cpu/SConsopts
@@ -25,29 +25,12 @@

 Import('*')

-class CpuModel(object):
-'''The CpuModel class encapsulates everything the ISA parser needs to
-know about a particular CPU model.'''
-
-# Dict of available CPU model objects.  Accessible as CpuModel.dict.
-dict = {}
-
-# Constructor.  Automatically adds models to CpuModel.dict.
-def __init__(self, name, default=False):
-self.name = name   # name of model
-
-# This cpu is enabled by default
-self.default = default
-
-# Add self to dict
-if name in CpuModel.dict:
-raise AttributeError("CpuModel '%s' already registered" % name)
-CpuModel.dict[name] = self
+all_cpus = set()
+def CpuModel(name):
+all_cpus.add(name)

 Export('CpuModel')

 def add_cpu_models_var():
-sticky_vars.Add(ListVariable('CPU_MODELS', 'CPU models',
-sorted(n for n,m in CpuModel.dict.items() if m.default),
-sorted(CpuModel.dict.keys(
+sticky_vars.Add(ListVariable('CPU_MODELS', 'CPU models', [], all_cpus))
 AfterSConsopts(add_cpu_models_var)
diff --git a/src/cpu/minor/SConsopts b/src/cpu/minor/SConsopts
index 1038bfa..9169ee9 100644
--- a/src/cpu/minor/SConsopts
+++ b/src/cpu/minor/SConsopts
@@ -37,4 +37,4 @@

 Import('*')

-CpuModel('MinorCPU', default=True)
+CpuModel('MinorCPU')
diff --git a/src/cpu/o3/SConsopts b/src/cpu/o3/SConsopts
index 49ab3bb..0c0c56c 100644
--- a/src/cpu/o3/SConsopts
+++ b/src/cpu/o3/SConsopts
@@ -28,4 +28,4 @@

 Import('*')

-CpuModel('O3CPU', default=True)
+CpuModel('O3CPU')
diff --git a/src/cpu/simple/SConsopts b/src/cpu/simple/SConsopts
index 2f3b2ed..5ebdf30 100644
--- a/src/cpu/simple/SConsopts
+++ b/src/cpu/simple/SConsopts
@@ -28,5 +28,5 @@

 Import('*')

-CpuModel('AtomicSimpleCPU', default=True)
-CpuModel('TimingSimpleCPU', default=True)
+CpuModel('AtomicSimpleCPU')
+CpuModel('TimingSimpleCPU')

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48963
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Id7475d5dc8548802b5253f79839da8c76ef4d165
Gerrit-Change-Number: 48963
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: scons: Remove cruft from the_gpu_isa.hh.

2021-08-02 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/48966 )



Change subject: scons: Remove cruft from the_gpu_isa.hh.
..

scons: Remove cruft from the_gpu_isa.hh.

Some values in the_gpu_isa.hh were simply copy/pasted from the_isa.hh,
and were not used at all in the code. This change removes them, leaving
only the definition of the TheGpuISA namespace.

Change-Id: I0d66ae84d78e990088eb8099c678b9cf1cc42748
---
M src/SConscript
1 file changed, 0 insertions(+), 22 deletions(-)



diff --git a/src/SConscript b/src/SConscript
index 0dd9c69..c25e3ef 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -778,39 +778,17 @@
 MakeAction(makeTheISA, Transform("CFG ISA", 0)))

 def makeTheGPUISA(source, target, env):
-isas = sorted(set(env.Split('${ALL_ISAS}')))
 target_gpu_isa = env['TARGET_GPU_ISA']
-def define(isa):
-return str(isa.upper()) + '_ISA'

 def namespace(isa):
 return isa[0].upper() + isa[1:].lower() + 'ISA'

-
 code = code_formatter()
 code('''\
 #ifndef __CONFIG_THE_GPU_ISA_HH__
 #define __CONFIG_THE_GPU_ISA_HH__

-''')
-
-# create defines for the preprocessing and compile-time determination
-for i,isa in enumerate(isas):
-code('#define $0 $1', define(isa), i + 1)
-code()
-
-# create an enum for any run-time determination of the ISA, we
-# reuse the same name as the namespaces
-code('enum class GPUArch {')
-for isa in isas:
-code('  $0 = $1,', namespace(isa), define(isa))
-code('};')
-
-code('''
-
-#define THE_GPU_ISA ${{define(target_gpu_isa)}}
 #define TheGpuISA ${{namespace(target_gpu_isa)}}
-#define THE_GPU_ISA_STR "${{target_gpu_isa}}"

 #endif // __CONFIG_THE_GPU_ISA_HH__''')


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48966
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I0d66ae84d78e990088eb8099c678b9cf1cc42748
Gerrit-Change-Number: 48966
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: scons: Keep the list of all CPU models in a construction variable.

2021-08-02 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/48964 )



Change subject: scons: Keep the list of all CPU models in a construction  
variable.

..

scons: Keep the list of all CPU models in a construction variable.

This relaxes ordering around CPU model declaration.

Change-Id: Ie5f8da1903a883bd4d98800dfbef7fd913021f77
---
M src/cpu/SConsopts
1 file changed, 3 insertions(+), 3 deletions(-)



diff --git a/src/cpu/SConsopts b/src/cpu/SConsopts
index 2dec0d5..af35a20 100644
--- a/src/cpu/SConsopts
+++ b/src/cpu/SConsopts
@@ -25,12 +25,12 @@

 Import('*')

-all_cpus = set()
 def CpuModel(name):
-all_cpus.add(name)
+main.Append(ALL_CPU_MODELS=[name])

 Export('CpuModel')

 def add_cpu_models_var():
-sticky_vars.Add(ListVariable('CPU_MODELS', 'CPU models', [], all_cpus))
+sticky_vars.Add(ListVariable('CPU_MODELS', 'CPU models', [],
+set(main.get('ALL_CPU_MODELS', []
 AfterSConsopts(add_cpu_models_var)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48964
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ie5f8da1903a883bd4d98800dfbef7fd913021f77
Gerrit-Change-Number: 48964
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: scons: Further simplify the_gpu_isa.hh.

2021-08-02 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/48967 )



Change subject: scons: Further simplify the_gpu_isa.hh.
..

scons: Further simplify the_gpu_isa.hh.

Turn the "namespace" function into a simple variable. Also, since the
only thing defined in the file is a macro, we can drop the compiler
guards and use that macro as its own compiler guard.

Change-Id: I1e8559fc7add61105b2990f76226714ba282581d
---
M src/SConscript
1 file changed, 5 insertions(+), 9 deletions(-)



diff --git a/src/SConscript b/src/SConscript
index c25e3ef..32087c2 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -778,19 +778,15 @@
 MakeAction(makeTheISA, Transform("CFG ISA", 0)))

 def makeTheGPUISA(source, target, env):
-target_gpu_isa = env['TARGET_GPU_ISA']
+gpu_isa = env['TARGET_GPU_ISA']

-def namespace(isa):
-return isa[0].upper() + isa[1:].lower() + 'ISA'
+namespace = gpu_isa[0].upper() + gpu_isa[1:].lower() + 'ISA'

 code = code_formatter()
 code('''\
-#ifndef __CONFIG_THE_GPU_ISA_HH__
-#define __CONFIG_THE_GPU_ISA_HH__
-
-#define TheGpuISA ${{namespace(target_gpu_isa)}}
-
-#endif // __CONFIG_THE_GPU_ISA_HH__''')
+#ifndef TheGpuISA
+#define TheGpuISA ${namespace}
+#endif // TheGpuISA''')

 code.write(str(target[0]))


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48967
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I1e8559fc7add61105b2990f76226714ba282581d
Gerrit-Change-Number: 48967
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: scons: Turn the ISA and GPU ISA lists into construction variables.

2021-08-02 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/48965 )



Change subject: scons: Turn the ISA and GPU ISA lists into construction  
variables.

..

scons: Turn the ISA and GPU ISA lists into construction variables.

Change-Id: I4135709f5bceee959b5178a4700656aa782b1d6b
---
M src/SConscript
M src/arch/SConsopts
M src/arch/amdgpu/gcn3/SConsopts
M src/arch/amdgpu/vega/SConsopts
M src/arch/arm/SConsopts
M src/arch/mips/SConsopts
M src/arch/null/SConsopts
M src/arch/power/SConsopts
M src/arch/riscv/SConsopts
M src/arch/sparc/SConsopts
M src/arch/x86/SConsopts
M src/cpu/SConsopts
M src/cpu/checker/SConsopts
M src/cpu/minor/SConsopts
M src/cpu/o3/SConsopts
M src/cpu/simple/SConsopts
16 files changed, 21 insertions(+), 33 deletions(-)



diff --git a/src/SConscript b/src/SConscript
index fd3981b..0dd9c69 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -737,7 +737,7 @@
 env.ConfigFile(opt)

 def makeTheISA(source, target, env):
-isas = [ src.get_contents().decode('utf-8') for src in source ]
+isas = sorted(set(env.Split('${ALL_ISAS}')))
 target_isa = env['TARGET_ISA']
 def define(isa):
 return str(isa.upper()) + '_ISA'
@@ -774,11 +774,11 @@

 code.write(str(target[0]))

-env.Command('config/the_isa.hh', list(map(Value, all_isa_list)),
+env.Command('config/the_isa.hh', [],
 MakeAction(makeTheISA, Transform("CFG ISA", 0)))

 def makeTheGPUISA(source, target, env):
-isas = [ src.get_contents().decode('utf-8') for src in source ]
+isas = sorted(set(env.Split('${ALL_ISAS}')))
 target_gpu_isa = env['TARGET_GPU_ISA']
 def define(isa):
 return str(isa.upper()) + '_ISA'
@@ -816,7 +816,7 @@

 code.write(str(target[0]))

-env.Command('config/the_gpu_isa.hh', list(map(Value, all_gpu_isa_list)),
+env.Command('config/the_gpu_isa.hh', [],
 MakeAction(makeTheGPUISA, Transform("CFG ISA", 0)))

 
diff --git a/src/arch/SConsopts b/src/arch/SConsopts
index 90ac93b..38b02f5 100644
--- a/src/arch/SConsopts
+++ b/src/arch/SConsopts
@@ -25,18 +25,12 @@

 Import('*')

-# Define the universe of supported ISAs
-all_isa_list = []
-Export('all_isa_list')
-
-all_gpu_isa_list = []
-Export('all_gpu_isa_list')
-
 def add_isa_lists():
 sticky_vars.AddVariables(
-EnumVariable('TARGET_ISA', 'Target ISA', 'null',  
sorted(all_isa_list)),

+EnumVariable('TARGET_ISA', 'Target ISA', 'null',
+sorted(set(main.Split('${ALL_ISAS}',
 EnumVariable('TARGET_GPU_ISA', 'Target GPU ISA', 'gcn3',
-sorted(all_gpu_isa_list)),
+sorted(set(main.Split('${ALL_GPU_ISAS}',
 )
 AfterSConsopts(add_isa_lists)

diff --git a/src/arch/amdgpu/gcn3/SConsopts b/src/arch/amdgpu/gcn3/SConsopts
index 92bde97..3312e98 100644
--- a/src/arch/amdgpu/gcn3/SConsopts
+++ b/src/arch/amdgpu/gcn3/SConsopts
@@ -33,4 +33,4 @@

 Import('*')

-all_gpu_isa_list.append('gcn3')
+main.Append(ALL_GPU_ISAS=['gcn3'])
diff --git a/src/arch/amdgpu/vega/SConsopts b/src/arch/amdgpu/vega/SConsopts
index 0e44e37..b2b6695 100644
--- a/src/arch/amdgpu/vega/SConsopts
+++ b/src/arch/amdgpu/vega/SConsopts
@@ -33,4 +33,4 @@

 Import('*')

-all_gpu_isa_list.append('vega')
+main.Append(ALL_GPU_ISAS=['vega'])
diff --git a/src/arch/arm/SConsopts b/src/arch/arm/SConsopts
index 020e499..c284f2c 100644
--- a/src/arch/arm/SConsopts
+++ b/src/arch/arm/SConsopts
@@ -28,4 +28,4 @@

 Import('*')

-all_isa_list.append('arm')
+main.Append(ALL_ISAS=['arm'])
diff --git a/src/arch/mips/SConsopts b/src/arch/mips/SConsopts
index ee4d236..58240c1 100644
--- a/src/arch/mips/SConsopts
+++ b/src/arch/mips/SConsopts
@@ -28,4 +28,4 @@

 Import('*')

-all_isa_list.append('mips')
+main.Append(ALL_ISAS=['mips'])
diff --git a/src/arch/null/SConsopts b/src/arch/null/SConsopts
index a799754..6355ce3 100644
--- a/src/arch/null/SConsopts
+++ b/src/arch/null/SConsopts
@@ -37,4 +37,4 @@

 Import('*')

-all_isa_list.append('null')
+main.Append(ALL_ISAS=['null'])
diff --git a/src/arch/power/SConsopts b/src/arch/power/SConsopts
index 851f2ba..cb136fe 100644
--- a/src/arch/power/SConsopts
+++ b/src/arch/power/SConsopts
@@ -28,4 +28,4 @@

 Import('*')

-all_isa_list.append('power')
+main.Append(ALL_ISAS=['power'])
diff --git a/src/arch/riscv/SConsopts b/src/arch/riscv/SConsopts
index f5a8de5..76713ee 100644
--- a/src/arch/riscv/SConsopts
+++ b/src/arch/riscv/SConsopts
@@ -28,4 +28,4 @@

 Import('*')

-all_isa_list.append('riscv')
+main.Append(ALL_ISAS=['riscv'])
diff --git a/src/arch/sparc/SConsopts b/src/arch/sparc/SConsopts
index 41aa275..48fb4a6 100644
--- a/src/arch/sparc/SConsopts
+++ b/src/arch/sparc/SConsopts
@@ -28,4 +28,4 @@

 Import('*')

-all_isa_list.append('sparc')
+main.Append(ALL_ISAS=['sparc'])
diff --git a/src/arch/x86/SConsopts b/src/arch/x86/SConsopts
index 006d009..93dff8c 

[gem5-dev] Build failed in Jenkins: compiler-checks #145

2021-08-02 Thread jenkins-no-reply--- via gem5-dev
See 


Changes:

[gabe.black] dev: Fix style in i8254xGBe_defs.hh.

[gabe.black] dev: Fix style in pktfifo.hh.

[gabe.black] dev: Fix style in i8254xGBE.cc.


--
Started by timer
Running as SYSTEM
Building in workspace 
Selected Git installation does not exist. Using Default
The recommended git tool is: NONE
No credentials specified
 > git rev-parse --resolve-git-dir 
 >  # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://gem5.googlesource.com/public/gem5 # 
 > timeout=10
Fetching upstream changes from https://gem5.googlesource.com/public/gem5
 > git --version # timeout=10
 > git --version # 'git version 2.25.1'
 > git fetch --tags --force --progress -- 
 > https://gem5.googlesource.com/public/gem5 
 > +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git rev-parse refs/remotes/origin/develop^{commit} # timeout=10
Checking out Revision e24db5deddeed1a30c0a635b271b4d364a54c44d 
(refs/remotes/origin/develop)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f e24db5deddeed1a30c0a635b271b4d364a54c44d # timeout=10
Commit message: "dev: Fix style in i8254xGBE.cc."
 > git rev-list --no-walk 2cde260198b395177040b48b81fe14615aeaae8c # timeout=10
[compiler-checks] $ /bin/sh -xe /tmp/jenkins5372034535609594944.sh
+ ./tests/compiler-tests.sh -j 12
Starting build tests with 'gcc-version-10'...
'gcc-version-10' was found in the comprehensive tests. All ISAs will be built.
  * Building target 'ARM_MESI_Three_Level.opt' with 'gcc-version-10'...
Done.
  * Building target 'ARM_MESI_Three_Level.fast' with 'gcc-version-10'...
Done.
  * Building target 'SPARC.opt' with 'gcc-version-10'...
Done.
  * Building target 'SPARC.fast' with 'gcc-version-10'...
Done.
  * Building target 'NULL_MOESI_CMP_token.opt' with 'gcc-version-10'...
Done.
  * Building target 'NULL_MOESI_CMP_token.fast' with 'gcc-version-10'...
Done.
  * Building target 'ARM_MOESI_hammer.opt' with 'gcc-version-10'...
Done.
  * Building target 'ARM_MOESI_hammer.fast' with 'gcc-version-10'...
Done.
  * Building target 'POWER.opt' with 'gcc-version-10'...
Done.
  * Building target 'POWER.fast' with 'gcc-version-10'...
Done.
  * Building target 'ARM_MESI_Three_Level_HTM.opt' with 'gcc-version-10'...
Done.
  * Building target 'ARM_MESI_Three_Level_HTM.fast' with 'gcc-version-10'...
Done.
  * Building target 'NULL_MESI_Two_Level.opt' with 'gcc-version-10'...
Done.
  * Building target 'NULL_MESI_Two_Level.fast' with 'gcc-version-10'...
Done.
  * Building target 'X86.opt' with 'gcc-version-10'...
Done.
  * Building target 'X86.fast' with 'gcc-version-10'...
Done.
  * Building target 'NULL.opt' with 'gcc-version-10'...
Done.
  * Building target 'NULL.fast' with 'gcc-version-10'...
Done.
  * Building target 'Garnet_standalone.opt' with 'gcc-version-10'...
Done.
  * Building target 'Garnet_standalone.fast' with 'gcc-version-10'...
Done.
  * Building target 'RISCV.opt' with 'gcc-version-10'...
Done.
  * Building target 'RISCV.fast' with 'gcc-version-10'...
Done.
  * Building target 'NULL_MOESI_CMP_directory.opt' with 'gcc-version-10'...
Done.
  * Building target 'NULL_MOESI_CMP_directory.fast' with 'gcc-version-10'...
Done.
  * Building target 'X86_MESI_Two_Level.opt' with 'gcc-version-10'...
Done.
  * Building target 'X86_MESI_Two_Level.fast' with 'gcc-version-10'...
Done.
  * Building target 'X86_MOESI_AMD_Base.opt' with 'gcc-version-10'...
Done.
  * Building target 'X86_MOESI_AMD_Base.fast' with 'gcc-version-10'...
Done.
  * Building target 'NULL_MOESI_hammer.opt' with 'gcc-version-10'...
Done.
  * Building target 'NULL_MOESI_hammer.fast' with 'gcc-version-10'...
Done.
  * Building target 'GCN3_X86.opt' with 'gcc-version-10'...
Done.
  * Building target 'GCN3_X86.fast' with 'gcc-version-10'...
Done.
  * Building target 'ARM.opt' with 'gcc-version-10'...
Done.
  * Building target 'ARM.fast' with 'gcc-version-10'...
Done.
  * Building target 'MIPS.opt' with 'gcc-version-10'...
Done.
  * Building target 'MIPS.fast' with 'gcc-version-10'...
Done.
Starting build tests with 'gcc-version-9'...
  * Building target 'SPARC.opt' with 'gcc-version-9'...
Done.
  * Building target 'SPARC.fast' with 'gcc-version-9'...
Done.
Starting build tests with 'gcc-version-8'...
  * Building target 'ARM.opt' with 'gcc-version-8'...
Done.
  * Building target 'ARM.fast' with 'gcc-version-8'...
Done.
Starting build tests with 'gcc-version-7'...
  * Building target 'NULL.opt' with 'gcc-version-7'...
Done.
  * Building target 'NULL.fast' with 'gcc-version-7'...
Done.
Starting build tests with 'clang-version-11'...
'clang-version-11' was found in the