diff options
author | Matt Horsnell <Matt.Horsnell@ARM.com> | 2011-01-18 16:30:05 -0600 |
---|---|---|
committer | Matt Horsnell <Matt.Horsnell@ARM.com> | 2011-01-18 16:30:05 -0600 |
commit | adbd84ab9fffdcdce18f564acffa508c10164c9f (patch) | |
tree | aa6d90545a22e3524e33022176666569a47d83ba /src/arch/arm/isa/formats/fp.isa | |
parent | 11bef2ab3811e5c7a65d33ba86718d8c606be87a (diff) | |
download | gem5-adbd84ab9fffdcdce18f564acffa508c10164c9f.tar.xz |
ARM: The ARM decoder should not panic when decoding undefined holes is arch.
This can abort simulations when the fetch unit runs ahead and speculatively
decodes instructions that are off the execution path.
Diffstat (limited to 'src/arch/arm/isa/formats/fp.isa')
-rw-r--r-- | src/arch/arm/isa/formats/fp.isa | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/arch/arm/isa/formats/fp.isa b/src/arch/arm/isa/formats/fp.isa index 9d40a4a43..3a0cad1c5 100644 --- a/src/arch/arm/isa/formats/fp.isa +++ b/src/arch/arm/isa/formats/fp.isa @@ -758,7 +758,15 @@ let {{ bits(machInst, 24)) << 7) | (bits(machInst, 18, 16) << 4) | (bits(machInst, 3, 0) << 0); - const uint64_t bigImm = simd_modified_imm(op, cmode, imm); + + // Check for invalid immediate encodings and return an unknown op + // if it happens + bool immValid = true; + const uint64_t bigImm = simd_modified_imm(op, cmode, imm, immValid); + if (!immValid) { + return new Unknown(machInst); + } + if (op) { if (bits(cmode, 3) == 0) { if (bits(cmode, 0) == 0) { |