diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2012-02-11 14:16:38 -0800 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2012-02-11 14:16:38 -0800 |
commit | 5b557a314f4dbde6f029b3f75c211332ac360f3a (patch) | |
tree | 8be804d79afc881903830e5281fc86b7f7d5d5dc /src/arch/sparc/isa/formats | |
parent | aa513a4a99cb8dfc6b605797acbbb64a5601ab6e (diff) | |
download | gem5-5b557a314f4dbde6f029b3f75c211332ac360f3a.tar.xz |
SPARC: Make PSTATE and HPSTATE a BitUnion.
This gets rid of cryptic bits of code with lots of bit manipulation, and makes
some comments redundant.
Diffstat (limited to 'src/arch/sparc/isa/formats')
-rw-r--r-- | src/arch/sparc/isa/formats/mem/util.isa | 8 | ||||
-rw-r--r-- | src/arch/sparc/isa/formats/priv.isa | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/arch/sparc/isa/formats/mem/util.isa b/src/arch/sparc/isa/formats/mem/util.isa index a77059181..ffce3063b 100644 --- a/src/arch/sparc/isa/formats/mem/util.isa +++ b/src/arch/sparc/isa/formats/mem/util.isa @@ -317,17 +317,17 @@ let {{ # are split into ones that are available in priv and hpriv, and # those that are only available in hpriv AlternateASIPrivFaultCheck = ''' - if ((!bits(Pstate,2,2) && !bits(Hpstate,2,2) && + if ((!Pstate.priv && !Hpstate.hpriv && !asiIsUnPriv((ASI)EXT_ASI)) || - (!bits(Hpstate,2,2) && asiIsHPriv((ASI)EXT_ASI))) + (!Hpstate.hpriv && asiIsHPriv((ASI)EXT_ASI))) fault = new PrivilegedAction; - else if (asiIsAsIfUser((ASI)EXT_ASI) && !bits(Pstate,2,2)) + else if (asiIsAsIfUser((ASI)EXT_ASI) && !Pstate.priv) fault = new PrivilegedAction; ''' TruncateEA = ''' if (!FullSystem) - EA = Pstate<3:> ? EA<31:0> : EA; + EA = Pstate.am ? EA<31:0> : EA; ''' }}; diff --git a/src/arch/sparc/isa/formats/priv.isa b/src/arch/sparc/isa/formats/priv.isa index 56f1cdbd9..e3242aab8 100644 --- a/src/arch/sparc/isa/formats/priv.isa +++ b/src/arch/sparc/isa/formats/priv.isa @@ -264,7 +264,7 @@ let {{ }}; def format Priv(code, extraCond=true, checkTl=false, *opt_flags) {{ - checkCode = "(%s) && !(Pstate<2:> || Hpstate<2:>)" % extraCond + checkCode = "(%s) && !(Pstate.priv || Hpstate.hpriv)" % extraCond if checkTl != "false": tlCheck = "Tl == 0" else: @@ -289,7 +289,7 @@ def format NoPriv(code, checkTl=false, *opt_flags) {{ }}; def format HPriv(code, checkTl=false, *opt_flags) {{ - checkCode = "!Hpstate<2:2>" + checkCode = "!Hpstate.hpriv" if checkTl != "false": tlCheck = "Tl == 0" else: |