diff options
author | Ali Saidi <Ali.Saidi@ARM.com> | 2011-05-13 17:27:02 -0500 |
---|---|---|
committer | Ali Saidi <Ali.Saidi@ARM.com> | 2011-05-13 17:27:02 -0500 |
commit | 05866c82f9eb80db05fb423addcc8563efe1b744 (patch) | |
tree | dc5d03a1f3021a979705dc66de9598d721812bb4 /src/arch/arm/isa/insts/mem.isa | |
parent | 401165c778108ab22aeeee55c4f4451ca93bcffb (diff) | |
download | gem5-05866c82f9eb80db05fb423addcc8563efe1b744.tar.xz |
ARM: Construct the predicate test register for more instruction programatically.
If one of the condition codes isn't being used in the execution we should only
read it if the instruction might be dependent on it. With the preeceding changes
there are several more cases where we should dynamically pick instead of assuming
as we did before.
Diffstat (limited to 'src/arch/arm/isa/insts/mem.isa')
-rw-r--r-- | src/arch/arm/isa/insts/mem.isa | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/arch/arm/isa/insts/mem.isa b/src/arch/arm/isa/insts/mem.isa index cad0b1589..fb09eacb6 100644 --- a/src/arch/arm/isa/insts/mem.isa +++ b/src/arch/arm/isa/insts/mem.isa @@ -120,14 +120,21 @@ let {{ def pickPredicate(blobs): opt_nz = True - opt_c = True + opt_c = 'opt' opt_v = True - for val in blobs.values(): - if re.search('(?<!Opt)CondCodesNZ', val): + + if not isinstance(blobs, dict): + vals = [blobs] + else: + vals = blobs.values() + for val in vals: + if re.search('(?<!Opt)CondCodesNZ(?!.*=)', val): opt_nz = False - if re.search('(?<!Opt)CondCodesC', val): - opt_c = False - if re.search('(?<!Opt)CondCodesV', val): + if re.search('OptShiftRmCondCodesC(?!.*=)', val): + opt_c = 'opt_shift_rm' + elif re.search('(?<!Opt)CondCodesC(?!.*=)', val): + opt_c = 'none' + if re.search('(?<!Opt)CondCodesV(?!.*=)', val): opt_v = False # Build up the predicate piece by piece depending on which @@ -137,8 +144,10 @@ let {{ predicate += 'OptCondCodesNZ, ' else: predicate += 'CondCodesNZ, ' - if opt_c: + if opt_c == 'opt': predicate += 'OptCondCodesC, ' + elif opt_c == 'opt_shift_rm': + predicate += 'OptShiftRmCondCodesC, ' else: predicate += 'CondCodesC, ' if opt_v: @@ -146,7 +155,7 @@ let {{ else: predicate += 'CondCodesV, ' predicate += 'condCode)' - + predicate += '/*auto*/' return predicate def memClassName(base, post, add, writeback, \ |