Skip to content

Commit

Permalink
prepare for release 0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
recoules committed Jul 24, 2022
1 parent 6556a45 commit 4d5b099
Show file tree
Hide file tree
Showing 41 changed files with 2,526 additions and 3,708 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.0.3 (2022-07-24)

- handling some new VEX encoded instructions (x86)
- various bug fixes and refactoring

## 0.0.2 (2022-04-15)

- handling of SSE instructions for AMD64
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2007-2021,
Copyright (c) 2007-2022,
Commissariat a l'Énergie Atomique et aux Énergies Alternatives (CEA)
All rights reserved.

Expand Down
8 changes: 4 additions & 4 deletions aarch32/decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,11 @@ struct Processor
Expr nt( cpsr.nthumb );
if (unisim::util::symbolic::ConstNodeBase const* ntc = nt.ConstSimplify())
{
if (ntc->Get( bool() ) ^ cpsr.GetT())
path->add_sink( newRegWrite( RegID("t"), nt ) );
if (dynamic_cast<unisim::util::symbolic::ConstNode<bool> const&>(*ntc).value ^ cpsr.GetT())
path->add_sink( newRegWrite( Flag("t"), nt ) );
}
else
path->add_sink( newRegWrite( RegID("t"), nt ) );
path->add_sink( newRegWrite( Flag("t"), nt ) );
}

if (spsr.expr != ref.spsr.expr)
Expand Down Expand Up @@ -386,7 +386,7 @@ struct Processor
bool concretize( Expr cexp )
{
if (unisim::util::symbolic::ConstNodeBase const* cnode = cexp.ConstSimplify())
return cnode->Get( bool() );
return dynamic_cast<unisim::util::symbolic::ConstNode<bool> const&>(*cnode).value;

bool predicate = path->proceed( cexp );
path = path->next( predicate );
Expand Down
72 changes: 8 additions & 64 deletions aarch64/aarch64dec.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -1729,6 +1729,8 @@ public:
char const* format; virtual
void disasm( ARCH & cpu,
std::ostream& sink );
virtual
void execute( ARCH & cpu );
private:
};

Expand Down Expand Up @@ -4904,28 +4906,6 @@ public:
private:
};

template < typename ARCH>
class OpSev : public Operation< ARCH>
{
public:
OpSev(CodeType code, uint64_t addr);
char const* format; virtual
void disasm( ARCH & cpu,
std::ostream& sink );
private:
};

template < typename ARCH>
class OpSevl : public Operation< ARCH>
{
public:
OpSevl(CodeType code, uint64_t addr);
char const* format; virtual
void disasm( ARCH & cpu,
std::ostream& sink );
private:
};

template < typename ARCH>
class OpSmaddl_xw : public Operation< ARCH>
{
Expand Down Expand Up @@ -10184,6 +10164,12 @@ std::ostream& sink)
{
sink << "brk\t" << DisasmI(imm,16);
}}
template < typename ARCH>
void OpBrk< ARCH>::execute( ARCH & cpu)
{
{
cpu.SoftwareBreakpoint( imm );
}}

template < typename ARCH>
static Operation< ARCH> *DecodeOpBrk(CodeType code, uint64_t addr)
Expand Down Expand Up @@ -15073,34 +15059,6 @@ static Operation< ARCH> *DecodeOpSdiv_xxx(CodeType code, uint64_t addr)
return new OpSdiv_xxx< ARCH>(code, addr);
}

template < typename ARCH>
void OpSev< ARCH>::disasm( ARCH & cpu,
std::ostream& sink)
{
{
sink << "sev";
}}

template < typename ARCH>
static Operation< ARCH> *DecodeOpSev(CodeType code, uint64_t addr)
{
return new OpSev< ARCH>(code, addr);
}

template < typename ARCH>
void OpSevl< ARCH>::disasm( ARCH & cpu,
std::ostream& sink)
{
{
sink << "sevl";
}}

template < typename ARCH>
static Operation< ARCH> *DecodeOpSevl(CodeType code, uint64_t addr)
{
return new OpSevl< ARCH>(code, addr);
}

template < typename ARCH>
void OpSmaddl_xw< ARCH>::disasm( ARCH & cpu,
std::ostream& sink)
Expand Down Expand Up @@ -22381,18 +22339,6 @@ OpSdiv_xxx< ARCH>::OpSdiv_xxx(CodeType code, uint64_t addr) : Operation< ARCH>(c
format = "base,1470";
}

template < typename ARCH>
OpSev< ARCH>::OpSev(CodeType code, uint64_t addr) : Operation< ARCH>(code, addr, "sev")
{
format = "base,2949";
}

template < typename ARCH>
OpSevl< ARCH>::OpSevl(CodeType code, uint64_t addr) : Operation< ARCH>(code, addr, "sevl")
{
format = "base,2950";
}

template < typename ARCH>
OpSmaddl_xw< ARCH>::OpSmaddl_xw(CodeType code, uint64_t addr) : Operation< ARCH>(code, addr, "smaddl_xw")
{
Expand Down Expand Up @@ -24157,8 +24103,6 @@ Decoder< ARCH>::Decoder()
decode_table.push_back(DecodeTableEntry< ARCH>(0x9b208000UL, 0xffe08000UL, DecodeOpSmsubl_xw< ARCH>));
decode_table.push_back(DecodeTableEntry< ARCH>(0xd4000003UL, 0xffe0001fUL, DecodeOpSmc< ARCH>));
decode_table.push_back(DecodeTableEntry< ARCH>(0x9b200000UL, 0xffe08000UL, DecodeOpSmaddl_xw< ARCH>));
decode_table.push_back(DecodeTableEntry< ARCH>(0xd50320bfUL, 0xffffffffUL, DecodeOpSevl< ARCH>));
decode_table.push_back(DecodeTableEntry< ARCH>(0xd503209fUL, 0xffffffffUL, DecodeOpSev< ARCH>));
decode_table.push_back(DecodeTableEntry< ARCH>(0x9ac00c00UL, 0xffe0fc00UL, DecodeOpSdiv_xxx< ARCH>));
decode_table.push_back(DecodeTableEntry< ARCH>(0x1ac00c00UL, 0xffe0fc00UL, DecodeOpSdiv_www< ARCH>));
decode_table.push_back(DecodeTableEntry< ARCH>(0x93400000UL, 0xffc00000UL, DecodeOpSbfm_x< ARCH>));
Expand Down
3 changes: 2 additions & 1 deletion aarch64/decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ struct Processor
bool concretize( Expr cexp )
{
if (unisim::util::symbolic::ConstNodeBase const* cnode = cexp.ConstSimplify())
return cnode->Get( bool() );
return dynamic_cast<unisim::util::symbolic::ConstNode<bool> const&>(*cnode).value;

bool predicate = path->proceed( cexp );
path = path->next( predicate );
Expand Down Expand Up @@ -263,6 +263,7 @@ struct Processor

void CallSupervisor( uint32_t imm ) { throw 0; }
void CallHypervisor( uint32_t imm ) { throw 0; }
void SoftwareBreakpoint( uint32_t imm ) { throw 0; }
void ExceptionReturn() { throw 0; }

// =====================================================================
Expand Down
2 changes: 1 addition & 1 deletion amd64/arch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ ProcessorBase::VClear::GetType() const

static std::set<VCT> type_descriptors;
auto tp = type_descriptors.insert(this->size).first;

return &*tp;
}

Expand Down
Loading

0 comments on commit 4d5b099

Please sign in to comment.