Gabe Black has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/42383 )
Change subject: arch-sparc: Wrap overly long lines in the decoder
definition.
......................................................................
arch-sparc: Wrap overly long lines in the decoder definition.
Change-Id: I194f4367bd889fa6639046675b2f565a4e03bc4d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42383
Reviewed-by: Daniel Carvalho <[email protected]>
Reviewed-by: Bobby R. Bruce <[email protected]>
Maintainer: Bobby R. Bruce <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/arch/sparc/isa/decoder.isa
1 file changed, 72 insertions(+), 34 deletions(-)
Approvals:
Daniel Carvalho: Looks good to me, approved
Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/sparc/isa/decoder.isa b/src/arch/sparc/isa/decoder.isa
index 3fc472b..fb1d889 100644
--- a/src/arch/sparc/isa/decoder.isa
+++ b/src/arch/sparc/isa/decoder.isa
@@ -215,7 +215,8 @@
Y = resTemp<63:32>;}});
0x1B: IntOpCcRes::smulcc({{
int64_t resTemp;
- Rd = resTemp = sext<32>(Rs1_sdw<31:0>) *
sext<32>(Rs2_or_imm13<31:0>);
+ Rd = resTemp = sext<32>(Rs1_sdw<31:0>) *
+ sext<32>(Rs2_or_imm13<31:0>);
Y = resTemp<63:32>;}});
0x1C: subccc({{
int64_t res, op1 = Rs1, op2 = Rs2_or_imm13;
@@ -247,13 +248,15 @@
if (val2 == 0) {
fault = std::make_shared<DivisionByZero>();
} else {
- Rd = (int64_t)((Y << 32) | Rs1_sdw<31:0>) / val2;
- overflow = ((int64_t)Rd >=
std::numeric_limits<int32_t>::max());
- underflow = ((int64_t)Rd <=
std::numeric_limits<int32_t>::min());
+ Rd_sdw = ((Y_sdw << 32) | Rs1_sdw<31:0>) / val2;
+ overflow =
+ (Rd_sdw >=
std::numeric_limits<int32_t>::max());
+ underflow =
+ (Rd_sdw <=
std::numeric_limits<int32_t>::min());
if (overflow)
- Rd = 0x7FFFFFFF;
+ Rd_sdw = 0x7FFFFFFF;
else if (underflow)
- Rd = 0xFFFFFFFF80000000ULL;
+ Rd_sdw = 0xFFFFFFFF80000000ULL;
}
}}, iv={{overflow || underflow}});
0x20: taddcc({{
@@ -395,10 +398,12 @@
}
0x2B: BasicOperate::flushw({{
if (NWindows - 2 - Cansave != 0) {
- if (Otherwin)
- fault =
std::make_shared<SpillNOther>(4*Wstate<5:3>);
- else
- fault =
std::make_shared<SpillNNormal>(4*Wstate<2:0>);
+ if (Otherwin) {
+ fault = std::make_shared<SpillNOther>(4 *
Wstate<5:3>);
+ } else {
+ fault = std::make_shared<SpillNNormal>(
+ 4 * Wstate<2:0>);
+ }
}
}});
0x2C: decode MOVCC3
@@ -471,7 +476,9 @@
// 0x04-0x05 should cause an illegal instruction exception
0x06: NoPriv::wrfprs({{Fprs = Rs1 ^ Rs2_or_imm13;}});
// 0x07-0x0E should cause an illegal instruction exception
- 0x0F: Trap::softreset({{fault =
std::make_shared<SoftwareInitiatedReset>();}});
+ 0x0F: Trap::softreset({{
+ fault = std::make_shared<SoftwareInitiatedReset>();
+ }});
0x10: Priv::wrpcr({{Pcr = Rs1 ^ Rs2_or_imm13;}});
0x11: Priv::wrpic({{Pic = Rs1 ^ Rs2_or_imm13;}},
{{Pcr<0:>}});
// 0x12 should cause an illegal instruction exception
@@ -480,8 +487,12 @@
return std::make_shared<FpDisabled>();
Gsr = Rs1 ^ Rs2_or_imm13;
}});
- 0x14: Priv::wrsoftint_set({{SoftintSet = Rs1 ^
Rs2_or_imm13;}});
- 0x15: Priv::wrsoftint_clr({{SoftintClr = Rs1 ^
Rs2_or_imm13;}});
+ 0x14: Priv::wrsoftint_set({{
+ SoftintSet = Rs1 ^ Rs2_or_imm13;
+ }});
+ 0x15: Priv::wrsoftint_clr({{
+ SoftintClr = Rs1 ^ Rs2_or_imm13;
+ }});
0x16: Priv::wrsoftint({{Softint = Rs1 ^ Rs2_or_imm13;}});
0x17: Priv::wrtick_cmpr({{TickCmpr = Rs1 ^
Rs2_or_imm13;}});
0x18: NoPriv::wrstick({{
@@ -541,7 +552,9 @@
0x08: Priv::wrprpil({{Pil = Rs1 ^ Rs2_or_imm13;}});
0x09: Priv::wrprcwp({{Cwp = Rs1 ^ Rs2_or_imm13;}});
0x0A: Priv::wrprcansave({{Cansave = Rs1 ^ Rs2_or_imm13;}});
- 0x0B: Priv::wrprcanrestore({{Canrestore = Rs1 ^
Rs2_or_imm13;}});
+ 0x0B: Priv::wrprcanrestore({{
+ Canrestore = Rs1 ^ Rs2_or_imm13;
+ }});
0x0C: Priv::wrprcleanwin({{Cleanwin = Rs1 ^
Rs2_or_imm13;}});
0x0D: Priv::wrprotherwin({{Otherwin = Rs1 ^
Rs2_or_imm13;}});
0x0E: Priv::wrprwstate({{Wstate = Rs1 ^ Rs2_or_imm13;}});
@@ -563,7 +576,9 @@
// 0x04 should cause an illegal instruction exception
0x05: HPriv::wrhprhtba({{Htba = Rs1 ^ Rs2_or_imm13;}});
// 0x06-0x01D should cause an illegal instruction exception
- 0x1F: HPriv::wrhprhstick_cmpr({{HstickCmpr = Rs1 ^
Rs2_or_imm13;}});
+ 0x1F: HPriv::wrhprhstick_cmpr({{
+ HstickCmpr = Rs1 ^ Rs2_or_imm13;
+ }});
}
0x34: decode OPF{
format FpBasic{
@@ -887,10 +902,18 @@
0x37: FailUnimpl::fmul8ulx16();
0x38: FailUnimpl::fmuld8sux16();
0x39: FailUnimpl::fmuld8ulx16();
- 0x3A: Trap::fpack32({{fault =
std::make_shared<IllegalInstruction>();}});
- 0x3B: Trap::fpack16({{fault =
std::make_shared<IllegalInstruction>();}});
- 0x3D: Trap::fpackfix({{fault =
std::make_shared<IllegalInstruction>();}});
- 0x3E: Trap::pdist({{fault =
std::make_shared<IllegalInstruction>();}});
+ 0x3A: Trap::fpack32({{
+ fault = std::make_shared<IllegalInstruction>();
+ }});
+ 0x3B: Trap::fpack16({{
+ fault = std::make_shared<IllegalInstruction>();
+ }});
+ 0x3D: Trap::fpackfix({{
+ fault = std::make_shared<IllegalInstruction>();
+ }});
+ 0x3E: Trap::pdist({{
+ fault = std::make_shared<IllegalInstruction>();
+ }});
0x48: BasicOperate::faligndata({{
uint64_t msbX = Frs1_udw;
uint64_t lsbX = Frs2_udw;
@@ -916,7 +939,9 @@
((lsbX & lsbMask) >> lsbShift);
}
}});
- 0x4B: Trap::fpmerge({{fault =
std::make_shared<IllegalInstruction>();}});
+ 0x4B: Trap::fpmerge({{
+ fault = std::make_shared<IllegalInstruction>();
+ }});
0x4C: FailUnimpl::bshuffle();
0x4D: FailUnimpl::fexpand();
0x50: FailUnimpl::fpadd16();
@@ -965,9 +990,15 @@
0x7B: FailUnimpl::fornot1s();
0x7C: FailUnimpl::for();
0x7D: FailUnimpl::fors();
- 0x7E: FpBasic::fone({{Frd_udw =
std::numeric_limits<uint64_t>::max();}});
- 0x7F: FpBasic::fones({{Frds_uw =
std::numeric_limits<uint32_t>::max();}});
- 0x80: Trap::shutdown({{fault =
std::make_shared<IllegalInstruction>();}});
+ 0x7E: FpBasic::fone({{
+ Frd_udw = std::numeric_limits<uint64_t>::max();
+ }});
+ 0x7F: FpBasic::fones({{
+ Frds_uw = std::numeric_limits<uint32_t>::max();
+ }});
+ 0x80: Trap::shutdown({{
+ fault = std::make_shared<IllegalInstruction>();
+ }});
0x81: FailUnimpl::siam();
}
// M5 special opcodes use the reserved IMPDEP2A opcode space
@@ -991,7 +1022,9 @@
panic("M5 panic instruction called at pc = %#x.",
PC);
}}, No_OpClass, IsNonSpeculative);
}
- default: Trap::impdep2({{fault =
std::make_shared<IllegalInstruction>();}});
+ default: Trap::impdep2({{
+ fault = std::make_shared<IllegalInstruction>();
+ }});
}
0x38: Branch::jmpl({{
Addr target = Rs1 + Rs2_or_imm13;
@@ -1011,10 +1044,13 @@
// Check for fills which are higher priority than
alignment
// faults.
if (Canrestore == 0) {
- if (Otherwin)
- fault =
std::make_shared<FillNOther>(4*Wstate<5:3>);
- else
- fault =
std::make_shared<FillNNormal>(4*Wstate<2:0>);
+ if (Otherwin) {
+ fault = std::make_shared<FillNOther>(
+ 4 * Wstate<5:3>);
+ } else {
+ fault = std::make_shared<FillNNormal>(
+ 4 * Wstate<2:0>);
+ }
} else if (target & 0x3) { // Check for alignment
faults
fault = std::make_shared<MemAddressNotAligned>();
} else {
@@ -1045,10 +1081,12 @@
0x3B: Nop::flush(IsWriteBarrier, MemWriteOp);
0x3C: save({{
if (Cansave == 0) {
- if (Otherwin)
- fault =
std::make_shared<SpillNOther>(4*Wstate<5:3>);
- else
- fault =
std::make_shared<SpillNNormal>(4*Wstate<2:0>);
+ if (Otherwin) {
+ fault = std::make_shared<SpillNOther>(4 *
Wstate<5:3>);
+ } else {
+ fault = std::make_shared<SpillNNormal>(
+ 4 * Wstate<2:0>);
+ }
} else if (Cleanwin - Canrestore == 0) {
fault = std::make_shared<CleanWindow>();
} else {
@@ -1061,9 +1099,9 @@
0x3D: restore({{
if (Canrestore == 0) {
if (Otherwin)
- fault =
std::make_shared<FillNOther>(4*Wstate<5:3>);
+ fault = std::make_shared<FillNOther>(4 *
Wstate<5:3>);
else
- fault =
std::make_shared<FillNNormal>(4*Wstate<2:0>);
+ fault = std::make_shared<FillNNormal>(4 *
Wstate<2:0>);
} else {
Cwp = (Cwp - 1 + NWindows) % NWindows;
Rd_prev = Rs1 + Rs2_or_imm13;
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/42383
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I194f4367bd889fa6639046675b2f565a4e03bc4d
Gerrit-Change-Number: 42383
Gerrit-PatchSet: 6
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Boris Shingarov <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s