diff options
author | Earl Ou <shunhsingou@google.com> | 2018-09-07 15:16:53 +0800 |
---|---|---|
committer | Earl Ou <shunhsingou@google.com> | 2018-09-13 13:57:46 +0000 |
commit | a1e5fccd64d5693d6209dbc5a9fc406648d74a5d (patch) | |
tree | 7121f5acadf92ab2d26d0faa7ef9e66d803dc2c9 /src | |
parent | 91295ff980c17efb3ad013b9636017b58e49c071 (diff) | |
download | gem5-a1e5fccd64d5693d6209dbc5a9fc406648d74a5d.tar.xz |
Fix SConstruct for asan build
Sometimes it's easier to debug gem5 built with ASan enabled. This CL fixes
some build error when using --with-asan.
Bug: None
Test: ./scripts/build_gem5 --with-asan --with-ubsan build/ARM/gem5.debug
Change-Id: Iaaaaebc3f25749e11f97bf454ddd0153b3de56e7
Reviewed-on: https://gem5-review.googlesource.com/12511
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/arm/isa.hh | 2 | ||||
-rw-r--r-- | src/cpu/reg_class.hh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/arm/isa.hh b/src/arch/arm/isa.hh index 0521c43f9..7b39682f9 100644 --- a/src/arch/arm/isa.hh +++ b/src/arch/arm/isa.hh @@ -461,7 +461,7 @@ namespace ArmISA return INTREG_SP0; default: panic("Invalid exception level"); - break; + return 0; // Never happens. } } else { return flattenIntRegModeIndex(reg); diff --git a/src/cpu/reg_class.hh b/src/cpu/reg_class.hh index 617d17e35..69da9cf7e 100644 --- a/src/cpu/reg_class.hh +++ b/src/cpu/reg_class.hh @@ -84,7 +84,7 @@ class RegId { static constexpr size_t Scale = TheISA::NumVecElemPerVecReg; friend struct std::hash<RegId>; public: - RegId() {}; + RegId() : regClass(IntRegClass), regIdx(0), elemIdx(-1) {} RegId(RegClass reg_class, RegIndex reg_idx) : regClass(reg_class), regIdx(reg_idx), elemIdx(-1) { |