arm: Fixes based on UBSan and static analysis
authorAndreas Hansson <andreas.hansson@arm.com>
Fri, 14 Nov 2014 08:53:51 +0000 (03:53 -0500)
committerAndreas Hansson <andreas.hansson@arm.com>
Fri, 14 Nov 2014 08:53:51 +0000 (03:53 -0500)
commit481eb6ae8018d0478c23fda7c5f9f3fa4db8de89
treee9b449bc6a2e7b15255c7a3c2d5984e0a99b452c
parent9ffe0e7ba67ee194db885b96a7ed3630aed03584
arm: Fixes based on UBSan and static analysis

Another churn to clean up undefined behaviour, mostly ARM, but some
parts also touching the generic part of the code base.

Most of the fixes are simply ensuring that proper intialisation. One
of the more subtle changes is the return type of the sign-extension,
which is changed to uint64_t. This is to avoid shifting negative
values (undefined behaviour) in the ISA code.
35 files changed:
src/arch/arm/faults.hh
src/arch/arm/insts/macromem.cc
src/arch/arm/insts/mem64.hh
src/arch/arm/insts/misc.hh
src/arch/arm/insts/pred_inst.hh
src/arch/arm/isa/insts/misc64.isa
src/arch/arm/isa/insts/neon64_mem.isa
src/arch/arm/linux/system.cc
src/arch/arm/pmu.cc
src/arch/arm/process.hh
src/arch/arm/remote_gdb.cc
src/arch/arm/stage2_lookup.hh
src/arch/arm/stage2_mmu.cc
src/arch/arm/system.cc
src/arch/arm/table_walker.cc
src/arch/arm/table_walker.hh
src/arch/arm/tlb.cc
src/arch/arm/types.hh
src/arch/generic/types.hh
src/base/bitfield.hh
src/cpu/base.cc
src/cpu/minor/decode.cc
src/cpu/minor/fetch1.hh
src/cpu/minor/fetch2.cc
src/cpu/o3/lsq_unit.hh
src/cpu/o3/rename_map.cc
src/cpu/o3/rename_map.hh
src/cpu/o3/thread_state.hh
src/cpu/simple/atomic.cc
src/cpu/simple/base.cc
src/cpu/simple/base.hh
src/cpu/simple_thread.cc
src/cpu/static_inst.hh
src/cpu/thread_state.cc
src/dev/arm/realview.cc